source: trunk/binutils/ld/scripttempl/h8300.sc@ 3003

Last change on this file since 3003 was 610, checked in by bird, 22 years ago

This commit was generated by cvs2svn to compensate for changes in r609,
which included commits to RCS files with non-trunk default branches.

  • Property cvs2svn:cvs-rev set to 1.1.1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 1.4 KB
Line 
1TORS=".tors :
2 {
3 ___ctors = . ;
4 *(.ctors)
5 ___ctors_end = . ;
6 ___dtors = . ;
7 *(.dtors)
8 ___dtors_end = . ;
9 } > ram"
10
11cat <<EOF
12OUTPUT_FORMAT("${OUTPUT_FORMAT}")
13OUTPUT_ARCH(${ARCH})
14ENTRY("_start")
15
16MEMORY
17{
18 /* 0xc4 is a magic entry. We should have the linker just
19 skip over it one day... */
20 vectors : o = 0x0000, l = 0xc4
21 magicvectors : o = 0xc4, l = 0x3c
22 ram : o = 0x0100, l = 0xfdfc
23 /* The stack starts at the top of main ram. */
24 topram : o = 0xfefc, l = 0x4
25 /* At the very top of the address space is the 8-bit area. */
26 eight : o = 0xff00, l = 0x100
27}
28
29SECTIONS
30{
31.vectors :
32 {
33 /* Use something like this to place a specific
34 function's address into the vector table.
35
36 SHORT (ABSOLUTE (_foobar)). */
37
38 *(.vectors)
39 } ${RELOCATING+ > vectors}
40
41.init :
42 {
43 *(.init)
44 } ${RELOCATING+ > ram}
45
46.text :
47 {
48 *(.rodata)
49 *(.text)
50 *(.text.*)
51 *(.strings)
52 ${RELOCATING+ _etext = . ; }
53 } ${RELOCATING+ > ram}
54
55${CONSTRUCTING+${TORS}}
56
57.data :
58 {
59 *(.data)
60 *(.data.*)
61 *(.tiny)
62 ${RELOCATING+ _edata = . ; }
63 } ${RELOCATING+ > ram}
64
65.bss :
66 {
67 ${RELOCATING+ _bss_start = . ;}
68 *(.bss)
69 *(COMMON)
70 ${RELOCATING+ _end = . ; }
71 } ${RELOCATING+ >ram}
72
73.stack :
74 {
75 ${RELOCATING+ _stack = . ; }
76 *(.stack)
77 } ${RELOCATING+ > topram}
78
79.eight :
80 {
81 *(.eight)
82 } ${RELOCATING+ > eight}
83
84.stab 0 ${RELOCATING+(NOLOAD)} :
85 {
86 [ .stab ]
87 }
88
89.stabstr 0 ${RELOCATING+(NOLOAD)} :
90 {
91 [ .stabstr ]
92 }
93}
94EOF
Note: See TracBrowser for help on using the repository browser.