Mail Archives: djgpp-workers/1998/05/18/18:04:25
Hey Guys -
I have been using the new binutils here without any incident and will
upload a version of them soon. The only thing I noticed about it
was that the built in default linker script had errors in it (I think this
has been around since 2.7, 2.8 at least). Ld
actually couldn't parse it and aborts with an error. This probably
isn't of concern to too many people, but I actually run into it whenever
I build gcc on my ux box, because during the make process it invokes the new
cross-compiler without specifying the proper specs file (note that I have
fixed this too), but anyways, it should be possible to fix both gcc
and ld so that no specs file or linker script is needed. Here is my
version on the linker script template that I used, which includes
the new EH stuff. I am really not too familiar with it at all, but
it seems to have work. If anyone has any suggestions that would be
great.
Andy
# Linker script for i386 go32 (DJGPP)
test -z "$ENTRY" && ENTRY=start
EXE=${CONSTRUCTING+${RELOCATING+-exe}}
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}${EXE}")
ENTRY(${ENTRY})
SECTIONS
{
.text ${RELOCATING+ ${TARGET_PAGE_SIZE}+SIZEOF_HEADERS} : {
*(.text)
${RELOCATING+etext = . ; _etext = .};
${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
}
.data ${RELOCATING+ ${DATA_ALIGNMENT}} : {
${RELOCATING+djgpp_first_ctor = . ;
*(.ctor)
djgpp_last_ctor = . ;}
${RELOCATING+djgpp_first_dtor = . ;
*(.dtor)
djgpp_last_dtor = . ;}
*(.data)
*(.gcc_exc)
${RELOCATING+___EH_FRAME_BEGIN__ = . ;
*(.eh_fram)
___EH_FRAME_END__ = . ;}
LONG(0)
${RELOCATING+ edata = . ; _edata = .};
${RELOCATING+ . = ALIGN(${SEGMENT_SIZE});}
}
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
{
_object.2 = . ;
. += 24 ;
*(.bss)
*(COMMON)
${RELOCATING+ end = . ; _end = .};
${RELOCATING+ . = ALIGN(${SEGMENT_SIZE});}
}
}
- Raw text -