aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2010-09-24 12:14:26 +0000
committerThomas Schwinge <tschwinge@gnu.org>2010-09-24 12:14:26 +0000
commitcf35638d431e230d51d54550e8a249e730264ea5 (patch)
treeeed3fbc4ab7982aac3fe5f38bb85e16bc80410d3 /bfd/elf64-ppc.c
parent2c2fa401c554831bacec9c920678ddda8ce69519 (diff)
downloadgdb-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/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 2073bdc..a4f3064 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -11668,7 +11668,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
/* Check that tls relocs are used with tls syms, and non-tls
relocs are used with non-tls syms. */
- if (r_symndx != 0
+ if (r_symndx != STN_UNDEF
&& r_type != R_PPC64_NONE
&& (h == NULL
|| h->elf.root.type == bfd_link_hash_defined
@@ -11917,9 +11917,9 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (local_sections[r_symndx] == sec)
break;
if (r_symndx >= symtab_hdr->sh_info)
- r_symndx = 0;
+ r_symndx = STN_UNDEF;
rel->r_addend = htab->elf.tls_sec->vma + DTP_OFFSET;
- if (r_symndx != 0)
+ if (r_symndx != STN_UNDEF)
rel->r_addend -= (local_syms[r_symndx].st_value
+ sec->output_offset
+ sec->output_section->vma);
@@ -12025,9 +12025,9 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (local_sections[r_symndx] == sec)
break;
if (r_symndx >= symtab_hdr->sh_info)
- r_symndx = 0;
+ r_symndx = STN_UNDEF;
rel->r_addend = htab->elf.tls_sec->vma + DTP_OFFSET;
- if (r_symndx != 0)
+ if (r_symndx != STN_UNDEF)
rel->r_addend -= (local_syms[r_symndx].st_value
+ sec->output_offset
+ sec->output_section->vma);
@@ -12569,7 +12569,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
case R_PPC64_TOC:
/* Relocation value is TOC base. */
relocation = TOCstart;
- if (r_symndx == 0)
+ if (r_symndx == STN_UNDEF)
relocation += htab->stub_group[input_section->id].toc_off;
else if (unresolved_reloc)
;
@@ -12819,7 +12819,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
sym_name);
ret = FALSE;
}
- else if (r_symndx == 0 || bfd_is_abs_section (sec))
+ else if (r_symndx == STN_UNDEF || bfd_is_abs_section (sec))
;
else if (sec == NULL || sec->owner == NULL)
{