This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFC] BFD sets wrong start address during format detection
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Frederic RISS <frederic dot riss at st dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 23 Nov 2005 22:13:27 +1030
- Subject: Re: [RFC] BFD sets wrong start address during format detection
- References: <1132741582.7340.77.camel@crx549.cro.st.com>
On Wed, Nov 23, 2005 at 11:26:22AM +0100, Frederic RISS wrote:
> I first thought that BFD misdetected my file as being elf32-sh64 which
> does sign extension. In fact, the file was correctly detected as
> elf32-shl, but in the process of testing the binary, the entry point
> address of the struct bfd* was overwritten during the elf32-sh64 backend
> test that happened afterwards.
> The attached patch fixes this issue for me. It moves the entry point
> recording down after the last point of failure, so that it's done only
> when the backend actually matches the file.
> Does that seem safe ?
Looks good. Applying.
--
Alan Modra
IBM OzLabs - Linux Technology Centre