Mail Archives: djgpp-workers/1996/08/26/17:00:46
On 27/8/96 12:40 am, DJ Delorie <dj AT delorie DOT com> did thus say >>>
>
> > If you mean, that the linker should produce every time an .exe file,
> > this is correct. But what about people, who want to get a raw COFF
> > image? In this case you must tell ld the correct bfd-output-format and
> > so you need two different targets and names for them.
>
> That's what exe2coff is for. Don't worry about it.
I disagree. I would much prefer to be able to produce a raw coff file without
producing an exe file. I think Robert's suggestion of 'go32stubbed-coff' is
suitable. If it realy is too long, make it 'go32stub-coff' or 'djstub-coff'.
However, I do agree that producing a stubbed exe on linking should be the default
behaviour.
BTW, below is a modified djgpp.lnk that fixes the alignment problem (aligns the
.text section to 16 bytes for pentiums).
----------------------- cut ------------------------
OUTPUT_FORMAT("coff-go32")
ENTRY(start)
SECTIONS
{
.text 0x1000+SIZEOF_HEADERS : {
. = ALIGN(0x10);
*(.text)
etext = . ; _etext = .;
. = ALIGN(0x200);
}
.data ALIGN(0x200) : {
djgpp_first_ctor = . ;
*(.ctor)
djgpp_last_ctor = . ;
djgpp_first_dtor = . ;
*(.dtor)
djgpp_last_dtor = . ;
*(.data)
edata = . ; _edata = .;
. = ALIGN(0x200);
}
.bss SIZEOF(.data) + ADDR(.data) :
{
*(.bss)
*(COMMON)
end = . ; _end = .;
. = ALIGN(0x200);
}
}
- Raw text -