This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [RFA] Coff SEC_LOAD vs SEC_NEVER_LOAD
- From: "Svein E. Seldal" <Svein dot Seldal at solidas dot com>
- To: Ian Lance Taylor <ian at airs dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 30 May 2003 04:25:55 +0200
- Subject: Re: [RFA] Coff SEC_LOAD vs SEC_NEVER_LOAD
- References: <3ED66556.9000300@solidas.com> <m34r3dpeep.fsf@gossamer.airs.com>
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