This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Bugs in s12z test suite.
- From: Alan Modra <amodra at gmail dot com>
- To: John Darrington <john at darrington dot wattle dot id dot au>
- Cc: binutils at sourceware dot org
- Date: Sun, 2 Sep 2018 22:27:05 +0930
- Subject: Re: Bugs in s12z test suite.
- References: <20180902072207.frdsy3rjsp3j34bi@jocasta.intra>
On Sun, Sep 02, 2018 at 09:22:08AM +0200, John Darrington wrote:
> Running objdump -Wi on tmpdir/dw2-1-compressed.o
[snip]
> Using gdb to investigate it seems that objdump is calling apply_reloc on
> these values. This is wrong isn't it?
Nope.
> What is happening is that the datum is read (it's value is say 0x4) and
> the reloc is applied (the addend is 0x4) so the result 0x8 and in general
> many (all) of these test failures result from the value being double what
> the test expects.
>
> Why is the reloc being applied by objdump? The value was relocated when
> the file was written. It's not apppropriate for it to be relocated again.
> Or have I missed something?
Your reloc howtos look broken to me. Your target uses rela relocs,
yet the howtos have non-zero src_mask. Rela targets normally ignore
the section contents when applying relocations.
--
Alan Modra
Australia Development Lab, IBM