This is the mail archive of the 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]

NOLOAD section attribute in gold.

Been trying to using my old linker scripts with gold and smoked out a couple of bugs so most things work now, however there are still some strange things going on when using the NOLOAD section attribute.

It seems like NOLOAD means something different in gold compared to gnu ld.
In gnu ld NOLOAD is the same as NOBITS with allocate flag set, like bss. In gold I get PROGBITS without any flags set, see Layout::make_output_section_for_script(),
I've tried to change the behavior of this but make_output_section_for_script seems to create all sections that was not created during the linking phase, so there are some changes needed elsewhere for existing input sections.

Another problem seems to be that NOBITS section are still allocated in the elf, this happens with a simple linker script which only had text, data, and bss sections and no additional attributes.
So bss is uses memory in both in the elf and when creating a binary, this since filesize = memsize the the program header.

I'm willing to work on fixing this but I would like to discuss it first, because this behavior cannot be intended?


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