2000-12-12 H.J. Lu <hjl@gnu.org>
[binutils.git] / ld / scripttempl / h8500c.sc
blobbc6964999860bd90b1b50cd7a695bf2fccccc60f
1 TORS="
2     ___ctors = . ;
3     *(.ctors)
4     ___ctors_end = . ;
5     ___dtors = . ;
6     *(.dtors)
7     ___dtors_end = . ;"
9 cat <<EOF
10 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
11 OUTPUT_ARCH(${ARCH})
13 /* Compact model - code < 64k, data > 64k */
15 SECTIONS                                
16 {                                       
17 .text 0x10000 :
18         {                                       
19           *(.text)                              
20           *(.strings)
21          ${RELOCATING+ _etext = . ; }
22         } ${RELOCATING+ > ram}
25 .data 0x20000 :
26         {
27         *(.data)
28         ${RELOCATING+ _edata = . ; }
29         } ${RELOCATING+ > ram}
31 .rdata 0x30000  :
32        {
33         *(.rdata); 
34           
35         ${CONSTRUCTING+${TORS}}
36         }  ${RELOCATING+ > ram}
38 .bss  0x40000 :
39         {
40         ${RELOCATING+ __start_bss = . ; }
41         *(.bss)
42         *(COMMON)
43         ${RELOCATING+ _end = . ;  }
44         } ${RELOCATING+ >ram}
45 .stack 0x5fff0 :
46         {
47         ${RELOCATING+ _stack = . ; }
48         *(.stack)
49         } ${RELOCATING+ > topram}
51   .stab  0 ${RELOCATING+(NOLOAD)} : 
52   {
53     [ .stab ]
54   }
55   .stabstr  0 ${RELOCATING+(NOLOAD)} :
56   {
57     [ .stabstr ]
58   }
60 EOF