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
7cat <<EOF
8/* Copyright (C) 2014-2017 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(${ARCH})
16${RELOCATING+ENTRY ("_start")}
17MEMORY
18{
19	vectarea : o =0xc00000, l = 0x0300 
20	
21	introm    : o = 0xc00300, l = 0x16000
22	/* The stack starts at the top of main ram.  */
23	
24	dram   : o = 0x8000 , l = 0xffff
25	/* At the very top of the address space is the 8-bit area.  */
26         	
27         ldata  : o =0x4000 ,l = 0x0200
28}
29SECTIONS
30{
31/*.vects :
32        {
33        *(.vects)
34       } ${RELOCATING+ > vectarea} */
35.init :
36        {
37          *(.init)
38        } ${RELOCATING+ >introm}
39 
40.text :
41	{
42	  *(.rodata) 
43	  *(.text.*)
44	  *(.text)
45	  	  ${RELOCATING+ _etext = . ; }
46	} ${RELOCATING+ > introm}
47.data :
48	{
49	  *(.data)
50	  *(.data.*)
51	  
52	  ${RELOCATING+ _edata = . ; }
53	} ${RELOCATING+ > dram}
54
55.bss :
56	{
57	  ${RELOCATING+ _bss_start = . ;}
58	  *(.bss)
59	  *(COMMON)
60	  ${RELOCATING+ _end = . ;  }
61	} ${RELOCATING+ > dram}
62
63 .ldata :
64         {
65          *(.ldata)
66         } ${RELOCATING+ > ldata}
67
68  
69  .vects :
70          {
71          *(.vects)
72       } ${RELOCATING+ > vectarea}
73
74
75}
76EOF
77