This is the mail archive of the
mailing list for the binutils project.
question about obj_coff_section
- To: binutils at sourceware dot cygnus dot com
- Subject: question about obj_coff_section
- From: "Mark E." <snowball3 at bigfoot dot com>
- Date: Mon, 26 Jun 2000 00:50:31 -0400
In the BFD version of obj_coff_section, the default for the 'flags' variable
is set to SEC_LOAD. Yet, later on 'flags' is tested against SEC_NO_FLAGS to
determine whether to change the flags or not. Yet in the non-BFD version of
obj_coff_section, the default for 'flags' is 0 (presumably as in
SEC_NO_FLAGS). This seems like a bug to me.
obj_coff_section in gas/config/obj-coff.c:
flags = SEC_LOAD;
if (flags != SEC_NO_FLAGS)
/* code that sets the new flags but preserves the old linkonce flags.
Either flags should initially be set to SEC_NO_FLAGS or the test should be
changed to 'flags != SEC_LOAD'. I wanted to get an expert opinion to make
sure it really is a bug before proceeding with a fix.