1 # Linker script for MIPS systems.
2 # Ian Lance Taylor <ian@cygnus.com>.
4 # Copyright (C) 2014-2017 Free Software Foundation, Inc.
6 # Copying and distribution of this file, with or without modification,
7 # are permitted in any medium without royalty provided the copyright
8 # notice and this notice are preserved.
10 # These variables may be overridden by the emulation file. The
11 # defaults are appropriate for a DECstation running Ultrix.
13 test -z "$ENTRY" && ENTRY=__start
15 if [ -z "$EMBEDDED" ]; then
16 test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x400000 + SIZEOF_HEADERS"
18 test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x400000"
20 if test "x$LD_FLAG" = "xn" -o "x$LD_FLAG" = "xN"; then
23 test -z "$DATA_ADDR" && DATA_ADDR=0x10000000
27 /* Copyright (C) 2014-2017 Free Software Foundation, Inc.
29 Copying and distribution of this script, with or without modification,
30 are permitted in any medium without royalty provided the copyright
31 notice and this notice are preserved. */
33 OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
34 "${LITTLE_OUTPUT_FORMAT}")
37 ${RELOCATING+ENTRY (${ENTRY})}
41 ${RELOCATING+. = ${TEXT_START_ADDR};}
43 ${RELOCATING+ _ftext = . };
45 ${RELOCATING+ eprol = .};
48 ${RELOCATING+ etext = .};
49 ${RELOCATING+ _etext = .};
51 ${RELOCATING+. = ${DATA_ADDR};}
55 ${RELOCATING+ _fdata = ALIGN(16);}
58 ${CONSTRUCTING+CONSTRUCTORS}
60 ${RELOCATING+ HIDDEN (_gp = ALIGN (16) + 0x8000);}
70 ${RELOCATING+ edata = .;}
71 ${RELOCATING+ _edata = .;}
72 ${RELOCATING+ _fbss = .;}
81 ${RELOCATING+ end = .;}
82 ${RELOCATING+ _end = .;}