* scripttempl/h8300.sc: Set the entry point to the value of
[external/binutils.git] / ld / scripttempl / h8300.sc
1 cat <<EOF
2 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
3 OUTPUT_ARCH(${ARCH})
4 ENTRY("_start")
5
6 MEMORY
7 {
8         /* 0xc4 is a magic entry.  We should have the linker just
9            skip over it one day... */
10         vectors : o = 0x0000, l = 0xc4
11         magicvectors : o = 0xc4, l = 0x3c
12         ram    : o = 0x0100, l = 0xfdfc
13         /* The stack starts at the top of main ram.  */
14         topram : o = 0xfefc, l = 0x4
15         /* At the very to of the address space is the 8-bit area.  */
16         eight : o = 0xff00, l = 0x100
17 }
18
19 SECTIONS                                
20 {                                       
21 .vectors : {
22         /* Use something like this to place a specific function's address
23            into the vector table. 
24
25         SHORT(ABSOLUTE(_foobar)) */
26
27         *(.vectors)
28         } ${RELOCATING+ > vectors}
29
30 .text : {                                       
31         *(.rodata)                              
32         *(.text)                                
33         *(.strings)
34         ${RELOCATING+ _etext = . ; }
35         } ${RELOCATING+ > ram}
36 .tors : {
37         ___ctors = . ;
38         *(.ctors)
39         ___ctors_end = . ;
40         ___dtors = . ;
41         *(.dtors)
42         ___dtors_end = . ;
43         } ${RELOCATING+ > ram}
44 .data : {
45         *(.data)
46         ${RELOCATING+ _edata = . ; }
47         } ${RELOCATING+ > ram}
48 .bss : {
49         ${RELOCATING+ _bss_start = . ;}
50         *(.bss)
51         *(COMMON)
52         ${RELOCATING+ _end = . ;  }
53         } ${RELOCATING+ >ram}
54 .stack : {
55         ${RELOCATING+ _stack = . ; }
56         *(.stack)
57         } ${RELOCATING+ > topram}
58 .eight : {
59         *(.eight)
60         } ${RELOCATING+ > eight}
61 .stab 0 ${RELOCATING+(NOLOAD)} : {
62         [ .stab ]
63         }
64 .stabstr 0 ${RELOCATING+(NOLOAD)} : {
65         [ .stabstr ]
66         }
67 }
68 EOF