1# Copyright (C) 2014-2016 Free Software Foundation, Inc.
2#
3# Copying and distribution of this file, with or without modification,
4# are permitted in any medium without royalty provided the copyright
5# notice and this notice are preserved.
6
7cat <<EOF
8/* Copyright (C) 2014-2016 Free Software Foundation, Inc.
9
10   Copying and distribution of this script, with or without modification,
11   are permitted in any medium without royalty provided the copyright
12   notice and this notice are preserved.  */
13
14OUTPUT_FORMAT("${OUTPUT_FORMAT}")
15OUTPUT_ARCH("${OUTPUT_ARCH}")
16${RELOCATING+ENTRY (_start)}
17
18SECTIONS
19{
20.text ${BIG+ ${RELOCATING+ 0x0000000}} :
21	{
22	  *(.text)
23	  *(.strings)
24	  *(.rdata)
25	}
26
27.ctors ${BIG+ ${RELOCATING+ 0x2000000}}  :
28	{
29	  ${CONSTRUCTING+ ___ctors = . ;  }
30	  *(.ctors);
31	  ${CONSTRUCTING+ ___ctors_end = . ; }
32	  ___dtors = . ;
33	  *(.dtors);
34	  ${CONSTRUCTING+ ___dtors_end = . ; }
35	}
36
37.data ${BIG+ ${RELOCATING+ 0x3000000}} :
38	{
39	   *(.data)
40	}
41
42.bss ${BIG+ ${RELOCATING+ 0x4000000}} :
43	{
44	  ${RELOCATING+ __start_bss = . ; }
45	  *(.bss);
46	  *(COMMON);
47	  ${RELOCATING+ __end_bss = . ; }
48	}
49
50.heap ${BIG+ ${RELOCATING+ 0x5000000}} :
51	{
52	  ${RELOCATING+ __start_heap = . ; }
53	  ${RELOCATING+ . = . + 20k  ; }
54	  ${RELOCATING+ __end_heap = . ; }
55	}
56
57.stack ${RELOCATING+ 0xf000 }  :
58	{
59	  ${RELOCATING+ _stack = . ; }
60	  *(.stack)
61	  ${RELOCATING+ __stack_top = . ; }
62	}
63
64}
65EOF
66
67
68
69
70