1*d2201f2fSdrahnTORS=".tors :
2*d2201f2fSdrahn	{
3*d2201f2fSdrahn	  ___ctors = . ;
4*d2201f2fSdrahn	  *(.ctors)
5*d2201f2fSdrahn	  ___ctors_end = . ;
6*d2201f2fSdrahn	  ___dtors = . ;
7*d2201f2fSdrahn	  *(.dtors)
8*d2201f2fSdrahn	  ___dtors_end = . ;
9*d2201f2fSdrahn	} > ram"
10*d2201f2fSdrahn
11*d2201f2fSdrahncat <<EOF
12*d2201f2fSdrahnOUTPUT_FORMAT("${OUTPUT_FORMAT}")
13*d2201f2fSdrahnOUTPUT_ARCH(h8300hn)
14*d2201f2fSdrahnENTRY("_start")
15*d2201f2fSdrahn
16*d2201f2fSdrahnMEMORY
17*d2201f2fSdrahn{
18*d2201f2fSdrahn	/* 0xc4 is a magic entry.  We should have the linker just
19*d2201f2fSdrahn	   skip over it one day...  */
20*d2201f2fSdrahn	vectors : o = 0x0000, l = 0xc4
21*d2201f2fSdrahn	magicvectors : o = 0xc4, l = 0x3c
22*d2201f2fSdrahn	ram    : o = 0x0100, l = 0xfdfc
23*d2201f2fSdrahn	/* The stack starts at the top of main ram.  */
24*d2201f2fSdrahn	topram : o = 0xfefc, l = 0x4
25*d2201f2fSdrahn	/* At the very top of the address space is the 8-bit area.  */
26*d2201f2fSdrahn	eight : o = 0xff00, l = 0x100
27*d2201f2fSdrahn}
28*d2201f2fSdrahn
29*d2201f2fSdrahnSECTIONS
30*d2201f2fSdrahn{
31*d2201f2fSdrahn.vectors :
32*d2201f2fSdrahn	{
33*d2201f2fSdrahn	  /* Use something like this to place a specific
34*d2201f2fSdrahn	     function's address into the vector table.
35*d2201f2fSdrahn
36*d2201f2fSdrahn	     SHORT (ABSOLUTE (_foobar)).  */
37*d2201f2fSdrahn
38*d2201f2fSdrahn	  *(.vectors)
39*d2201f2fSdrahn	} ${RELOCATING+ > vectors}
40*d2201f2fSdrahn
41*d2201f2fSdrahn.text :
42*d2201f2fSdrahn	{
43*d2201f2fSdrahn	  *(.rodata)
44*d2201f2fSdrahn	  *(.text)
45*d2201f2fSdrahn	  *(.strings)
46*d2201f2fSdrahn   	  ${RELOCATING+ _etext = . ; }
47*d2201f2fSdrahn	} ${RELOCATING+ > ram}
48*d2201f2fSdrahn
49*d2201f2fSdrahn${CONSTRUCTING+${TORS}}
50*d2201f2fSdrahn
51*d2201f2fSdrahn.data :
52*d2201f2fSdrahn	{
53*d2201f2fSdrahn	  *(.data)
54*d2201f2fSdrahn	  *(.tiny)
55*d2201f2fSdrahn	  ${RELOCATING+ _edata = . ; }
56*d2201f2fSdrahn	} ${RELOCATING+ > ram}
57*d2201f2fSdrahn
58*d2201f2fSdrahn.bss :
59*d2201f2fSdrahn	{
60*d2201f2fSdrahn	  ${RELOCATING+ _bss_start = . ;}
61*d2201f2fSdrahn	  *(.bss)
62*d2201f2fSdrahn	  *(COMMON)
63*d2201f2fSdrahn	  ${RELOCATING+ _end = . ;  }
64*d2201f2fSdrahn	} ${RELOCATING+ >ram}
65*d2201f2fSdrahn
66*d2201f2fSdrahn.stack :
67*d2201f2fSdrahn	{
68*d2201f2fSdrahn	  ${RELOCATING+ _stack = . ; }
69*d2201f2fSdrahn	  *(.stack)
70*d2201f2fSdrahn	} ${RELOCATING+ > topram}
71*d2201f2fSdrahn
72*d2201f2fSdrahn.eight :
73*d2201f2fSdrahn	{
74*d2201f2fSdrahn	  *(.eight)
75*d2201f2fSdrahn	} ${RELOCATING+ > eight}
76*d2201f2fSdrahn
77*d2201f2fSdrahn.stab 0 ${RELOCATING+(NOLOAD)} :
78*d2201f2fSdrahn	{
79*d2201f2fSdrahn	  [ .stab ]
80*d2201f2fSdrahn	}
81*d2201f2fSdrahn
82*d2201f2fSdrahn.stabstr 0 ${RELOCATING+(NOLOAD)} :
83*d2201f2fSdrahn	{
84*d2201f2fSdrahn	  [ .stabstr ]
85*d2201f2fSdrahn	}
86*d2201f2fSdrahn}
87*d2201f2fSdrahnEOF
88