Commit | Line | Data |
---|---|---|
5b9c07b2 | 1 | # This shell script emits a C file. -*- C -*- |
b3adc24a | 2 | # Copyright (C) 2019-2020 Free Software Foundation, Inc. |
5b9c07b2 L |
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 | ||
075a2b89 | 21 | # This file is sourced from elf.em, and defines x86 specific routines. |
5b9c07b2 L |
22 | # |
23 | fragment <<EOF | |
24 | ||
74e10d17 | 25 | #include "ldlex.h" |
5b9c07b2 L |
26 | #include "elf-linker-x86.h" |
27 | ||
28 | static struct elf_linker_x86_params params; | |
29 | ||
30 | /* This is a convenient point to tell BFD about target specific flags. | |
31 | After the output has been created, but before inputs are read. */ | |
32 | ||
33 | static void | |
34 | elf_x86_create_output_section_statements (void) | |
35 | { | |
36 | _bfd_elf_linker_x86_set_options (&link_info, ¶ms); | |
37 | } | |
38 | ||
39 | EOF | |
40 | ||
41 | LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=elf_x86_create_output_section_statements | |
42 | ||
43 | if test -n "$CALL_NOP_BYTE"; then | |
44 | ||
45 | fragment <<EOF | |
46 | ||
47 | static void | |
48 | elf_x86_before_parse (void) | |
49 | { | |
50 | params.call_nop_byte = $CALL_NOP_BYTE; | |
51 | ||
52 | gld${EMULATION_NAME}_before_parse (); | |
53 | } | |
54 | ||
55 | EOF | |
56 | ||
57 | LDEMUL_BEFORE_PARSE=elf_x86_before_parse | |
58 | fi |