aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-01-17 07:46:37 -0800
committerH.J. Lu <hjl.tools@gmail.com>2024-01-19 05:35:16 -0800
commit8d10083c23b9415a6d645b44d136104fcf8ed176 (patch)
treec9903a9e57929b251ff226ae830d2a966986accb /ld/emultempl
parentAdd multilib.am to the list of top level files included in any release create... (diff)
downloadbinutils-gdb-8d10083c23b9415a6d645b44d136104fcf8ed176.tar.gz
binutils-gdb-8d10083c23b9415a6d645b44d136104fcf8ed176.tar.bz2
binutils-gdb-8d10083c23b9415a6d645b44d136104fcf8ed176.zip
ld: Put all emulation options in ldlex.h
For each command line option, parse_args() calls ldemul_parse_args() to check if the command line option is an emulation option. But when there is a conflict between the emulation option value and the default option value, the default command line option will be processed as if the emulation option is used. Remove PARSE_AND_LIST_PROLOGUE and move all emulation options to ldlex.h to avoid conflicts. PR ld/31247 * ldlex.h (option_values): Add all emulation options. * emulparams/elf32mcore.sh (PARSE_AND_LIST_PROLOGUE): Removed. * emulparams/plt_unwind.sh (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/aarch64elf.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/alphaelf.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/armelf.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/avrelf.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/bfin.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/cskyelf.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/hppaelf.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/ia64elf.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/m68hc1xelf.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/m68kelf.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/metagelf.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/mipself.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/nds32elf.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/nto.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/ppc32elf.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/ppc64elf.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/riscvelf.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/rxelf.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/s390.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/scoreelf.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/spuelf.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/tic6xdsbt.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/vxworks.em (PARSE_AND_LIST_PROLOGUE): Likewise. * emultempl/aix.em: Include "ldlex.h". (OPTION_XXX): Removed. (gld${EMULATION_NAME}_read_file): Replace lineno with linenumber. * emultempl/beos.em (OPTION_XXX): Removed. * emultempl/elf.em: Include "ldlex.h". Don't check PARSE_AND_LIST_PROLOGUE. (OPTION_XXX): Removed. * emultempl/msp430.em: Include "ldlex.h". (OPTION_XXX): Removed. * emultempl/pe.em (OPTION_XXX): Removed. * emultempl/pep.em (OPTION_XXX): Likewise. * emultempl/ticoff.em: Include "ldlex.h". (OPTION_XXX): Removed. * emultempl/vms.em: Include "ldlex.h". (OPTION_XXX): Removed. * emultempl/xtensaelf.em (elf32xtensa_size_opt, elf32xtensa_no_literal_movement, elf32xtensa_abi): Moved out of PARSE_AND_LIST_PROLOGUE. (PARSE_AND_LIST_PROLOGUE): Removed.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/aarch64elf.em10
-rw-r--r--ld/emultempl/aix.em50
-rw-r--r--ld/emultempl/alphaelf.em6
-rw-r--r--ld/emultempl/armelf.em25
-rw-r--r--ld/emultempl/avrelf.em9
-rw-r--r--ld/emultempl/beos.em16
-rw-r--r--ld/emultempl/bfin.em5
-rw-r--r--ld/emultempl/cskyelf.em6
-rw-r--r--ld/emultempl/elf.em22
-rw-r--r--ld/emultempl/hppaelf.em5
-rw-r--r--ld/emultempl/ia64elf.em4
-rw-r--r--ld/emultempl/m68hc1xelf.em5
-rw-r--r--ld/emultempl/m68kelf.em4
-rw-r--r--ld/emultempl/metagelf.em4
-rw-r--r--ld/emultempl/mipself.em12
-rw-r--r--ld/emultempl/msp430.em5
-rw-r--r--ld/emultempl/nds32elf.em12
-rw-r--r--ld/emultempl/nto.em8
-rw-r--r--ld/emultempl/pe.em78
-rw-r--r--ld/emultempl/pep.em73
-rw-r--r--ld/emultempl/ppc32elf.em20
-rw-r--r--ld/emultempl/ppc64elf.em35
-rw-r--r--ld/emultempl/riscvelf.em10
-rw-r--r--ld/emultempl/rxelf.em7
-rw-r--r--ld/emultempl/s390.em4
-rw-r--r--ld/emultempl/scoreelf.em1
-rw-r--r--ld/emultempl/spuelf.em24
-rw-r--r--ld/emultempl/tic6xdsbt.em6
-rw-r--r--ld/emultempl/ticoff.em2
-rw-r--r--ld/emultempl/vms.em2
-rw-r--r--ld/emultempl/vxworks.em6
-rw-r--r--ld/emultempl/xtensaelf.em14
32 files changed, 18 insertions, 472 deletions
diff --git a/ld/emultempl/aarch64elf.em b/ld/emultempl/aarch64elf.em
index b647909ae63..aa2859d4f73 100644
--- a/ld/emultempl/aarch64elf.em
+++ b/ld/emultempl/aarch64elf.em
@@ -355,16 +355,6 @@ EOF
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_NO_ENUM_SIZE_WARNING 309
-#define OPTION_PIC_VENEER 310
-#define OPTION_STUBGROUP_SIZE 311
-#define OPTION_NO_WCHAR_SIZE_WARNING 312
-#define OPTION_FIX_ERRATUM_835769 313
-#define OPTION_FIX_ERRATUM_843419 314
-#define OPTION_NO_APPLY_DYNAMIC_RELOCS 315
-'
-
PARSE_AND_LIST_SHORTOPTS=p
PARSE_AND_LIST_LONGOPTS='
diff --git a/ld/emultempl/aix.em b/ld/emultempl/aix.em
index a445c32931d..33857b5d49c 100644
--- a/ld/emultempl/aix.em
+++ b/ld/emultempl/aix.em
@@ -48,6 +48,7 @@ fragment <<EOF
#include "ldexp.h"
#include "ldlang.h"
#include "ldfile.h"
+#include "ldlex.h"
#include "ldemul.h"
#include "ldctor.h"
#include <ldgram.h>
@@ -171,35 +172,6 @@ gld${EMULATION_NAME}_before_parse (void)
/* Handle AIX specific options. */
-enum
- {
- OPTION_IGNORE = 300,
- OPTION_AUTOIMP,
- OPTION_ERNOTOK,
- OPTION_EROK,
- OPTION_EXPALL,
- OPTION_EXPFULL,
- OPTION_EXPORT,
- OPTION_IMPORT,
- OPTION_INITFINI,
- OPTION_LOADMAP,
- OPTION_MAXDATA,
- OPTION_MAXSTACK,
- OPTION_MODTYPE,
- OPTION_NOAUTOIMP,
- OPTION_NOEXPALL,
- OPTION_NOEXPFULL,
- OPTION_NOSTRCMPCT,
- OPTION_PD,
- OPTION_PT,
- OPTION_STRCMPCT,
- OPTION_UNIX,
- OPTION_32,
- OPTION_64,
- OPTION_LIBPATH,
- OPTION_NOLIBPATH,
- };
-
static void
gld${EMULATION_NAME}_add_options
(int ns, char **shortopts, int nl, struct option **longopts,
@@ -1299,7 +1271,7 @@ gld${EMULATION_NAME}_read_file (const char *filename, bool import)
{
struct obstack *o;
FILE *f;
- int lineno;
+ int linenumber;
int c;
bool keep;
const char *imppath;
@@ -1323,7 +1295,7 @@ gld${EMULATION_NAME}_read_file (const char *filename, bool import)
impfile = NULL;
impmember = NULL;
- lineno = 0;
+ linenumber = 0;
/* Default to 32 and 64 bit mode
symbols at top of /lib/syscalls.exp do not have a mode modifier and they
@@ -1347,7 +1319,7 @@ gld${EMULATION_NAME}_read_file (const char *filename, bool import)
}
obstack_1grow (o, '\0');
- ++lineno;
+ ++linenumber;
s = (char *) obstack_base (o);
while (ISSPACE (*s))
@@ -1377,7 +1349,7 @@ gld${EMULATION_NAME}_read_file (const char *filename, bool import)
else if (*s == '(')
einfo (_("%F%P:%s:%d: #! ([member]) is not supported "
"in import files\n"),
- filename, lineno);
+ filename, linenumber);
else
{
char cs;
@@ -1403,7 +1375,7 @@ gld${EMULATION_NAME}_read_file (const char *filename, bool import)
impmember = "";
if (cs != '\0')
einfo (_("%P:%s:%d: warning: syntax error in import file\n"),
- filename, lineno);
+ filename, linenumber);
}
else
{
@@ -1415,7 +1387,7 @@ gld${EMULATION_NAME}_read_file (const char *filename, bool import)
*s = '\0';
else
einfo (_("%P:%s:%d: warning: syntax error in import file\n"),
- filename, lineno);
+ filename, linenumber);
}
}
@@ -1451,7 +1423,7 @@ gld${EMULATION_NAME}_read_file (const char *filename, bool import)
if (*se != '\0')
einfo (_("%P:%s%d: warning: syntax error in "
"import/export file\n"),
- filename, lineno);
+ filename, linenumber);
}
if (s != se)
@@ -1469,7 +1441,7 @@ gld${EMULATION_NAME}_read_file (const char *filename, bool import)
{
einfo (_("%P:%s:%d: warning: syntax error in "
"import/export file\n"),
- filename, lineno);
+ filename, linenumber);
}
}
@@ -1503,7 +1475,7 @@ gld${EMULATION_NAME}_read_file (const char *filename, bool import)
address, imppath, impfile,
impmember, syscall_flag))
einfo (_("%X%P:%s:%d: failed to import symbol %s: %E\n"),
- filename, lineno, symname);
+ filename, linenumber, symname);
}
}
}
@@ -1513,7 +1485,7 @@ gld${EMULATION_NAME}_read_file (const char *filename, bool import)
if (obstack_object_size (o) > 0)
{
einfo (_("%P:%s:%d: warning: ignoring unterminated last line\n"),
- filename, lineno);
+ filename, linenumber);
obstack_free (o, obstack_base (o));
}
diff --git a/ld/emultempl/alphaelf.em b/ld/emultempl/alphaelf.em
index cf32cd4ffa3..0445e798e3d 100644
--- a/ld/emultempl/alphaelf.em
+++ b/ld/emultempl/alphaelf.em
@@ -111,12 +111,6 @@ EOF
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_TASO 300
-#define OPTION_SECUREPLT (OPTION_TASO + 1)
-#define OPTION_NO_SECUREPLT (OPTION_SECUREPLT + 1)
-'
-
PARSE_AND_LIST_LONGOPTS='
{ "taso", no_argument, NULL, OPTION_TASO },
{ "secureplt", no_argument, NULL, OPTION_SECUREPLT },
diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em
index 7fb1826ebed..8f501aed12a 100644
--- a/ld/emultempl/armelf.em
+++ b/ld/emultempl/armelf.em
@@ -566,31 +566,6 @@ EOF
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_THUMB_ENTRY 301
-#define OPTION_BE8 302
-#define OPTION_TARGET1_REL 303
-#define OPTION_TARGET1_ABS 304
-#define OPTION_TARGET2 305
-#define OPTION_FIX_V4BX 306
-#define OPTION_USE_BLX 307
-#define OPTION_VFP11_DENORM_FIX 308
-#define OPTION_NO_ENUM_SIZE_WARNING 309
-#define OPTION_PIC_VENEER 310
-#define OPTION_FIX_V4BX_INTERWORKING 311
-#define OPTION_STUBGROUP_SIZE 312
-#define OPTION_NO_WCHAR_SIZE_WARNING 313
-#define OPTION_FIX_CORTEX_A8 314
-#define OPTION_NO_FIX_CORTEX_A8 315
-#define OPTION_NO_MERGE_EXIDX_ENTRIES 316
-#define OPTION_FIX_ARM1176 317
-#define OPTION_NO_FIX_ARM1176 318
-#define OPTION_LONG_PLT 319
-#define OPTION_STM32L4XX_FIX 320
-#define OPTION_CMSE_IMPLIB 321
-#define OPTION_IN_IMPLIB 322
-'
-
PARSE_AND_LIST_SHORTOPTS=p
PARSE_AND_LIST_LONGOPTS='
diff --git a/ld/emultempl/avrelf.em b/ld/emultempl/avrelf.em
index 3fe81004745..792be729299 100644
--- a/ld/emultempl/avrelf.em
+++ b/ld/emultempl/avrelf.em
@@ -232,15 +232,6 @@ avr_finish (void)
EOF
-PARSE_AND_LIST_PROLOGUE='
-
-#define OPTION_NO_CALL_RET_REPLACEMENT 301
-#define OPTION_PMEM_WRAP_AROUND 302
-#define OPTION_NO_STUBS 303
-#define OPTION_DEBUG_STUBS 304
-#define OPTION_DEBUG_RELAX 305
-'
-
PARSE_AND_LIST_LONGOPTS='
{ "no-call-ret-replacement", no_argument,
NULL, OPTION_NO_CALL_RET_REPLACEMENT},
diff --git a/ld/emultempl/beos.em b/ld/emultempl/beos.em
index 844d4986c2d..29c386c61f8 100644
--- a/ld/emultempl/beos.em
+++ b/ld/emultempl/beos.em
@@ -70,22 +70,6 @@ gld${EMULATION_NAME}_before_parse (void)
/* PE format extra command line options. */
-/* Used for setting flags in the PE header. */
-#define OPTION_BASE_FILE (300 + 1)
-#define OPTION_DLL (OPTION_BASE_FILE + 1)
-#define OPTION_FILE_ALIGNMENT (OPTION_DLL + 1)
-#define OPTION_IMAGE_BASE (OPTION_FILE_ALIGNMENT + 1)
-#define OPTION_MAJOR_IMAGE_VERSION (OPTION_IMAGE_BASE + 1)
-#define OPTION_MAJOR_OS_VERSION (OPTION_MAJOR_IMAGE_VERSION + 1)
-#define OPTION_MAJOR_SUBSYSTEM_VERSION (OPTION_MAJOR_OS_VERSION + 1)
-#define OPTION_MINOR_IMAGE_VERSION (OPTION_MAJOR_SUBSYSTEM_VERSION + 1)
-#define OPTION_MINOR_OS_VERSION (OPTION_MINOR_IMAGE_VERSION + 1)
-#define OPTION_MINOR_SUBSYSTEM_VERSION (OPTION_MINOR_OS_VERSION + 1)
-#define OPTION_SECTION_ALIGNMENT (OPTION_MINOR_SUBSYSTEM_VERSION + 1)
-#define OPTION_STACK (OPTION_SECTION_ALIGNMENT + 1)
-#define OPTION_SUBSYSTEM (OPTION_STACK + 1)
-#define OPTION_HEAP (OPTION_SUBSYSTEM + 1)
-
static void
gld${EMULATION_NAME}_add_options
(int ns ATTRIBUTE_UNUSED, char **shortopts ATTRIBUTE_UNUSED, int nl,
diff --git a/ld/emultempl/bfin.em b/ld/emultempl/bfin.em
index eb13055d9ea..4b9be670c62 100644
--- a/ld/emultempl/bfin.em
+++ b/ld/emultempl/bfin.em
@@ -39,11 +39,6 @@ EOF
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_CODE_IN_L1 300
-#define OPTION_DATA_IN_L1 301
-'
-
PARSE_AND_LIST_LONGOPTS='
{ "code-in-l1", no_argument, NULL, OPTION_CODE_IN_L1 },
{ "data-in-l1", no_argument, NULL, OPTION_DATA_IN_L1 },
diff --git a/ld/emultempl/cskyelf.em b/ld/emultempl/cskyelf.em
index 82815e5e7a8..64a6ddf61f8 100644
--- a/ld/emultempl/cskyelf.em
+++ b/ld/emultempl/cskyelf.em
@@ -288,12 +288,6 @@ EOF
# This code gets inserted into the generic elf32.sc linker script
# and allows us to define our own command line switches.
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_BRANCH_STUB 301
-#define OPTION_NO_BRANCH_STUB 302
-#define OPTION_STUBGROUP_SIZE 303
-'
-
PARSE_AND_LIST_LONGOPTS='
{"branch-stub", no_argument, NULL, OPTION_BRANCH_STUB},
{"no-branch-stub", no_argument, NULL, OPTION_NO_BRANCH_STUB},
diff --git a/ld/emultempl/elf.em b/ld/emultempl/elf.em
index 71cec19fdc6..f551225cdac 100644
--- a/ld/emultempl/elf.em
+++ b/ld/emultempl/elf.em
@@ -45,6 +45,7 @@ fragment <<EOF
#include "ldexp.h"
#include "ldlang.h"
#include "ldfile.h"
+#include "ldlex.h"
#include "ldemul.h"
#include <ldgram.h>
#include "elf-bfd.h"
@@ -556,28 +557,7 @@ EOF
fi
fi
-if test -n "$PARSE_AND_LIST_PROLOGUE" ; then
fragment <<EOF
- $PARSE_AND_LIST_PROLOGUE
-EOF
-fi
-
-fragment <<EOF
-
-enum elf_options
-{
- OPTION_DISABLE_NEW_DTAGS = 400,
- OPTION_ENABLE_NEW_DTAGS,
- OPTION_GROUP,
- OPTION_EH_FRAME_HDR,
- OPTION_NO_EH_FRAME_HDR,
- OPTION_EXCLUDE_LIBS,
- OPTION_HASH_STYLE,
- OPTION_BUILD_ID,
- OPTION_PACKAGE_METADATA,
- OPTION_AUDIT,
- OPTION_COMPRESS_DEBUG
-};
static void
gld${EMULATION_NAME}_add_options
diff --git a/ld/emultempl/hppaelf.em b/ld/emultempl/hppaelf.em
index 09db0cb07de..45257980831 100644
--- a/ld/emultempl/hppaelf.em
+++ b/ld/emultempl/hppaelf.em
@@ -314,11 +314,6 @@ EOF
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_MULTI_SUBSPACE 301
-#define OPTION_STUBGROUP_SIZE (OPTION_MULTI_SUBSPACE + 1)
-'
-
PARSE_AND_LIST_LONGOPTS='
{ "multi-subspace", no_argument, NULL, OPTION_MULTI_SUBSPACE },
{ "stub-group-size", required_argument, NULL, OPTION_STUBGROUP_SIZE },
diff --git a/ld/emultempl/ia64elf.em b/ld/emultempl/ia64elf.em
index a4657bcf3ac..a74849d1dbb 100644
--- a/ld/emultempl/ia64elf.em
+++ b/ld/emultempl/ia64elf.em
@@ -43,10 +43,6 @@ ia64elf_after_parse (void)
EOF
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_ITANIUM 300
-'
-
PARSE_AND_LIST_LONGOPTS='
{ "itanium", no_argument, NULL, OPTION_ITANIUM},
'
diff --git a/ld/emultempl/m68hc1xelf.em b/ld/emultempl/m68hc1xelf.em
index 5355b0fc1c0..7aaa78a72d5 100644
--- a/ld/emultempl/m68hc1xelf.em
+++ b/ld/emultempl/m68hc1xelf.em
@@ -322,11 +322,6 @@ EOF
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_NO_TRAMPOLINE 300
-#define OPTION_BANK_WINDOW 301
-'
-
# The options are repeated below so that no abbreviations are allowed.
# Otherwise -s matches stub-group-size
PARSE_AND_LIST_LONGOPTS='
diff --git a/ld/emultempl/m68kelf.em b/ld/emultempl/m68kelf.em
index 0477f1eb23a..30e7d171f6a 100644
--- a/ld/emultempl/m68kelf.em
+++ b/ld/emultempl/m68kelf.em
@@ -200,10 +200,6 @@ EOF
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_GOT 301
-'
-
PARSE_AND_LIST_LONGOPTS='
{ "got", required_argument, NULL, OPTION_GOT},
'
diff --git a/ld/emultempl/metagelf.em b/ld/emultempl/metagelf.em
index 81ab64c1110..10d3ff10def 100644
--- a/ld/emultempl/metagelf.em
+++ b/ld/emultempl/metagelf.em
@@ -282,10 +282,6 @@ EOF
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_STUBGROUP_SIZE 301
-'
-
PARSE_AND_LIST_LONGOPTS='
{ "stub-group-size", required_argument, NULL, OPTION_STUBGROUP_SIZE },
'
diff --git a/ld/emultempl/mipself.em b/ld/emultempl/mipself.em
index f8fe4b9767e..3259f654b36 100644
--- a/ld/emultempl/mipself.em
+++ b/ld/emultempl/mipself.em
@@ -232,18 +232,6 @@ EOF
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
-PARSE_AND_LIST_PROLOGUE='
-enum
- {
- OPTION_INSN32 = 301,
- OPTION_NO_INSN32,
- OPTION_IGNORE_BRANCH_ISA,
- OPTION_NO_IGNORE_BRANCH_ISA,
- OPTION_COMPACT_BRANCHES,
- OPTION_NO_COMPACT_BRANCHES
- };
-'
-
PARSE_AND_LIST_LONGOPTS='
{ "insn32", no_argument, NULL, OPTION_INSN32 },
{ "no-insn32", no_argument, NULL, OPTION_NO_INSN32 },
diff --git a/ld/emultempl/msp430.em b/ld/emultempl/msp430.em
index 92402b308a4..2d225317a25 100644
--- a/ld/emultempl/msp430.em
+++ b/ld/emultempl/msp430.em
@@ -39,6 +39,7 @@ fragment <<EOF
#include "ldexp.h"
#include "ldlang.h"
#include "ldfile.h"
+#include "ldlex.h"
#include "ldemul.h"
#include "libiberty.h"
#include <ldgram.h>
@@ -443,10 +444,6 @@ msp430_elf_after_open (void)
bfd_map_over_sections (abfd, add_region_prefix, NULL);
}
-#define OPTION_CODE_REGION 321
-#define OPTION_DATA_REGION (OPTION_CODE_REGION + 1)
-#define OPTION_DISABLE_TRANS (OPTION_CODE_REGION + 2)
-
static void
gld${EMULATION_NAME}_add_options
(int ns, char **shortopts, int nl, struct option **longopts,
diff --git a/ld/emultempl/nds32elf.em b/ld/emultempl/nds32elf.em
index bde9e35de99..260e2a46e5d 100644
--- a/ld/emultempl/nds32elf.em
+++ b/ld/emultempl/nds32elf.em
@@ -132,18 +132,6 @@ EOF
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_BASELINE 301
-#define OPTION_ELIM_GC_RELOCS (OPTION_BASELINE + 1)
-#define OPTION_FP_AS_GP (OPTION_BASELINE + 2)
-#define OPTION_NO_FP_AS_GP (OPTION_BASELINE + 3)
-#define OPTION_REDUCE_FP_UPDATE (OPTION_BASELINE + 4)
-#define OPTION_NO_REDUCE_FP_UPDATE (OPTION_BASELINE + 5)
-#define OPTION_EXPORT_SYMBOLS (OPTION_BASELINE + 6)
-#define OPTION_HYPER_RELAX (OPTION_BASELINE + 7)
-#define OPTION_TLSDESC_TRAMPOLINE (OPTION_BASELINE + 8)
-#define OPTION_NO_TLSDESC_TRAMPOLINE (OPTION_BASELINE + 9)
-'
PARSE_AND_LIST_LONGOPTS='
{ "mfp-as-gp", no_argument, NULL, OPTION_FP_AS_GP},
{ "mno-fp-as-gp", no_argument, NULL, OPTION_NO_FP_AS_GP},
diff --git a/ld/emultempl/nto.em b/ld/emultempl/nto.em
index de69e132348..7cda6650bc6 100644
--- a/ld/emultempl/nto.em
+++ b/ld/emultempl/nto.em
@@ -190,14 +190,6 @@ EOF
# parse_args and list_options functions.
#
-PARSE_AND_LIST_PROLOGUE=${PARSE_AND_LIST_PROLOGUE}'
-enum nto_options
-{
- OPTION_STACK = 500,
- OPTION_LAZY_STACK,
-};
-'
-
PARSE_AND_LIST_LONGOPTS=${PARSE_AND_LIST_LONGOPTS}'
{ "stack", required_argument, NULL, OPTION_STACK },
{ "lazy-stack", no_argument, NULL, OPTION_LAZY_STACK },
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index c6ed1110595..9ab5e6ef481 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -235,84 +235,6 @@ fragment <<EOF
/* PE format extra command line options. */
-/* Used for setting flags in the PE header. */
-enum options
-{
- OPTION_BASE_FILE = 300 + 1,
- OPTION_DLL,
- OPTION_FILE_ALIGNMENT,
- OPTION_IMAGE_BASE,
- OPTION_MAJOR_IMAGE_VERSION,
- OPTION_MAJOR_OS_VERSION,
- OPTION_MAJOR_SUBSYSTEM_VERSION,
- OPTION_MINOR_IMAGE_VERSION,
- OPTION_MINOR_OS_VERSION,
- OPTION_MINOR_SUBSYSTEM_VERSION,
- OPTION_SECTION_ALIGNMENT,
- OPTION_STACK,
- OPTION_SUBSYSTEM,
- OPTION_HEAP,
- OPTION_SUPPORT_OLD_CODE,
- OPTION_OUT_DEF,
- OPTION_EXPORT_ALL,
- OPTION_EXCLUDE_SYMBOLS,
- OPTION_EXCLUDE_ALL_SYMBOLS,
- OPTION_KILL_ATS,
- OPTION_STDCALL_ALIASES,
- OPTION_ENABLE_STDCALL_FIXUP,
- OPTION_DISABLE_STDCALL_FIXUP,
- OPTION_THUMB_ENTRY,
- OPTION_WARN_DUPLICATE_EXPORTS,
- OPTION_IMP_COMPAT,
- OPTION_ENABLE_AUTO_IMAGE_BASE,
- OPTION_DISABLE_AUTO_IMAGE_BASE,
- OPTION_DLL_SEARCH_PREFIX,
- OPTION_NO_DEFAULT_EXCLUDES,
- OPTION_DLL_ENABLE_AUTO_IMPORT,
- OPTION_DLL_DISABLE_AUTO_IMPORT,
- OPTION_ENABLE_EXTRA_PE_DEBUG,
- OPTION_EXCLUDE_LIBS,
- OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC,
- OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC,
- OPTION_LARGE_ADDRESS_AWARE,
- OPTION_DISABLE_LARGE_ADDRESS_AWARE,
- OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V1,
- OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2,
- OPTION_EXCLUDE_MODULES_FOR_IMPLIB,
- OPTION_USE_NUL_PREFIXED_IMPORT_TABLES,
- OPTION_NO_LEADING_UNDERSCORE,
- OPTION_LEADING_UNDERSCORE,
- OPTION_ENABLE_LONG_SECTION_NAMES,
- OPTION_DISABLE_LONG_SECTION_NAMES,
-/* DLLCharacteristics flags. */
- OPTION_DYNAMIC_BASE,
- OPTION_FORCE_INTEGRITY,
- OPTION_NX_COMPAT,
- OPTION_NO_ISOLATION,
- OPTION_NO_SEH,
- OPTION_NO_BIND,
- OPTION_WDM_DRIVER,
- OPTION_TERMINAL_SERVER_AWARE,
-/* Determinism. */
- OPTION_INSERT_TIMESTAMP,
- OPTION_NO_INSERT_TIMESTAMP,
- OPTION_BUILD_ID,
-#ifdef PDB_H
- OPTION_PDB,
-#endif
- OPTION_ENABLE_RELOC_SECTION,
- OPTION_DISABLE_RELOC_SECTION,
-/* DLL Characteristics flags. */
- OPTION_DISABLE_DYNAMIC_BASE,
- OPTION_DISABLE_FORCE_INTEGRITY,
- OPTION_DISABLE_NX_COMPAT,
- OPTION_DISABLE_NO_ISOLATION,
- OPTION_DISABLE_NO_SEH,
- OPTION_DISABLE_NO_BIND,
- OPTION_DISABLE_WDM_DRIVER,
- OPTION_DISABLE_TERMINAL_SERVER_AWARE
-};
-
static void
gld${EMULATION_NAME}_add_options
(int ns ATTRIBUTE_UNUSED,
diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em
index bd2ee2ede26..00c4ea9e15a 100644
--- a/ld/emultempl/pep.em
+++ b/ld/emultempl/pep.em
@@ -245,79 +245,6 @@ gld${EMULATION_NAME}_before_parse (void)
/* PE format extra command line options. */
-/* Used for setting flags in the PE header. */
-enum options
-{
- OPTION_BASE_FILE = 300 + 1,
- OPTION_DLL,
- OPTION_FILE_ALIGNMENT,
- OPTION_IMAGE_BASE,
- OPTION_MAJOR_IMAGE_VERSION,
- OPTION_MAJOR_OS_VERSION,
- OPTION_MAJOR_SUBSYSTEM_VERSION,
- OPTION_MINOR_IMAGE_VERSION,
- OPTION_MINOR_OS_VERSION,
- OPTION_MINOR_SUBSYSTEM_VERSION,
- OPTION_SECTION_ALIGNMENT,
- OPTION_STACK,
- OPTION_SUBSYSTEM,
- OPTION_HEAP,
- OPTION_SUPPORT_OLD_CODE,
- OPTION_OUT_DEF,
- OPTION_EXPORT_ALL,
- OPTION_EXCLUDE_SYMBOLS,
- OPTION_EXCLUDE_ALL_SYMBOLS,
- OPTION_KILL_ATS,
- OPTION_STDCALL_ALIASES,
- OPTION_ENABLE_STDCALL_FIXUP,
- OPTION_DISABLE_STDCALL_FIXUP,
- OPTION_WARN_DUPLICATE_EXPORTS,
- OPTION_IMP_COMPAT,
- OPTION_ENABLE_AUTO_IMAGE_BASE,
- OPTION_DISABLE_AUTO_IMAGE_BASE,
- OPTION_DLL_SEARCH_PREFIX,
- OPTION_NO_DEFAULT_EXCLUDES,
- OPTION_DLL_ENABLE_AUTO_IMPORT,
- OPTION_DLL_DISABLE_AUTO_IMPORT,
- OPTION_ENABLE_EXTRA_PE_DEBUG,
- OPTION_EXCLUDE_LIBS,
- OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC,
- OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC,
- OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2,
- OPTION_EXCLUDE_MODULES_FOR_IMPLIB,
- OPTION_USE_NUL_PREFIXED_IMPORT_TABLES,
- OPTION_NO_LEADING_UNDERSCORE,
- OPTION_LEADING_UNDERSCORE,
- OPTION_ENABLE_LONG_SECTION_NAMES,
- OPTION_DISABLE_LONG_SECTION_NAMES,
- OPTION_HIGH_ENTROPY_VA,
- OPTION_DYNAMIC_BASE,
- OPTION_FORCE_INTEGRITY,
- OPTION_NX_COMPAT,
- OPTION_NO_ISOLATION,
- OPTION_NO_SEH,
- OPTION_NO_BIND,
- OPTION_WDM_DRIVER,
- OPTION_INSERT_TIMESTAMP,
- OPTION_NO_INSERT_TIMESTAMP,
- OPTION_TERMINAL_SERVER_AWARE,
- OPTION_BUILD_ID,
-#ifdef PDB_H
- OPTION_PDB,
-#endif
- OPTION_ENABLE_RELOC_SECTION,
- OPTION_DISABLE_RELOC_SECTION,
- OPTION_DISABLE_HIGH_ENTROPY_VA,
- OPTION_DISABLE_DYNAMIC_BASE,
- OPTION_DISABLE_FORCE_INTEGRITY,
- OPTION_DISABLE_NX_COMPAT,
- OPTION_DISABLE_NO_ISOLATION,
- OPTION_DISABLE_NO_SEH,
- OPTION_DISABLE_NO_BIND,
- OPTION_DISABLE_WDM_DRIVER,
- OPTION_DISABLE_TERMINAL_SERVER_AWARE
-};
-
static void
gld${EMULATION_NAME}_add_options
(int ns ATTRIBUTE_UNUSED,
diff --git a/ld/emultempl/ppc32elf.em b/ld/emultempl/ppc32elf.em
index 0730a05e75b..12476f44fcf 100644
--- a/ld/emultempl/ppc32elf.em
+++ b/ld/emultempl/ppc32elf.em
@@ -264,26 +264,6 @@ fi
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
-PARSE_AND_LIST_PROLOGUE=${PARSE_AND_LIST_PROLOGUE}'
-enum ppc32_opt
-{
- OPTION_NO_TLS_OPT = 321,
- OPTION_NO_TLS_GET_ADDR_OPT,
- OPTION_NEW_PLT,
- OPTION_OLD_PLT,
- OPTION_PLT_ALIGN,
- OPTION_NO_PLT_ALIGN,
- OPTION_NO_INLINE_OPT,
- OPTION_OLD_GOT,
- OPTION_STUBSYMS,
- OPTION_NO_STUBSYMS,
- OPTION_PPC476_WORKAROUND,
- OPTION_NO_PPC476_WORKAROUND,
- OPTION_NO_PICFIXUP,
- OPTION_VLE_RELOC_FIXUP
-};
-'
-
PARSE_AND_LIST_LONGOPTS=${PARSE_AND_LIST_LONGOPTS}'
{ "emit-stub-syms", no_argument, NULL, OPTION_STUBSYMS },
{ "no-emit-stub-syms", no_argument, NULL, OPTION_NO_STUBSYMS },
diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em
index 533caed2fc2..23905e9bc88 100644
--- a/ld/emultempl/ppc64elf.em
+++ b/ld/emultempl/ppc64elf.em
@@ -684,41 +684,6 @@ fi
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
-PARSE_AND_LIST_PROLOGUE=${PARSE_AND_LIST_PROLOGUE}'
-enum ppc64_opt
-{
- OPTION_STUBGROUP_SIZE = 321,
- OPTION_PLT_STATIC_CHAIN,
- OPTION_NO_PLT_STATIC_CHAIN,
- OPTION_PLT_THREAD_SAFE,
- OPTION_NO_PLT_THREAD_SAFE,
- OPTION_PLT_ALIGN,
- OPTION_NO_PLT_ALIGN,
- OPTION_PLT_LOCALENTRY,
- OPTION_NO_PLT_LOCALENTRY,
- OPTION_POWER10_STUBS,
- OPTION_NO_POWER10_STUBS,
- OPTION_NO_PCREL_OPT,
- OPTION_STUBSYMS,
- OPTION_NO_STUBSYMS,
- OPTION_SAVRES,
- OPTION_NO_SAVRES,
- OPTION_DOTSYMS,
- OPTION_NO_DOTSYMS,
- OPTION_NO_TLS_OPT,
- OPTION_TLS_GET_ADDR_OPT,
- OPTION_NO_TLS_GET_ADDR_OPT,
- OPTION_TLS_GET_ADDR_REGSAVE,
- OPTION_NO_TLS_GET_ADDR_REGSAVE,
- OPTION_NO_OPD_OPT,
- OPTION_NO_INLINE_OPT,
- OPTION_NO_TOC_OPT,
- OPTION_NO_MULTI_TOC,
- OPTION_NO_TOC_SORT,
- OPTION_NON_OVERLAPPING_OPD
-};
-'
-
PARSE_AND_LIST_LONGOPTS=${PARSE_AND_LIST_LONGOPTS}'
{ "stub-group-size", required_argument, NULL, OPTION_STUBGROUP_SIZE },
{ "plt-static-chain", no_argument, NULL, OPTION_PLT_STATIC_CHAIN },
diff --git a/ld/emultempl/riscvelf.em b/ld/emultempl/riscvelf.em
index fe53b2a7a71..afc43ed55dc 100644
--- a/ld/emultempl/riscvelf.em
+++ b/ld/emultempl/riscvelf.em
@@ -31,16 +31,6 @@ EOF
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions. */
-PARSE_AND_LIST_PROLOGUE=${PARSE_AND_LIST_PROLOGUE}'
-enum risccv_opt
-{
- OPTION_RELAX_GP = 321,
- OPTION_NO_RELAX_GP,
- OPTION_CHECK_ULEB128,
- OPTION_NO_CHECK_ULEB128,
-};
-'
-
PARSE_AND_LIST_LONGOPTS=${PARSE_AND_LIST_LONGOPTS}'
{ "relax-gp", no_argument, NULL, OPTION_RELAX_GP },
{ "no-relax-gp", no_argument, NULL, OPTION_NO_RELAX_GP },
diff --git a/ld/emultempl/rxelf.em b/ld/emultempl/rxelf.em
index 3b8df6ef665..cc76a274a26 100644
--- a/ld/emultempl/rxelf.em
+++ b/ld/emultempl/rxelf.em
@@ -45,13 +45,6 @@ EOF
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_NO_FLAG_MISMATCH_WARNINGS 301
-#define OPTION_IGNORE_LMA 302
-#define OPTION_NO_IGNORE_LMA 303
-#define OPTION_FLAG_MISMATCH_WARNINGS 304
-'
-
PARSE_AND_LIST_LONGOPTS='
{ "no-flag-mismatch-warnings", no_argument, NULL, OPTION_NO_FLAG_MISMATCH_WARNINGS},
{ "flag-mismatch-warnings", no_argument, NULL, OPTION_FLAG_MISMATCH_WARNINGS},
diff --git a/ld/emultempl/s390.em b/ld/emultempl/s390.em
index 11e7f19bb52..179cbbd98d7 100644
--- a/ld/emultempl/s390.em
+++ b/ld/emultempl/s390.em
@@ -42,10 +42,6 @@ EOF
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_PGSTE 301
-'
-
PARSE_AND_LIST_LONGOPTS='
{ "s390-pgste", no_argument, NULL, OPTION_PGSTE},
'
diff --git a/ld/emultempl/scoreelf.em b/ld/emultempl/scoreelf.em
index 6238b5e2a19..499a583decd 100644
--- a/ld/emultempl/scoreelf.em
+++ b/ld/emultempl/scoreelf.em
@@ -76,7 +76,6 @@ EOF
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
-PARSE_AND_LIST_PROLOGUE=''
PARSE_AND_LIST_SHORTOPTS=
PARSE_AND_LIST_LONGOPTS=''
PARSE_AND_LIST_OPTIONS=''
diff --git a/ld/emultempl/spuelf.em b/ld/emultempl/spuelf.em
index cc39435cc3b..2ff41b1e46e 100644
--- a/ld/emultempl/spuelf.em
+++ b/ld/emultempl/spuelf.em
@@ -589,30 +589,6 @@ fi
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_SPU_PLUGIN 301
-#define OPTION_SPU_NO_OVERLAYS (OPTION_SPU_PLUGIN + 1)
-#define OPTION_SPU_COMPACT_STUBS (OPTION_SPU_NO_OVERLAYS + 1)
-#define OPTION_SPU_STUB_SYMS (OPTION_SPU_COMPACT_STUBS + 1)
-#define OPTION_SPU_NON_OVERLAY_STUBS (OPTION_SPU_STUB_SYMS + 1)
-#define OPTION_SPU_LOCAL_STORE (OPTION_SPU_NON_OVERLAY_STUBS + 1)
-#define OPTION_SPU_STACK_ANALYSIS (OPTION_SPU_LOCAL_STORE + 1)
-#define OPTION_SPU_STACK_SYMS (OPTION_SPU_STACK_ANALYSIS + 1)
-#define OPTION_SPU_AUTO_OVERLAY (OPTION_SPU_STACK_SYMS + 1)
-#define OPTION_SPU_AUTO_RELINK (OPTION_SPU_AUTO_OVERLAY + 1)
-#define OPTION_SPU_OVERLAY_RODATA (OPTION_SPU_AUTO_RELINK + 1)
-#define OPTION_SPU_SOFT_ICACHE (OPTION_SPU_OVERLAY_RODATA + 1)
-#define OPTION_SPU_LINE_SIZE (OPTION_SPU_SOFT_ICACHE + 1)
-#define OPTION_SPU_NUM_LINES (OPTION_SPU_LINE_SIZE + 1)
-#define OPTION_SPU_LRLIVE (OPTION_SPU_NUM_LINES + 1)
-#define OPTION_SPU_NON_IA_TEXT (OPTION_SPU_LRLIVE + 1)
-#define OPTION_SPU_FIXED_SPACE (OPTION_SPU_NON_IA_TEXT + 1)
-#define OPTION_SPU_RESERVED_SPACE (OPTION_SPU_FIXED_SPACE + 1)
-#define OPTION_SPU_EXTRA_STACK (OPTION_SPU_RESERVED_SPACE + 1)
-#define OPTION_SPU_NO_AUTO_OVERLAY (OPTION_SPU_EXTRA_STACK + 1)
-#define OPTION_SPU_EMIT_FIXUPS (OPTION_SPU_NO_AUTO_OVERLAY + 1)
-'
-
PARSE_AND_LIST_LONGOPTS='
{ "plugin", no_argument, NULL, OPTION_SPU_PLUGIN },
{ "soft-icache", no_argument, NULL, OPTION_SPU_SOFT_ICACHE },
diff --git a/ld/emultempl/tic6xdsbt.em b/ld/emultempl/tic6xdsbt.em
index 524e3f73eec..8140ef9c218 100644
--- a/ld/emultempl/tic6xdsbt.em
+++ b/ld/emultempl/tic6xdsbt.em
@@ -165,12 +165,6 @@ EOF
# This code gets inserted into the generic elf32.sc linker script
# and allows us to define our own command line switches.
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_DSBT_INDEX 300
-#define OPTION_DSBT_SIZE 301
-#define OPTION_NO_MERGE_EXIDX_ENTRIES 302
-'
-
PARSE_AND_LIST_LONGOPTS='
{"dsbt-index", required_argument, NULL, OPTION_DSBT_INDEX},
{"dsbt-size", required_argument, NULL, OPTION_DSBT_SIZE},
diff --git a/ld/emultempl/ticoff.em b/ld/emultempl/ticoff.em
index 4b048bef8f9..fb6cf3a0c2e 100644
--- a/ld/emultempl/ticoff.em
+++ b/ld/emultempl/ticoff.em
@@ -40,12 +40,12 @@ fragment <<EOF
#include "ldexp.h"
#include "ldlang.h"
#include "ldfile.h"
+#include "ldlex.h"
#include "ldemul.h"
static int coff_version;
/* TI COFF extra command line options */
-#define OPTION_COFF_FORMAT (300 + 1)
static void
gld${EMULATION_NAME}_add_options
diff --git a/ld/emultempl/vms.em b/ld/emultempl/vms.em
index 67e9ea641eb..8baacb35a13 100644
--- a/ld/emultempl/vms.em
+++ b/ld/emultempl/vms.em
@@ -24,6 +24,7 @@
fragment <<EOF
#include "libiberty.h"
#include "getopt.h"
+#include "ldlex.h"
static void
gld${EMULATION_NAME}_before_parse (void)
@@ -125,7 +126,6 @@ vms_place_orphan (asection *s,
}
/* VMS specific options. */
-#define OPTION_IDENTIFICATION (300 + 1)
static void
gld${EMULATION_NAME}_add_options
diff --git a/ld/emultempl/vxworks.em b/ld/emultempl/vxworks.em
index 00cfeabad3a..307049cfd3a 100644
--- a/ld/emultempl/vxworks.em
+++ b/ld/emultempl/vxworks.em
@@ -55,12 +55,6 @@ vxworks_after_open (void)
EOF
-PARSE_AND_LIST_PROLOGUE=$PARSE_AND_LIST_PROLOGUE'
-enum {
- OPTION_FORCE_DYNAMIC = 501
-};
-'
-
PARSE_AND_LIST_LONGOPTS=$PARSE_AND_LIST_LONGOPTS'
{"force-dynamic", no_argument, NULL, OPTION_FORCE_DYNAMIC},
'
diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em
index 512935392a9..3508eb7f503 100644
--- a/ld/emultempl/xtensaelf.em
+++ b/ld/emultempl/xtensaelf.em
@@ -39,6 +39,9 @@ static void xtensa_colocate_output_literals (lang_statement_union_type *);
static void xtensa_strip_inconsistent_linkonce_sections
(lang_statement_list_type *);
+extern int elf32xtensa_size_opt;
+extern int elf32xtensa_no_literal_movement;
+extern int elf32xtensa_abi;
/* This number is irrelevant until we turn on use_literal_pages */
static bfd_vma xtensa_page_power = 12; /* 4K pages. */
@@ -1922,17 +1925,6 @@ EOF
# Define some shell vars to insert bits of code into the standard ELF
# parse_args and list_options functions.
#
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_OPT_SIZEOPT (300)
-#define OPTION_LITERAL_MOVEMENT (OPTION_OPT_SIZEOPT + 1)
-#define OPTION_NO_LITERAL_MOVEMENT (OPTION_LITERAL_MOVEMENT + 1)
-#define OPTION_ABI_WINDOWED (OPTION_NO_LITERAL_MOVEMENT + 1)
-#define OPTION_ABI_CALL0 (OPTION_ABI_WINDOWED + 1)
-extern int elf32xtensa_size_opt;
-extern int elf32xtensa_no_literal_movement;
-extern int elf32xtensa_abi;
-'
-
PARSE_AND_LIST_LONGOPTS='
{ "size-opt", no_argument, NULL, OPTION_OPT_SIZEOPT},
{ "literal-movement", no_argument, NULL, OPTION_LITERAL_MOVEMENT},