xref: /netbsd-src/external/gpl3/binutils/dist/ld/scripttempl/z80.sc (revision cb63e24e8d6aae7ddac1859a9015f48b1d8bd90e)
1# Copyright (C) 2014-2024 Free Software Foundation, Inc.
2#
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
7if test "${OUTPUT_FORMAT}" = "elf32-z80"; then
8  NO_REL_RELOCS=1
9  NO_RELA_RELOCS=1
10  NO_SMALL_DATA=1
11  EMBEDDED=1
12  ALIGNMENT=1
13  source_sh $srcdir/scripttempl/elf.sc
14  return 0
15fi
16
17cat << EOF
18/* Copyright (C) 2014-2024 Free Software Foundation, Inc.
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
24OUTPUT_FORMAT("${OUTPUT_FORMAT}")
25OUTPUT_ARCH("${ARCH}")
26SECTIONS
27{
28.isr :	{
29	${RELOCATING+ __Labs = .;}
30	*(.isr)
31	*(isr)
32	${RELOCATING+ __Habs = .;}
33	}
34.text :	{
35	${RELOCATING+ __Ltext = .;}
36	*(.text)
37	*(text)
38	${RELOCATING+ __Htext = .;}
39	}
40.data :	{
41	${RELOCATING+ __Ldata = .;}
42	*(.data)
43	*(data)
44	${RELOCATING+ __Hdata = .;}
45	}
46.bss :	{
47	${RELOCATING+ __Lbss = .;}
48	*(.bss)
49	*(bss)
50	${RELOCATING+ __Hbss = .;}
51	}
52EOF
53
54source_sh $srcdir/scripttempl/misc-sections.sc
55source_sh $srcdir/scripttempl/DWARF.sc
56
57cat <<EOF
58}
59EOF
60