* mips.sc-sh: Don't define BSS_VAR unless relocating.
[deliverable/binutils-gdb.git] / ld / mips.sc-sh
CommitLineData
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.
5test -z "$ENTRY" && ENTRY=__start
6test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x400000 + SIZEOF_HEADERS"
7test -z "$DATA_ADDR" && DATA_ADDR=0x10000000
8test -z "$BSS_VAR" && BSS_VAR=
42b5c739
ILT
9cat <<EOF
10OUTPUT_FORMAT("${OUTPUT_FORMAT}")
11${LIB_SEARCH_DIRS}
12
ce7d4b0d 13ENTRY(${ENTRY})
42b5c739
ILT
14
15SECTIONS
16{
ce7d4b0d 17 .text ${RELOCATING+ ${TEXT_START_ADDR}} : {
42b5c739
ILT
18 *(.init)
19 ${RELOCATING+ eprol = .};
20 *(.text)
21 *(.fini)
22 ${RELOCATING+ etext = .};
23 }
ce7d4b0d 24 .rdata ${RELOCATING+ ${DATA_ADDR}} : {
42b5c739
ILT
25 *(.rdata)
26 }
27 .data ${RELOCATING+ .} : {
28 *(.data)
ef868186 29 ${CONSTRUCTING+CONSTRUCTORS}
42b5c739 30 }
388d8904 31 ${RELOCATING+ _gp = . + 0x8000;}
42b5c739
ILT
32 .lit8 ${RELOCATING+ .} : {
33 *(.lit8)
34 }
35 .lit4 ${RELOCATING+ .} : {
36 *(.lit4)
37 }
38 .sdata ${RELOCATING+ .} : {
39 *(.sdata)
40 }
388d8904 41 ${RELOCATING+ edata = .;}
17200030 42 ${RELOCATING+ ${BSS_VAR}}
42b5c739
ILT
43 .sbss ${RELOCATING+ .} : {
44 *(.sbss)
e193c31b 45 *(.scommon)
42b5c739
ILT
46 }
47 .bss ${RELOCATING+ .} : {
48 *(.bss)
49 *(COMMON)
50 }
388d8904 51 ${RELOCATING+ end = .;}
42b5c739
ILT
52}
53EOF
This page took 0.037736 seconds and 4 git commands to generate.