diff options
author | Alan Modra <amodra@gmail.com> | 2014-06-10 21:50:21 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-06-10 23:00:22 +0930 |
commit | 8a5da09b9e326a19e78b20a1021a5148ea0484b0 (patch) | |
tree | e925755d23c841b430e3e5f083c9edb22871ce7b /bfd/elf32-m32c.c | |
parent | 0e58ee40a2cec3c4bf796980fb05f93540e40ec2 (diff) | |
download | gdb-8a5da09b9e326a19e78b20a1021a5148ea0484b0.zip gdb-8a5da09b9e326a19e78b20a1021a5148ea0484b0.tar.gz gdb-8a5da09b9e326a19e78b20a1021a5148ea0484b0.tar.bz2 |
Unwrap symbols for debug information
Fixes issues with dwz multi-file (-m) and ld's -wrap option.
Symbols referenced from DWARF debug info in a separate file, eg. to
specify low and high pc, must use the real symbol. The DWARF info
is specifying attributes of the real function, not one interposed
with --wrap.
include/
* bfdlink.h (unwrap_hash_lookup): Declare.
bfd/
* linker.c (unwrap_hash_lookup): New function.
* elf-bfd (RELOC_FOR_GLOBAL_SYMBOL): Call unwrap_hash_lookup.
* elf32-i370.c (i370_elf_relocate_section): Likewise.
* elf32-m32c.c (m32c_elf_relocate_section): Likewise.
* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
* elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
* elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
* elf32-spu.c (spu_elf_relocate_section): Likewise.
* elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
Diffstat (limited to 'bfd/elf32-m32c.c')
-rw-r--r-- | bfd/elf32-m32c.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/elf32-m32c.c b/bfd/elf32-m32c.c index 82152dc..ed7df9a 100644 --- a/bfd/elf32-m32c.c +++ b/bfd/elf32-m32c.c @@ -408,6 +408,11 @@ m32c_elf_relocate_section { h = sym_hashes [r_symndx - symtab_hdr->sh_info]; + if (info->wrap_hash != NULL + && (input_section->flags & SEC_DEBUGGING) != 0) + h = ((struct elf_link_hash_entry *) + unwrap_hash_lookup (info, input_bfd, &h->root)); + while (h->root.type == bfd_link_hash_indirect || h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; |