]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - ld/scripttempl/h8300s.sc
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / ld / scripttempl / h8300s.sc
CommitLineData
219d1afa 1# Copyright (C) 2014-2018 Free Software Foundation, Inc.
6c19b93b 2#
985743c7
NC
3# Copying and distribution of this file, with or without modification,
4# are permitted in any medium without royalty provided the copyright
5# notice and this notice are preserved.
6
40a633d5 7TORS=".tors :
1ce7de8b
KH
8 {
9 ___ctors = . ;
10 *(.ctors)
11 ___ctors_end = . ;
12 ___dtors = . ;
13 *(.dtors)
14 ___dtors_end = . ;
15 } > ram"
40a633d5 16
252b5132 17cat <<EOF
219d1afa 18/* Copyright (C) 2014-2018 Free Software Foundation, Inc.
985743c7
NC
19
20 Copying and distribution of this script, with or without modification,
21 are permitted in any medium without royalty provided the copyright
22 notice and this notice are preserved. */
23
252b5132
RH
24OUTPUT_FORMAT("${OUTPUT_FORMAT}")
25OUTPUT_ARCH(h8300s)
596d6d91 26${RELOCATING+ENTRY ("_start")}
252b5132
RH
27
28/* The memory size is 256KB to coincide with the simulator.
29 Don't change either without considering the other. */
30
31MEMORY
32{
60c6797e
KH
33 /* 0xc4 is a magic entry. We should have the linker just
34 skip over it one day... */
35 vectors : o = 0x0000, l = 0xc4
36 magicvectors : o = 0xc4, l = 0x3c
252b5132
RH
37 /* We still only use 256k as the main ram size. */
38 ram : o = 0x0100, l = 0x3fefc
39 /* The stack starts at the top of main ram. */
40 topram : o = 0x3fffc, l = 0x4
41 /* This holds variables in the "tiny" sections. */
42 tiny : o = 0xff8000, l = 0x7f00
43 /* At the very top of the address space is the 8-bit area. */
44 eight : o = 0xffff00, l = 0x100
45}
46
60c6797e
KH
47SECTIONS
48{
40a633d5 49.vectors :
1ce7de8b 50 {
60c6797e
KH
51 /* Use something like this to place a specific
52 function's address into the vector table.
252b5132 53
40a633d5 54 LONG (ABSOLUTE (_foobar)). */
252b5132 55
40a633d5 56 *(.vectors)
252b5132 57 } ${RELOCATING+ > vectors}
60c6797e 58
40a633d5 59.text :
60c6797e
KH
60 {
61 *(.rodata)
62 *(.text)
40a633d5 63 *(.strings)
6c19b93b 64 ${RELOCATING+ _etext = . ; }
252b5132 65 } ${RELOCATING+ > ram}
60c6797e 66
1ce7de8b 67${CONSTRUCTING+${TORS}}
60c6797e 68
40a633d5
NC
69.data :
70 {
71 *(.data)
72 ${RELOCATING+ _edata = . ; }
252b5132 73 } ${RELOCATING+ > ram}
60c6797e 74
40a633d5
NC
75.bss :
76 {
77 ${RELOCATING+ _bss_start = . ;}
78 *(.bss)
79 *(COMMON)
80 ${RELOCATING+ _end = . ; }
252b5132 81 } ${RELOCATING+ >ram}
60c6797e 82
40a633d5
NC
83.stack :
84 {
85 ${RELOCATING+ _stack = . ; }
86 *(.stack)
252b5132 87 } ${RELOCATING+ > topram}
60c6797e 88
40a633d5
NC
89.tiny :
90 {
91 *(.tiny)
252b5132 92 } ${RELOCATING+ > tiny}
60c6797e 93
40a633d5
NC
94.eight :
95 {
96 *(.eight)
252b5132 97 } ${RELOCATING+ > eight}
60c6797e 98
40a633d5
NC
99.stab 0 ${RELOCATING+(NOLOAD)} :
100 {
101 [ .stab ]
252b5132 102 }
60c6797e 103
40a633d5
NC
104.stabstr 0 ${RELOCATING+(NOLOAD)} :
105 {
106 [ .stabstr ]
252b5132
RH
107 }
108}
109EOF