diff options
Diffstat (limited to 'ld/scripttempl/i386lynx.sc')
-rw-r--r-- | ld/scripttempl/i386lynx.sc | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/ld/scripttempl/i386lynx.sc b/ld/scripttempl/i386lynx.sc new file mode 100644 index 0000000..b1bfdb7 --- /dev/null +++ b/ld/scripttempl/i386lynx.sc @@ -0,0 +1,46 @@ +test -z "$ENTRY" && ENTRY=_start +cat <<EOF +OUTPUT_FORMAT("${OUTPUT_FORMAT}") +${LIB_SEARCH_DIRS} + +ENTRY(${ENTRY}) + +SECTIONS +{ + .text ${RELOCATING+ SIZEOF_HEADERS} : { + *(.init) + *(.text) + ${RELOCATING+ etext = .;} + ${CONSTRUCTING+ __CTOR_LIST__ = .;} + ${CONSTRUCTING+ LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)} + *(.ctors) + ${CONSTRUCTING+ LONG(0)} + ${CONSTRUCTING+ __CTOR_END__ = .;} + ${CONSTRUCTING+ __DTOR_LIST__ = .;} + ${CONSTRUCTING+ LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)} + *(.dtors) + ${CONSTRUCTING+ LONG(0)} + ${CONSTRUCTING+ __DTOR_END__ = .;} + *(.fini) + ${RELOCATING+ etext = .}; + } + .data ${RELOCATING+ 0x400000 + (. & 0xffc00fff)} : { + *(.data) + ${RELOCATING+ edata = .}; + } + .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : + { + *(.bss) + *(COMMON) + ${RELOCATING+ end = .}; + } + .stab . (NOLOAD) : + { + [ .stab ] + } + .stabstr . (NOLOAD) : + { + [ .stabstr ] + } +} +EOF |