aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-07-10 14:03:03 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-07-10 14:03:03 +0000
commit1d7708459220fa4c011f7e7bea9e58a808cb2289 (patch)
treea5225c621917659e64b38c99eb48ca841ff3d74a /bfd/elf.c
parent52cfded73cc013294bb0599e13bf5544341373c6 (diff)
downloadgdb-1d7708459220fa4c011f7e7bea9e58a808cb2289.zip
gdb-1d7708459220fa4c011f7e7bea9e58a808cb2289.tar.gz
gdb-1d7708459220fa4c011f7e7bea9e58a808cb2289.tar.bz2
bfd/
2009-07-10 H.J. Lu <hongjiu.lu@intel.com> * elf.c (_bfd_elf_get_synthetic_symtab): Remove leading zeros when reporting addends. ld/testsuite/ 2009-07-10 H.J. Lu <hongjiu.lu@intel.com> * ld-ifunc/ifunc-1-local-x86.d: Updated. * ld-ifunc/ifunc-1-x86.d: Likewise.Likewise. * ld-ifunc/ifunc-2-local-x86-64.d: Likewise.Likewise. * ld-ifunc/ifunc-2-x86-64.d: Likewise. * ld-ifunc/ifunc-3a-x86.d: Likewise.Likewise.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 0a46a84..19f2684 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -8965,10 +8965,16 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd,
names += len;
if (p->addend != 0)
{
+ char buf[30], *a;
+ int len;
memcpy (names, "+0x", sizeof ("+0x") - 1);
names += sizeof ("+0x") - 1;
- bfd_sprintf_vma (abfd, names, p->addend);
- names += strlen (names);
+ bfd_sprintf_vma (abfd, buf, p->addend);
+ for (a = buf; *a == '0'; ++a)
+ ;
+ len = strlen (a);
+ memcpy (names, a, len);
+ names += len;
}
memcpy (names, "@plt", sizeof ("@plt"));
names += sizeof ("@plt");