Add support for DragonFlyBSD target.
[binutils.git] / ld / scripttempl / h8300s.sc
blobe07253d9bf9c6cc245ec53c9e71461f41a0065ab
1 TORS=".tors :
2         {
3           ___ctors = . ;
4           *(.ctors)
5           ___ctors_end = . ;
6           ___dtors = . ;
7           *(.dtors)
8           ___dtors_end = . ;
9         } > ram"
11 cat <<EOF
12 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
13 OUTPUT_ARCH(h8300s)
14 ${RELOCATING+ENTRY ("_start")}
16 /* The memory size is 256KB to coincide with the simulator.
17    Don't change either without considering the other.  */
19 MEMORY
21         /* 0xc4 is a magic entry.  We should have the linker just
22            skip over it one day...  */
23         vectors : o = 0x0000, l = 0xc4
24         magicvectors : o = 0xc4, l = 0x3c
25         /* We still only use 256k as the main ram size.  */
26         ram    : o = 0x0100, l = 0x3fefc
27         /* The stack starts at the top of main ram.  */
28         topram : o = 0x3fffc, l = 0x4
29         /* This holds variables in the "tiny" sections.  */
30         tiny   : o = 0xff8000, l = 0x7f00
31         /* At the very top of the address space is the 8-bit area.  */
32         eight  : o = 0xffff00, l = 0x100
35 SECTIONS
37 .vectors :
38         {
39           /* Use something like this to place a specific
40              function's address into the vector table.
42              LONG (ABSOLUTE (_foobar)).  */
44           *(.vectors)
45         } ${RELOCATING+ > vectors}
47 .text :
48         {
49           *(.rodata)
50           *(.text)
51           *(.strings)
52           ${RELOCATING+ _etext = . ; }
53         } ${RELOCATING+ > ram}
55 ${CONSTRUCTING+${TORS}}
57 .data :
58         {
59           *(.data)
60           ${RELOCATING+ _edata = . ; }
61         } ${RELOCATING+ > ram}
63 .bss :
64         {
65           ${RELOCATING+ _bss_start = . ;}
66           *(.bss)
67           *(COMMON)
68           ${RELOCATING+ _end = . ;  }
69         } ${RELOCATING+ >ram}
71 .stack :
72         {
73           ${RELOCATING+ _stack = . ; }
74           *(.stack)
75         } ${RELOCATING+ > topram}
77 .tiny :
78         {
79           *(.tiny)
80         } ${RELOCATING+ > tiny}
82 .eight :
83         {
84           *(.eight)
85         } ${RELOCATING+ > eight}
87 .stab 0 ${RELOCATING+(NOLOAD)} :
88         {
89           [ .stab ]
90         }
92 .stabstr 0 ${RELOCATING+(NOLOAD)} :
93         {
94           [ .stabstr ]
95         }
97 EOF