file config.texi was initially added on branch binutils-2_17-branch.
[binutils.git] / ld / scripttempl / sparccoff.sc
blob6bbb7ad6e903998d599752f1315227c2d15e7755
1 # Linker script for Sparc COFF.
2 # Based on i386coff.sc by Ian Taylor <ian@cygnus.com>.
3 test -z "$ENTRY" && ENTRY=_start
4 cat <<EOF
5 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
6 ${LIB_SEARCH_DIRS}
8 ENTRY(${ENTRY})
10 SECTIONS
12   .text ${RELOCATING+ SIZEOF_HEADERS} : {
13     *(.init)
14     *(.text)
15     ${RELOCATING+ etext  =  .;}
16     ${CONSTRUCTING+ ___CTOR_LIST__ = .;}
17     ${CONSTRUCTING+ LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)}
18     ${CONSTRUCTING+ *(.ctors)}
19     ${CONSTRUCTING+ LONG(0)}
20     ${CONSTRUCTING+ ___CTOR_END__ = .;}
21     ${CONSTRUCTING+ ___DTOR_LIST__ = .;}
22     ${CONSTRUCTING+ LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)}
23     ${CONSTRUCTING+ *(.dtors)}
24     ${CONSTRUCTING+ LONG(0)}
25     ${CONSTRUCTING+ ___DTOR_END__ = .;}
26     *(.fini)
27     ${RELOCATING+ etext  =  .};
28   }
29   .data ${RELOCATING+ 0x400000 + (. & 0xffc00fff)} : {
30     *(.data)
31     ${RELOCATING+ edata  =  .};
32   }
33   .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
34   {                                     
35     *(.bss)
36     *(COMMON)
37     ${RELOCATING+ end = .};
38   }
39   .stab  0 ${RELOCATING+(NOLOAD)} : 
40   {
41     [ .stab ]
42   }
43   .stabstr  0 ${RELOCATING+(NOLOAD)} :
44   {
45     [ .stabstr ]
46   }
48 EOF