1# Linker script for Alpha systems.
2# Ian Lance Taylor <ian@cygnus.com>.
3# These variables may be overridden by the emulation file.  The
4# defaults are appropriate for an Alpha running OSF/1.
5#
6# Copyright (C) 2014-2016 Free Software Foundation, Inc.
7#
8# Copying and distribution of this file, with or without modification,
9# are permitted in any medium without royalty provided the copyright
10# notice and this notice are preserved.
11
12test -z "$ENTRY" && ENTRY=__start
13test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x120000000 + SIZEOF_HEADERS"
14if test "x$LD_FLAG" = "xn" -o "x$LD_FLAG" = "xN"; then
15  DATA_ADDR=.
16else
17  test -z "$DATA_ADDR" && DATA_ADDR=0x140000000
18fi
19cat <<EOF
20/* Copyright (C) 2014-2016 Free Software Foundation, Inc.
21
22   Copying and distribution of this script, with or without modification,
23   are permitted in any medium without royalty provided the copyright
24   notice and this notice are preserved.  */
25
26OUTPUT_FORMAT("${OUTPUT_FORMAT}")
27${LIB_SEARCH_DIRS}
28
29${RELOCATING+ENTRY (${ENTRY})}
30
31SECTIONS
32{
33  ${RELOCATING+. = ${TEXT_START_ADDR};}
34  .text : {
35    ${RELOCATING+ _ftext = . };
36    ${RELOCATING+ __istart = . };
37    ${RELOCATING+ *(.init) }
38    ${RELOCATING+ LONG (0x6bfa8001)}
39    ${RELOCATING+ eprol  =  .};
40    *(.text)
41    ${RELOCATING+ __fstart = . };
42    ${RELOCATING+ *(.fini)}
43    ${RELOCATING+ LONG (0x6bfa8001)}
44    ${RELOCATING+ _etext  =  .};
45  }
46  .rdata : {
47    *(.rdata)
48  }
49  .rconst : {
50    *(.rconst)
51  }
52  .pdata : {
53    ${RELOCATING+ _fpdata = .;}
54    *(.pdata)
55  }
56  ${RELOCATING+. = ${DATA_ADDR};}
57  .data : {
58    ${RELOCATING+ _fdata = .;}
59    *(.data)
60    ${CONSTRUCTING+CONSTRUCTORS}
61  }
62  .xdata : {
63    *(.xdata)
64  }
65  ${RELOCATING+ _gp = ALIGN (16) + 0x8000;}
66  .lit8 : {
67    *(.lit8)
68  }
69  .lita : {
70    *(.lita)
71  }
72  .sdata : {
73    *(.sdata)
74  }
75  ${RELOCATING+ _EDATA  =  .;}
76  ${RELOCATING+ _FBSS = .;}
77  .sbss : {
78    *(.sbss)
79    *(.scommon)
80  }
81  .bss : {
82    *(.bss)
83    *(COMMON)
84  }
85  ${RELOCATING+ _end = .;}
86}
87EOF
88