summaryrefslogtreecommitdiff
path: root/ld/scripttempl/z80.sc
blob: 3e2c48bdc6b0f2257f391bf87e707c866bfdccae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright (C) 2014-2023 Free Software Foundation, Inc.
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.

if test "${OUTPUT_FORMAT}" = "elf32-z80"; then
  NO_REL_RELOCS=1
  NO_RELA_RELOCS=1
  NO_SMALL_DATA=1
  EMBEDDED=1
  ALIGNMENT=1
  . $srcdir/scripttempl/elf.sc
  return 0
fi

cat << EOF
/* Copyright (C) 2014-2023 Free Software Foundation, Inc.

   Copying and distribution of this script, with or without modification,
   are permitted in any medium without royalty provided the copyright
   notice and this notice are preserved.  */

OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH("${ARCH}")
SECTIONS
{
.isr :	{
	${RELOCATING+ __Labs = .;}
	*(.isr)
	*(isr)
	${RELOCATING+ __Habs = .;}
	}
.text :	{
	${RELOCATING+ __Ltext = .;}
	*(.text)
	*(text)
	${RELOCATING+ __Htext = .;}
	}
.data :	{
	${RELOCATING+ __Ldata = .;}
	*(.data)
	*(data)
	${RELOCATING+ __Hdata = .;}
	}
.bss :	{
	${RELOCATING+ __Lbss = .;}
	*(.bss)
	*(bss)
	${RELOCATING+ __Hbss = .;}
	}
}
EOF