Commit | Line | Data |
---|---|---|
ce7d4b0d | 1 | # Linker script for MIPS systems. |
42b5c739 | 2 | # Ian Lance Taylor <ian@cygnus.com>. |
ce7d4b0d ILT |
3 | # These variables may be overridden by the emulation file. The |
4 | # defaults are appropriate for a DECstation running Ultrix. | |
5 | test -z "$ENTRY" && ENTRY=__start | |
6 | test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x400000 + SIZEOF_HEADERS" | |
7 | test -z "$DATA_ADDR" && DATA_ADDR=0x10000000 | |
8 | test -z "$BSS_VAR" && BSS_VAR= | |
42b5c739 ILT |
9 | cat <<EOF |
10 | OUTPUT_FORMAT("${OUTPUT_FORMAT}") | |
11 | ${LIB_SEARCH_DIRS} | |
12 | ||
ce7d4b0d | 13 | ENTRY(${ENTRY}) |
42b5c739 ILT |
14 | |
15 | SECTIONS | |
16 | { | |
ce7d4b0d | 17 | .text ${RELOCATING+ ${TEXT_START_ADDR}} : { |
42b5c739 ILT |
18 | *(.init) |
19 | ${RELOCATING+ eprol = .}; | |
20 | *(.text) | |
21 | *(.fini) | |
22 | ${RELOCATING+ etext = .}; | |
5b7876fe | 23 | ${RELOCATING+ _etext = .}; |
42b5c739 | 24 | } |
ce7d4b0d | 25 | .rdata ${RELOCATING+ ${DATA_ADDR}} : { |
42b5c739 ILT |
26 | *(.rdata) |
27 | } | |
28 | .data ${RELOCATING+ .} : { | |
29 | *(.data) | |
ef868186 | 30 | ${CONSTRUCTING+CONSTRUCTORS} |
42b5c739 | 31 | } |
388d8904 | 32 | ${RELOCATING+ _gp = . + 0x8000;} |
42b5c739 ILT |
33 | .lit8 ${RELOCATING+ .} : { |
34 | *(.lit8) | |
35 | } | |
36 | .lit4 ${RELOCATING+ .} : { | |
37 | *(.lit4) | |
38 | } | |
39 | .sdata ${RELOCATING+ .} : { | |
40 | *(.sdata) | |
41 | } | |
388d8904 | 42 | ${RELOCATING+ edata = .;} |
5b7876fe | 43 | ${RELOCATING+ _edata = .;} |
17200030 | 44 | ${RELOCATING+ ${BSS_VAR}} |
42b5c739 ILT |
45 | .sbss ${RELOCATING+ .} : { |
46 | *(.sbss) | |
e193c31b | 47 | *(.scommon) |
42b5c739 ILT |
48 | } |
49 | .bss ${RELOCATING+ .} : { | |
50 | *(.bss) | |
51 | *(COMMON) | |
52 | } | |
388d8904 | 53 | ${RELOCATING+ end = .;} |
5b7876fe | 54 | ${RELOCATING+ _end = .;} |
42b5c739 ILT |
55 | } |
56 | EOF |