Subject: Re: weird elf header issues, is it binutils or my linker script?

From: Chris Friesen <[email-masked]>
Date: Thu, 04 Apr 2013 16:24:07 -0600

On 04/02/2013 09:07 AM, Segher Boessenkool wrote:

>> What I don't understand is where the "/lib/ld.so.1" string is coming
>> from and how the length gets set to the invalid value.
>
> It comes from the .interp input sections, i.e. the .interp sections in
> the .o files you linked together. Perhaps you have more than one of
> those?

It turns out that the problem was in the linker script.  The linker 
script was originally written for an older binutils.  With the newly 
compiled object files there were some sections that were not explicitly 
specified in the linker script so they were added automatically to the 
interpreter section, bumping up the length.

A new linker script with explicit mention of those sections made the 
interpreter section look as expected.

Chris