diff options
author | Renlin Li <renlin.li@arm.com> | 2015-10-01 14:12:37 +0100 |
---|---|---|
committer | Renlin Li <renlin.li@arm.com> | 2015-10-01 14:27:56 +0100 |
commit | 73524045d3a3b95bb0437386bba2a1583791ea42 (patch) | |
tree | 7a9329af0ec686a4e63e5c394e91e870f2555875 /bfd/elfnn-aarch64.c | |
parent | 0e1e4a751264ef12dce933e720152914c9ea5eb6 (diff) | |
download | gdb-73524045d3a3b95bb0437386bba2a1583791ea42.zip gdb-73524045d3a3b95bb0437386bba2a1583791ea42.tar.gz gdb-73524045d3a3b95bb0437386bba2a1583791ea42.tar.bz2 |
[BFD][AARCH64]Emit single AARCH64_MAP_INSN symbol for the whole plt.
bfd/
2015-10-01 Renlin Li <renlin.li@arm.com>
* elfnn-aarch64.c (elfNN_aarch64_output_plt_map): Remove.
(elfNN_aarch64_output_arch_local_syms): Emit AARCH64_MAP_INSN once.
ld/testsuite/
2015-10-01 Renlin Li <renlin.li@arm.com>
* ld-aarch64/plt_mapping_symbol.d: New.
* ld-aarch64/plt_mapping_symbol.s: New.
* ld-aarch64/aarch64-elf.exp: Run the new test.
Diffstat (limited to 'bfd/elfnn-aarch64.c')
-rw-r--r-- | bfd/elfnn-aarch64.c | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 24ef79f..90ab3f8 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -7310,38 +7310,6 @@ elfNN_aarch64_output_map_sym (output_arch_syminfo *osi, return osi->func (osi->finfo, names[type], &sym, osi->sec, NULL) == 1; } - - -/* Output mapping symbols for PLT entries associated with H. */ - -static bfd_boolean -elfNN_aarch64_output_plt_map (struct elf_link_hash_entry *h, void *inf) -{ - output_arch_syminfo *osi = (output_arch_syminfo *) inf; - bfd_vma addr; - - if (h->root.type == bfd_link_hash_indirect) - return TRUE; - - if (h->root.type == bfd_link_hash_warning) - /* When warning symbols are created, they **replace** the "real" - entry in the hash table, thus we never get to see the real - symbol in a hash traversal. So look at it now. */ - h = (struct elf_link_hash_entry *) h->root.u.i.link; - - if (h->plt.offset == (bfd_vma) - 1) - return TRUE; - - addr = h->plt.offset; - if (addr == 32) - { - if (!elfNN_aarch64_output_map_sym (osi, AARCH64_MAP_INSN, addr)) - return FALSE; - } - return TRUE; -} - - /* Output a single local symbol for a generated stub. */ static bfd_boolean @@ -7474,13 +7442,11 @@ elfNN_aarch64_output_arch_local_syms (bfd *output_bfd, if (!htab->root.splt || htab->root.splt->size == 0) return TRUE; - /* For now live without mapping symbols for the plt. */ osi.sec_shndx = _bfd_elf_section_from_bfd_section (output_bfd, htab->root.splt->output_section); osi.sec = htab->root.splt; - elf_link_hash_traverse (&htab->root, elfNN_aarch64_output_plt_map, - (void *) &osi); + elfNN_aarch64_output_map_sym (&osi, AARCH64_MAP_INSN, 0); return TRUE; |