This is the mail archive of the binutils@sources.redhat.com 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: [RFA] Coff SEC_LOAD vs SEC_NEVER_LOAD


Ian Lance Taylor wrote:
It gets turned on for COFF STYP_NOLOAD sections, and for output
sections marked as NOLOAD in linker scripts.

Well, that is my headache right now. ld does not turn on the STYP_NOLOAD regardless of NOLOAD's use or not. A quick debug of ld reveals that the sec_to_styp_flags() convertion function in bfd is called with the value 0, which is incorrect for this section.


Yet earlier on, lang_enter_output_section_statement() in ld is called for each segment and returns 0x400 for those segments which uses the NOLOAD statement. So somewhere inbetween something is filtering our flags.

Do you have any pointer on where I should look? I mean, I have tried to debug this thing out now, but I'm still clueless.

BTW. This is correct linkscript syntax, right:
    .dummy (NOLOAD) : { . += 0x2; }


When it comes to the gdb bug, I found this construct:


if (bfd_get_section_flags (abfd, asec) & SEC_LOAD)

Would you reccommend submitting a patch to gdb which would exclude the segments with SEC_NEVER_LOAD?

-or-

Modify the entire BFD and do s/SEC_NEVER_LOAD/!SEC_LOAD/? This is a big job that I'm not feeling called to do....


Regards, Svein


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