summaryrefslogtreecommitdiff
path: root/bfd/elf32-ppc.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2012-05-16 16:38:19 +0000
committerNick Clifton <nickc@redhat.com>2012-05-16 16:38:19 +0000
commit61e7a924f1dd8a0b2cf8503a98c8e8b1b3c84479 (patch)
tree54df25bfd441a7cdfba51bfe0f5fcff7f6caa308 /bfd/elf32-ppc.c
parent7a200090a16d025ab2895e7cf035ab5b35954f24 (diff)
downloadbinutils-redhat-61e7a924f1dd8a0b2cf8503a98c8e8b1b3c84479.tar.gz
* bfd-in.h (bfd_get_section_name, bfd_get_section_vma,
bfd_get_section_lma, bfd_get_section_alignment, bfd_get_section_flags, bfd_get_section_userdata): Rewrite macros in order to use the `bfd' argument. * bfd-in2.h: Regenerate. * elf-vxworks.c (elf_vxworks_finish_dynamic_entry): Pass proper `bfd' as the first argument for `bfd_get_section_alignment'. * elf32-arm.c (create_ifunc_sections): Likewise, for `bfd_set_section_alignment'. * elf32-m32r.c (m32r_elf_relocate_section): Likewise, for `bfd_get_section_name'. * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. (ppc_elf_relocate_section): Likewise. * elf64-mmix.c (mmix_final_link_relocate): Likewise, for `bfd_get_section_vma'. * elf64-ppc.c (create_linkage_sections): Likewise, for `bfd_set_section_alignment'. * emultempl/m68hc1xelf.em (hook_in_stub): Pass proper `bfd' as the first argument for `bfd_get_section_name'. * config/tc-alpha.c (maybe_set_gp): Pass proper `bfd' as the first argument for `bfd_get_section_vma'.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r--bfd/elf32-ppc.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index e8f8db8eac..c0b0c145b7 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -6309,7 +6309,8 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
/* Strip these too. */
}
- else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela"))
+ else if (CONST_STRNEQ (bfd_get_section_name (htab->elf.dynobj, s),
+ ".rela"))
{
if (s->size != 0)
{
@@ -8331,8 +8332,10 @@ ppc_elf_relocate_section (bfd *output_bfd,
unresolved_reloc = TRUE;
break;
}
- BFD_ASSERT (strcmp (bfd_get_section_name (abfd, sec), ".got") == 0
- || strcmp (bfd_get_section_name (abfd, sec), ".cgot") == 0);
+ BFD_ASSERT (strcmp (bfd_get_section_name (sec->owner, sec),
+ ".got") == 0
+ || strcmp (bfd_get_section_name (sec->owner, sec),
+ ".cgot") == 0);
addend -= sec->output_section->vma + sec->output_offset + 0x8000;
break;
@@ -8382,7 +8385,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
}
addend -= SYM_VAL (sda);
- name = bfd_get_section_name (abfd, sec->output_section);
+ name = bfd_get_section_name (output_bfd, sec->output_section);
if (! ((CONST_STRNEQ (name, ".sdata")
&& (name[6] == 0 || name[6] == '.'))
|| (CONST_STRNEQ (name, ".sbss")
@@ -8414,7 +8417,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
}
addend -= SYM_VAL (sda);
- name = bfd_get_section_name (abfd, sec->output_section);
+ name = bfd_get_section_name (output_bfd, sec->output_section);
if (! (CONST_STRNEQ (name, ".sdata2")
|| CONST_STRNEQ (name, ".sbss2")))
{
@@ -8487,7 +8490,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
break;
}
- name = bfd_get_section_name (abfd, sec->output_section);
+ name = bfd_get_section_name (output_bfd, sec->output_section);
if (((CONST_STRNEQ (name, ".sdata")
&& (name[6] == 0 || name[6] == '.'))
|| (CONST_STRNEQ (name, ".sbss")
@@ -8579,7 +8582,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
break;
}
- name = bfd_get_section_name (abfd, sec->output_section);
+ name = bfd_get_section_name (output_bfd, sec->output_section);
if (((CONST_STRNEQ (name, ".sdata")
&& (name[6] == 0 || name[6] == '.'))
|| (CONST_STRNEQ (name, ".sbss")