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