xref: /netbsd-src/external/gpl3/binutils.old/dist/ld/scripttempl/z80.sc (revision cef8759bd76c1b621f8eab8faa6f208faabc2e15)
1# Copyright (C) 2014-2018 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 [ x${LD_FLAG} = x ]
8then
9cat << EOF
10/* Copyright (C) 2014-2018 Free Software Foundation, Inc.
11
12   Copying and distribution of this script, with or without modification,
13   are permitted in any medium without royalty provided the copyright
14   notice and this notice are preserved.  */
15
16/* Create a cp/m executable; load and execute at 0x100.  */
17OUTPUT_FORMAT("binary")
18. = 0x100;
19__Ltext = .;
20ENTRY (__Ltext)
21EOF
22else
23    echo "OUTPUT_FORMAT(\"${OUTPUT_FORMAT}\")"
24fi
25cat <<EOF
26OUTPUT_ARCH("${OUTPUT_ARCH}")
27SECTIONS
28{
29.text :	{
30	*(.text)
31	*(text)
32	${RELOCATING+ __Htext = .;}
33	}
34.data :	{
35	${RELOCATING+ __Ldata = .;}
36	*(.data)
37	*(data)
38	${RELOCATING+ __Hdata = .;}
39	}
40.bss :	{
41	${RELOCATING+ __Lbss = .;}
42	*(.bss)
43	*(bss)
44	${RELOCATING+ __Hbss = .;}
45	}
46}
47EOF
48