This is the mail archive of the binutils@sourceware.org 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: Some question I found while reviewing coffcode


"Kai Tietz" <ktietz70@googlemail.com> writes:

> while reviewing the coff code I found some problems in our current
> implementation

Note that you are discussing PE, not COFF.  COFF is a much older
object file format, PE is an extension.


> 1) Treating of IMAGE_SCN_LNK_INFO
>    As coff spec says "The section contains comments or other
> information. The .drectve section has this type. This is valid for
> object files only." and "A section is a directive section if it has
> the IMAGE_SCN_LNK_INFO flag set in the section header and has the
> .drectve section name. The linker removes a .drectve section after
> processing the information, so the section does not appear in the
> image file that is being linked. "
> At the moment are sections with the IMAGE_SCN_LNK_INFO flag mark as
> SEC_DEBUGGING (when COFF_PAGE_SIZE is known). But at least for the
> .drectve it should be SEC_EXCLUDE, IIUC.

Yes.  This should probably be set in process_def_file in ld/pe-dll.c.


> 2) Treating of IMAGE_SCN_MEM_NOT_PAGED
>   Is untreated. For user mode this flag is not of much interest, but
> for drivers and kernel mode things it is pretty important to mark
> sections as not to be page-able  Do we need here an addtional COFF
> flag for this?

I suppose you could add a new SEC_xxx flag for this--we already have
COFF specific SEC_xxx flags.  Or it might be possible to add a field
to the coff_section_tdata struct.

Ian


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