Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | cat <<EOF |
2 | OUTPUT_FORMAT("${OUTPUT_FORMAT}") | |
3 | OUTPUT_ARCH(${ARCH}) | |
4 | ENTRY(_start) | |
5 | ${RELOCATING+${LIB_SEARCH_DIRS}} | |
6 | ||
7 | SECTIONS | |
8 | { | |
9 | .text ${RELOCATING+ 0x2000 + SIZEOF_HEADERS} : | |
10 | { | |
11 | ${RELOCATING+ __.text.start = .}; | |
12 | *(.text) | |
13 | ${RELOCATING+ etext = .;} | |
14 | ${RELOCATING+ _etext = .;} | |
15 | ${RELOCATING+ __.text.end = .}; | |
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 | } | |
27 | .data ${RELOCATING+ SIZEOF(.text) + ADDR(.text) + 0x400000} : | |
28 | { | |
29 | ${RELOCATING+ __.data.start = .}; | |
30 | *(.data) | |
31 | ${RELOCATING+ edata = .}; | |
32 | ${RELOCATING+ _edata = .}; | |
33 | ${RELOCATING+ __.data.end = .}; | |
34 | } | |
35 | .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : | |
36 | { | |
37 | ${RELOCATING+ __.bss.start = .}; | |
38 | *(.bss) | |
39 | *(COMMON) | |
40 | ${RELOCATING+ __.bss.end = .}; | |
41 | ${RELOCATING+ end = ALIGN(0x8)}; | |
42 | ${RELOCATING+ _end = ALIGN(0x8)}; | |
43 | } | |
44 | .comment ${RELOCATING+ 0} : | |
45 | { | |
46 | *(.comment) | |
47 | } | |
48 | } | |
49 | EOF |