This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Adding custom sections to default linker script


On 14/09/15 01:31, Alan Modra wrote:
> No wonder it crashes.  You have .fpcdata and .bss at the same address.
> This is because you told the linker to put .threadvar at _edata.

Ah, yes. The original linker script put the .fpc stuff inside .data, and then .threadvar right after it. To keep the same layout, I added the explicit placement for .threadvar. Then ld told me I couldn't insert ".data after .data" in my augmentation script, so I changed it to .fpcdata, which in then caused the overlap (with ".data after .data", I thought it would just put it at the end of the .data).

> Now
> it seems that .threadvar is empty and stripped from the output.  If
> I'm remembering correctly, this explains why an old linker worked for
> you.  Old linkers ignore address assignments to empty and stripped
> sections.  Newer linkers don't, thus affecting following sections.

Perfect, now everything works!

Thanks again.


Jonas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]