]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - ld/emultempl/s390.em
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / ld / emultempl / s390.em
1 # This shell script emits a C file. -*- C -*-
2 # Copyright (C) 2017-2020 Free Software Foundation, Inc.
3 #
4 # This file is part of the GNU Binutils.
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the license, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; see the file COPYING3. If not,
18 # see <http://www.gnu.org/licenses/>.
19 #
20
21 # This file is sourced from elf-generic.em, and defines S/390
22 # specific routines.
23 #
24 fragment <<EOF
25
26 #include "ldctor.h"
27 #include "elf-s390.h"
28
29 static struct s390_elf_params params = { 0 };
30
31 /* This is a convenient point to tell BFD about target specific flags.
32 After the output has been created, but before inputs are read. */
33 static void
34 s390_elf_create_output_section_statements (void)
35 {
36 if (!bfd_elf_s390_set_options (&link_info, &params))
37 einfo (_("%F%P: can not init BFD: %E\n"));
38 }
39
40 EOF
41
42 # Define some shell vars to insert bits of code into the standard elf
43 # parse_args and list_options functions.
44 #
45 PARSE_AND_LIST_PROLOGUE='
46 #define OPTION_PGSTE 301
47 '
48
49 PARSE_AND_LIST_LONGOPTS='
50 { "s390-pgste", no_argument, NULL, OPTION_PGSTE},
51 '
52
53 PARSE_AND_LIST_OPTIONS='
54 fprintf (file, _(" --s390-pgste Tell the kernel to "
55 "allocate 4k page tables\n"));
56 '
57
58 PARSE_AND_LIST_ARGS_CASES='
59 case OPTION_PGSTE:
60 params.pgste = 1;
61 break;
62 '
63
64 LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=s390_elf_create_output_section_statements