diff options
author | Alan Modra <amodra@gmail.com> | 2009-07-10 10:33:19 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2009-07-10 10:33:19 +0000 |
commit | 041de40dc8e221039d7a983d489c6dcacd446e36 (patch) | |
tree | 286e28d9560235e4d13585861710339072183196 /bfd/elf.c | |
parent | 7ae26bc141a487736f8590300fa40cf58daf4123 (diff) | |
download | gdb-041de40dc8e221039d7a983d489c6dcacd446e36.zip gdb-041de40dc8e221039d7a983d489c6dcacd446e36.tar.gz gdb-041de40dc8e221039d7a983d489c6dcacd446e36.tar.bz2 |
* elf.c (_bfd_elf_get_synthetic_symtab): Report addends.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -8922,7 +8922,17 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd, size = count * sizeof (asymbol); p = relplt->relocation; for (i = 0; i < count; i++, p += bed->s->int_rels_per_ext_rel) - size += strlen ((*p->sym_ptr_ptr)->name) + sizeof ("@plt"); + { + size += strlen ((*p->sym_ptr_ptr)->name) + sizeof ("@plt"); + if (p->addend != 0) + { +#ifdef BFD64 + size += sizeof ("+0x") - 1 + 8 + 8 * (bed->s->elfclass == ELFCLASS64); +#else + size += sizeof ("+0x") - 1 + 8; +#endif + } + } s = *ret = bfd_malloc (size); if (s == NULL) @@ -8953,6 +8963,13 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd, len = strlen ((*p->sym_ptr_ptr)->name); memcpy (names, (*p->sym_ptr_ptr)->name, len); names += len; + if (p->addend != 0) + { + memcpy (names, "+0x", sizeof ("+0x") - 1); + names += sizeof ("+0x") - 1; + bfd_sprintf_vma (abfd, names, p->addend); + names += strlen (names); + } memcpy (names, "@plt", sizeof ("@plt")); names += sizeof ("@plt"); ++s, ++n; |