aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index e53ff76..3495161 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2009-07-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf.c (_bfd_elf_get_synthetic_symtab): Remove leading zeros
+ when reporting addends.
+
2009-07-10 Alan Modra <amodra@bigpond.net.au>
* elf32-spu.c (spu_elf_size_stubs): Do set up soft-icache manager
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");