mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
028f887219
* Makefile.in (em_m68klynx.c, em_i386lynx.c, em_sparclynx.c): Use Lynx-specific script templates. * configure.in (sparclite*-*-coff): Use coff-sparc. * emulparams/i386lynx.sh (SCRIPT_NAME): Set to i386lynx. * emulparams/sparclynx.sh (SCRIPT_NAME): Set to sparclynx. (ENTRY): Set to __main. * scripttempl/i386lynx.sc: New file, script for I386 Lynx. * scripttempl/m68klynx.sc: Add insertion of ctor/dtor sections. * scripttempl/sparclynx.sc: New file, script for uSparc Lynx.
48 lines
1017 B
Scala
48 lines
1017 B
Scala
# Linker script for Sparc LynxOS.
|
|
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
|