diff options
author | Thomas Schwinge <tschwinge@gnu.org> | 2010-09-24 12:14:26 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2010-09-24 12:14:26 +0000 |
commit | cf35638d431e230d51d54550e8a249e730264ea5 (patch) | |
tree | eed3fbc4ab7982aac3fe5f38bb85e16bc80410d3 /bfd/elflink.c | |
parent | 2c2fa401c554831bacec9c920678ddda8ce69519 (diff) | |
download | gdb-cf35638d431e230d51d54550e8a249e730264ea5.zip gdb-cf35638d431e230d51d54550e8a249e730264ea5.tar.gz gdb-cf35638d431e230d51d54550e8a249e730264ea5.tar.bz2 |
2010-09-24 Thomas Schwinge <thomas@codesourcery.com>
* elf32-arm.c, elf32-cris.c, elf32-hppa.c, elf32-i370.c, elf32-m32r.c,
elf32-m68k.c, elf32-microblaze.c, elf32-ppc.c, elf32-score.c,
elf32-score7.c, elf32-sh.c, elf32-vax.c, elf32-xtensa.c, elf64-alpha.c,
elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-sparc.c, elfcode.h,
elflink.c, elfxx-ia64.c, elfxx-mips.c: Use STN_UNDEF when referring to
the zero symbol index.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index bdd6966..f4d6599 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -2170,7 +2170,7 @@ elf_link_read_relocs_from_section (bfd *abfd, return FALSE; } } - else if (r_symndx != 0) + else if (r_symndx != STN_UNDEF) { (*_bfd_error_handler) (_("%B: non-zero symbol index (0x%lx) for offset 0x%lx in section `%A'" @@ -9500,7 +9500,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) discarded section. */ if ((sec = *ps) != NULL && elf_discarded_section (sec)) { - BFD_ASSERT (r_symndx != 0); + BFD_ASSERT (r_symndx != STN_UNDEF); if (action_discarded & COMPLAIN) (*finfo->info->callbacks->einfo) (_("%X`%s' referenced in section `%A' of %B: " @@ -9667,7 +9667,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) /* I suppose the backend ought to fill in the section of any STT_SECTION symbol against a processor specific section. */ - r_symndx = 0; + r_symndx = STN_UNDEF; if (bfd_is_abs_section (sec)) ; else if (sec == NULL || sec->owner == NULL) @@ -9696,7 +9696,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) if (!bfd_is_abs_section (osec)) { r_symndx = osec->target_index; - if (r_symndx == 0) + if (r_symndx == STN_UNDEF) { struct elf_link_hash_table *htab; asection *oi; @@ -9714,7 +9714,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) } } - BFD_ASSERT (r_symndx != 0); + BFD_ASSERT (r_symndx != STN_UNDEF); } } @@ -11471,7 +11471,7 @@ _bfd_elf_gc_mark_rsec (struct bfd_link_info *info, asection *sec, struct elf_link_hash_entry *h; r_symndx = cookie->rel->r_info >> cookie->r_sym_shift; - if (r_symndx == 0) + if (r_symndx == STN_UNDEF) return NULL; if (r_symndx >= cookie->locsymcount |