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]

Re: Possible Bug with "n" Flag of .section Directive


Hi Mark,

> > Maybe this is the bug.  Maybe this ought to be changed to:
> > 
> >   if ((sec_flags & SEC_LOAD) == 0)
> >     styp_flags |= STYP_NOLOAD;
> 
> I think you right idea, but I think you're looking at the COFF_WITH_PE 
> version. The non-COFF_WITH_PE version is right above it.

Duh!  Yes you are right.  The code for the non-COFF_WITH_PE version is
rather messy, but my guess at an (*untested*) patch would be:

Cheers
        Nick

Index: bfd/coffcode.h
===================================================================
RCS file: /cvs/src//src/bfd/coffcode.h,v
retrieving revision 1.53
diff -p -r1.53 coffcode.h
*** coffcode.h	2001/01/13 19:42:22	1.53
--- coffcode.h	2001/02/22 18:42:52
*************** sec_to_styp_flags (sec_name, sec_flags)
*** 466,471 ****
--- 466,473 ----
  #ifdef STYP_NOLOAD
    if ((sec_flags & (SEC_NEVER_LOAD | SEC_COFF_SHARED_LIBRARY)) != 0)
      styp_flags |= STYP_NOLOAD;
+   if ((styp_flags == 0) && ((sec_flags & SEC_LOAD) == 0))
+     styp_flags |= STYP_NOLOAD;
  #endif
  
    return styp_flags;


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