aboutsummaryrefslogtreecommitdiff
path: root/ld/mips.sc-sh
blob: 0926db5b300ed73e1fd07414f5e3c06dae4bdd02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Linker script for MIPS systems.
# Ian Lance Taylor <ian@cygnus.com>.
# These variables may be overridden by the emulation file.  The
# defaults are appropriate for a DECstation running Ultrix.
test -z "$ENTRY" && ENTRY=__start
test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x400000 + SIZEOF_HEADERS"
test -z "$DATA_ADDR" && DATA_ADDR=0x10000000
test -z "$BSS_VAR" && BSS_VAR=
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
${LIB_SEARCH_DIRS}

ENTRY(${ENTRY})

SECTIONS
{
  .text ${RELOCATING+ ${TEXT_START_ADDR}} : {
    *(.init)
    ${RELOCATING+ eprol  =  .};
    *(.text)
    *(.fini)
    ${RELOCATING+ etext  =  .};
    ${RELOCATING+ _etext  =  .};
  }
  .rdata ${RELOCATING+ ${DATA_ADDR}} : {
    *(.rdata)
  }
  .data ${RELOCATING+ .} : {
    *(.data)
    ${CONSTRUCTING+CONSTRUCTORS}
  }
  ${RELOCATING+ _gp = . + 0x8000;}
  .lit8 ${RELOCATING+ .} : {
    *(.lit8)
  }
  .lit4 ${RELOCATING+ .} : {
    *(.lit4)
  }
  .sdata ${RELOCATING+ .} : {
    *(.sdata)
  }
  ${RELOCATING+ edata  =  .;}
  ${RELOCATING+ _edata  =  .;}
  ${RELOCATING+ ${BSS_VAR}}
  .sbss ${RELOCATING+ .} : {
    *(.sbss)
    *(.scommon)
  }
  .bss ${RELOCATING+ .} : {
    *(.bss)
    *(COMMON)
  }
  ${RELOCATING+ end = .;}
  ${RELOCATING+ _end = .;}
}
EOF