|
Last change
on this file since 2619 was 607, checked in by bird, 22 years ago |
|
Initial revision
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
|
|
File size:
1.4 KB
|
| Line | |
|---|
| 1 | TORS=".tors :
|
|---|
| 2 | {
|
|---|
| 3 | ___ctors = . ;
|
|---|
| 4 | *(.ctors)
|
|---|
| 5 | ___ctors_end = . ;
|
|---|
| 6 | ___dtors = . ;
|
|---|
| 7 | *(.dtors)
|
|---|
| 8 | ___dtors_end = . ;
|
|---|
| 9 | } > ram"
|
|---|
| 10 |
|
|---|
| 11 | cat <<EOF
|
|---|
| 12 | OUTPUT_FORMAT("${OUTPUT_FORMAT}")
|
|---|
| 13 | OUTPUT_ARCH(h8300sn)
|
|---|
| 14 | ENTRY("_start")
|
|---|
| 15 |
|
|---|
| 16 | MEMORY
|
|---|
| 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 |
|
|---|
| 29 | SECTIONS
|
|---|
| 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 | .text :
|
|---|
| 42 | {
|
|---|
| 43 | *(.rodata)
|
|---|
| 44 | *(.text)
|
|---|
| 45 | *(.strings)
|
|---|
| 46 | ${RELOCATING+ _etext = . ; }
|
|---|
| 47 | } ${RELOCATING+ > ram}
|
|---|
| 48 |
|
|---|
| 49 | ${CONSTRUCTING+${TORS}}
|
|---|
| 50 |
|
|---|
| 51 | .data :
|
|---|
| 52 | {
|
|---|
| 53 | *(.data)
|
|---|
| 54 | *(.tiny)
|
|---|
| 55 | ${RELOCATING+ _edata = . ; }
|
|---|
| 56 | } ${RELOCATING+ > ram}
|
|---|
| 57 |
|
|---|
| 58 | .bss :
|
|---|
| 59 | {
|
|---|
| 60 | ${RELOCATING+ _bss_start = . ;}
|
|---|
| 61 | *(.bss)
|
|---|
| 62 | *(COMMON)
|
|---|
| 63 | ${RELOCATING+ _end = . ; }
|
|---|
| 64 | } ${RELOCATING+ >ram}
|
|---|
| 65 |
|
|---|
| 66 | .stack :
|
|---|
| 67 | {
|
|---|
| 68 | ${RELOCATING+ _stack = . ; }
|
|---|
| 69 | *(.stack)
|
|---|
| 70 | } ${RELOCATING+ > topram}
|
|---|
| 71 |
|
|---|
| 72 | .eight :
|
|---|
| 73 | {
|
|---|
| 74 | *(.eight)
|
|---|
| 75 | } ${RELOCATING+ > eight}
|
|---|
| 76 |
|
|---|
| 77 | .stab 0 ${RELOCATING+(NOLOAD)} :
|
|---|
| 78 | {
|
|---|
| 79 | [ .stab ]
|
|---|
| 80 | }
|
|---|
| 81 |
|
|---|
| 82 | .stabstr 0 ${RELOCATING+(NOLOAD)} :
|
|---|
| 83 | {
|
|---|
| 84 | [ .stabstr ]
|
|---|
| 85 | }
|
|---|
| 86 | }
|
|---|
| 87 | EOF
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.