diff options
author | Alan Modra <amodra@gmail.com> | 2003-05-15 06:35:43 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2003-05-15 06:35:43 +0000 |
commit | 09695f5689bb7745efb295ccc0b49919d8cf5a6c (patch) | |
tree | e8d0abbcec0f7bfd7e98005cc70e0c1147504bd6 /bfd/elf64-ppc.c | |
parent | 40f62fa0b5b463171f747094b0c471e8c12b3950 (diff) | |
download | gdb-09695f5689bb7745efb295ccc0b49919d8cf5a6c.zip gdb-09695f5689bb7745efb295ccc0b49919d8cf5a6c.tar.gz gdb-09695f5689bb7745efb295ccc0b49919d8cf5a6c.tar.bz2 |
* elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
(elf_i386_relocate_section): Likewise.
* elf32-ppc.c (allocate_dynrelocs): Likewise.
(ppc_elf_relocate_section): Likewise.
* elf64-ppc.c (allocate_dynrelocs): Likewise.
(ppc64_elf_relocate_section): Likewise.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r-- | bfd/elf64-ppc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 331c0ba..2887d9b 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -5621,7 +5621,13 @@ allocate_dynrelocs (h, inf) if (info->shared) { - if (SYMBOL_REFERENCES_LOCAL (info, h)) + /* Relocs that use pc_count are those that appear on a call + insn, or certain REL relocs (see MUST_BE_DYN_RELOC) that can + generated via assembly. We want calls to protected symbols + to resolve directly to the function rather than going via the + plt. If people want function pointer comparisons to work as + expected then they should avoid writing weird assembly. */ + if (SYMBOL_CALLS_LOCAL (info, h)) { struct ppc_dyn_relocs **pp; @@ -7874,7 +7880,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, || h->root.type != bfd_link_hash_undefweak) && (MUST_BE_DYN_RELOC (r_type) || (h != NULL - && !SYMBOL_REFERENCES_LOCAL (info, h)))) + && !SYMBOL_CALLS_LOCAL (info, h)))) || (ELIMINATE_COPY_RELOCS && !info->shared && h != NULL |