1# $MirOS: src/gnu/usr.bin/binutils/ld/scripttempl/h8500c.sc,v 1.2 2005/03/13 16:07:07 tg Exp $
2#
3TORS="
4    ___ctors = . ;
5    *(.ctors)
6    ___ctors_end = . ;
7    ___dtors = . ;
8    *(.dtors)
9    ___dtors_end = . ;"
10
11cat <<EOF
12OUTPUT_FORMAT("${OUTPUT_FORMAT}")
13OUTPUT_ARCH(${ARCH})
14
15/* Compact model - code < 64k, data > 64k */
16
17SECTIONS
18{
19.text 0x10000 :
20	{
21	  *(.text)
22	  *(.strings)
23	  ${RELOCATING+ _etext = . ; }
24	} ${RELOCATING+ > ram}
25
26.data 0x20000 :
27	{
28	  *(.data)
29	  ${RELOCATING+ _edata = . ; }
30	} ${RELOCATING+ > ram}
31
32.rdata 0x30000  :
33	{
34	  *(.rdata);
35
36	  ${CONSTRUCTING+${TORS}}
37	}  ${RELOCATING+ > ram}
38
39.bss  0x40000 :
40	{
41	  ${RELOCATING+ __start_bss = . ; }
42	  *(.bss)
43	  *(COMMON)
44	  ${RELOCATING+ _end = . ;  }
45	} ${RELOCATING+ >ram}
46
47.stack 0x5fff0 :
48	{
49	  ${RELOCATING+ _stack = . ; }
50	  *(.stack)
51	} ${RELOCATING+ > topram}
52
53.stab  0 ${RELOCATING+\(NOLOAD\)} :
54	{
55	  [ .stab ]
56	}
57
58.stabstr  0 ${RELOCATING+\(NOLOAD\)} :
59	{
60	  [ .stabstr ]
61	}
62}
63EOF
64