Initial revision
[binutils.git] / ld / scripttempl / h8300.sc
blobf2f876e2835001935fbabe1b91fcf87a6b52295b
1 cat <<EOF
2 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
3 OUTPUT_ARCH(${ARCH})
4 ENTRY("_start")
6 MEMORY
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
19 SECTIONS                                
20 {                                       
21 .vectors : {
22         /* Use something like this to place a specific function's address
23            into the vector table. 
25         SHORT(ABSOLUTE(_foobar)) */
27         *(.vectors)
28         } ${RELOCATING+ > vectors}
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         *(.tiny)
47         ${RELOCATING+ _edata = . ; }
48         } ${RELOCATING+ > ram}
49 .bss : {
50         ${RELOCATING+ _bss_start = . ;}
51         *(.bss)
52         *(COMMON)
53         ${RELOCATING+ _end = . ;  }
54         } ${RELOCATING+ >ram}
55 .stack : {
56         ${RELOCATING+ _stack = . ; }
57         *(.stack)
58         } ${RELOCATING+ > topram}
59 .eight : {
60         *(.eight)
61         } ${RELOCATING+ > eight}
62 .stab 0 ${RELOCATING+(NOLOAD)} : {
63         [ .stab ]
64         }
65 .stabstr 0 ${RELOCATING+(NOLOAD)} : {
66         [ .stabstr ]
67         }
69 EOF