1# $MirOS: src/gnu/usr.bin/binutils/ld/scripttempl/sparclynx.sc,v 1.2 2005/03/13 16:07:08 tg Exp $
2#
3# Linker script for Sparc LynxOS.
4test -z "$ENTRY" && ENTRY=_start
5cat <<EOF
6OUTPUT_FORMAT("${OUTPUT_FORMAT}")
7${LIB_SEARCH_DIRS}
8
9ENTRY(${ENTRY})
10
11SECTIONS
12{
13  .text ${RELOCATING+ SIZEOF_HEADERS} : {
14    *(.init)
15    *(.text)
16    ${RELOCATING+ etext  =  .;}
17    ${CONSTRUCTING+ ___CTOR_LIST__ = .;}
18    ${CONSTRUCTING+ LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)}
19    ${CONSTRUCTING+ *(.ctors)}
20    ${CONSTRUCTING+ LONG(0)}
21    ${CONSTRUCTING+ ___CTOR_END__ = .;}
22    ${CONSTRUCTING+ ___DTOR_LIST__ = .;}
23    ${CONSTRUCTING+ LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)}
24    ${CONSTRUCTING+ *(.dtors)}
25    ${CONSTRUCTING+ LONG(0)}
26    ${CONSTRUCTING+ ___DTOR_END__ = .;}
27    *(.fini)
28    ${RELOCATING+ etext  =  .};
29  }
30  .data ${RELOCATING+ 0x400000 + (. & 0xffc00fff)} : {
31    *(.data)
32    ${RELOCATING+ edata  =  .};
33  }
34  .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
35  {
36    *(.bss)
37    *(COMMON)
38    ${RELOCATING+ end = .};
39  }
40  .stab  0 ${RELOCATING+\(NOLOAD\)} :
41  {
42    [ .stab ]
43  }
44  .stabstr  0 ${RELOCATING+\(NOLOAD\)} :
45  {
46    [ .stabstr ]
47  }
48}
49EOF
50