1# Copyright (C) 2014-2017 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
7TORS=".tors :
8  {
9    ___ctors = . ;
10    *(.ctors)
11    ___ctors_end = . ;
12    ___dtors = . ;
13    *(.dtors)
14    ___dtors_end = . ;
15  } > ram"
16
17cat <<EOF
18/* Copyright (C) 2014-2017 Free Software Foundation, Inc.
19
20   Copying and distribution of this script, with or without modification,
21   are permitted in any medium without royalty provided the copyright
22   notice and this notice are preserved.  */
23
24OUTPUT_FORMAT("${OUTPUT_FORMAT}")
25OUTPUT_ARCH(${ARCH})
26
27MEMORY
28{
29	ram   : o = 0x1000, l = 512k
30}
31
32SECTIONS 				
33{ 					
34.text :
35	{ 					
36	  *(.text) 				
37	  *(.strings)
38   	  ${RELOCATING+ _etext = . ; }
39	} ${RELOCATING+ > ram}
40
41	${CONSTRUCTING+${TORS}}
42
43.data  :
44	{
45	  *(.data)
46	  ${RELOCATING+ _edata = . ; }
47	} ${RELOCATING+ > ram}
48	
49.bss  :
50	{
51	  ${RELOCATING+ _bss_start = . ; }
52	  *(.bss)
53	  *(COMMON)
54	  ${RELOCATING+ _end = . ;  }
55	} ${RELOCATING+ >ram}
56	
57.stack ${RELOCATING+ 0x30000 } :
58	{
59	  ${RELOCATING+ _stack = . ; }
60	  *(.stack)
61	} ${RELOCATING+ > ram}
62	
63.stab  . (NOLOAD) :
64	{
65	  [ .stab ]
66	}
67	
68.stabstr  . (NOLOAD) :
69	{
70	  [ .stabstr ]
71	}
72}
73EOF
74
75
76
77
78