This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Bug in bfd_install_relocation?
- From: Ralf Dreesen <rdreesen at uni-paderborn dot de>
- To: binutils at sourceware dot org
- Date: Tue, 30 Apr 2013 16:16:02 +0200
- Subject: Bug in bfd_install_relocation?
I'm trying to retarget binutils-2.23.1. It appears to me, that there is
a bug in'bfd_install_relocation' (I'm not sure).
I have a relocation entry on a symbol FOO, whichs value is 2 (addend=0).
The entry is passed to bfd_install_relocation.
The variable'relocation* is set to'symbol->value' in line 1017. In
line 1077, the'reloc_entry->addend' is set to'relocation', while
'reloc_entry->sym_ptr_ptr' remains unchanged.
I finally end up with a wrong relocation entry 'FOO+2', insteand of just
FOO.
Does anybody have an idea, why bfd_install_relocation adds the symbols
value to the addend?
Thanks,
Ralf Dreesen