diff options
author | Alan Modra <amodra@gmail.com> | 2015-07-25 16:38:42 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2015-07-25 20:41:04 +0930 |
commit | a496fbc8802f0a5719db6347a43cc869e03d83c9 (patch) | |
tree | 21bdd4f9bfe1bb57b0690d57ac485dd9bd189d71 /bfd/elf32-hppa.c | |
parent | ca3084f54b62ce06c6e70a6e1daafeb5e3317c12 (diff) | |
download | gdb-a496fbc8802f0a5719db6347a43cc869e03d83c9.zip gdb-a496fbc8802f0a5719db6347a43cc869e03d83c9.tar.gz gdb-a496fbc8802f0a5719db6347a43cc869e03d83c9.tar.bz2 |
Fix broken -Bsymbolic-functions
For selected targets. The testcase reveals a number of targets that
still need fixing.
bfd/
* elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to
check if a symbol should be bound symbolically.
* elf32-hppa.c (elf32_hppa_check_relocs,
elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section,
elf32_hppa_finish_dynamic_symbol): Likewise.
* elf32-m68k.c (elf_m68k_check_relocs,
elf_m68k_relocate_section): Likewise.
* elf32-nios2.c (nios2_elf32_relocate_section,
nios2_elf32_check_relocs, allocate_dynrelocs): Likewise.
* elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol,
elf32_tic6x_relocate_section): Likewise.
ld/testsuite/
* ld-elf/symbolic-func.s,
* ld-elf/symbolic-func.r: New test.
* ld-elf/elf.exp: Run it.
Diffstat (limited to 'bfd/elf32-hppa.c')
-rw-r--r-- | bfd/elf32-hppa.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index af512a7..f611e0d 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -1467,7 +1467,7 @@ elf32_hppa_check_relocs (bfd *abfd, && (sec->flags & SEC_ALLOC) != 0 && (IS_ABSOLUTE_RELOC (r_type) || (hh != NULL - && (!info->symbolic + && (!SYMBOLIC_BIND (info, &hh->eh) || hh->eh.root.type == bfd_link_hash_defweak || !hh->eh.def_regular)))) || (ELIMINATE_COPY_RELOCS @@ -1819,7 +1819,7 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info, || (eh->def_regular && eh->root.type != bfd_link_hash_defweak && ! hppa_elf_hash_entry (eh)->plabel - && (!info->shared || info->symbolic))) + && (!info->shared || SYMBOLIC_BIND (info, eh)))) { /* The .plt entry is not needed when: a) Garbage collection has removed all references to the @@ -4005,7 +4005,7 @@ elf32_hppa_relocate_section (bfd *output_bfd, && (plabel || !IS_ABSOLUTE_RELOC (r_type) || !info->shared - || !info->symbolic + || !SYMBOLIC_BIND (info, &hh->eh) || !hh->eh.def_regular)) { outrel.r_info = ELF32_R_INFO (hh->eh.dynindx, r_type); @@ -4389,7 +4389,7 @@ elf32_hppa_finish_dynamic_symbol (bfd *output_bfd, global offset table will already have been initialized in the relocate_section function. */ if (info->shared - && (info->symbolic || eh->dynindx == -1) + && (SYMBOLIC_BIND (info, eh) || eh->dynindx == -1) && eh->def_regular) { rela.r_info = ELF32_R_INFO (0, R_PARISC_DIR32); |