This is the mail archive of the binutils@sourceware.cygnus.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]

question about obj_coff_section


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.

Mark



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