mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2026-08-27 00:26:02 -04:00
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.
This commit is contained in:
parent
3b6a6fd9c0
commit
8d10083c23
35 changed files with 304 additions and 481 deletions
|
|
@ -30,10 +30,6 @@ TEMPLATE_NAME=elf
|
|||
|
||||
# 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_BASE_FILE 300
|
||||
'
|
||||
|
||||
PARSE_AND_LIST_LONGOPTS='
|
||||
{"base-file", required_argument, NULL, OPTION_BASE_FILE},
|
||||
'
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
PLT_UNWIND=yes
|
||||
|
||||
PARSE_AND_LIST_PROLOGUE='
|
||||
#define OPTION_LD_GENERATED_UNWIND_INFO 301
|
||||
#define OPTION_NO_LD_GENERATED_UNWIND_INFO 302
|
||||
'
|
||||
|
||||
PARSE_AND_LIST_LONGOPTS='
|
||||
{"ld-generated-unwind-info", no_argument, NULL,
|
||||
OPTION_LD_GENERATED_UNWIND_INFO},
|
||||
|
|
|
|||
|
|
@ -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='
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
|
|
@ -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='
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
'
|
||||
|
|
|
|||
|
|
@ -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='
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
'
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
'
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
'
|
||||
|
|
|
|||
|
|
@ -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=''
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
'
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
286
ld/ldlex.h
286
ld/ldlex.h
|
|
@ -181,6 +181,292 @@ enum option_values
|
|||
OPTION_DISABLE_LINKER_VERSION,
|
||||
OPTION_REMAP_INPUTS,
|
||||
OPTION_REMAP_INPUTS_FILE,
|
||||
/* Used by emultempl/elf.em, emultempl/pe.em and emultempl/pep.em. */
|
||||
OPTION_BUILD_ID,
|
||||
OPTION_EXCLUDE_LIBS,
|
||||
/* Used by emulparams/elf32mcore.sh, emultempl/beos.em, emultempl/pe.em
|
||||
and emultempl/pep.em. */
|
||||
OPTION_BASE_FILE,
|
||||
/* Used by emultempl/ppc32elf.em and emultempl/ppc64elf.em. */
|
||||
OPTION_NO_INLINE_OPT,
|
||||
OPTION_NO_PLT_ALIGN,
|
||||
OPTION_NO_STUBSYMS,
|
||||
OPTION_NO_TLS_GET_ADDR_OPT,
|
||||
OPTION_NO_TLS_OPT,
|
||||
OPTION_PLT_ALIGN,
|
||||
OPTION_STUBSYMS,
|
||||
/* Used by emultempl/armelf.em and emultempl/tic6xdsbt.em. */
|
||||
OPTION_NO_MERGE_EXIDX_ENTRIES,
|
||||
/* Used by emultempl/aarch64elf.em and emultempl/armelf.em. */
|
||||
OPTION_PIC_VENEER,
|
||||
OPTION_NO_ENUM_SIZE_WARNING,
|
||||
OPTION_NO_WCHAR_SIZE_WARNING,
|
||||
/* Used by emultempl/armelf.em and emultempl/pe.em. */
|
||||
OPTION_THUMB_ENTRY,
|
||||
/* Used by emultempl/beos.em, emultempl/nto.em, emultempl/pe.em and
|
||||
emultempl/pep.em. */
|
||||
OPTION_STACK,
|
||||
/* Used by emultempl/aarch64elf.em, emultempl/armelf.em,
|
||||
emultempl/cskyelf.em, emultempl/hppaelf.em, emultempl/metagelf.em
|
||||
and emultempl/ppc64elf.em. */
|
||||
OPTION_STUBGROUP_SIZE,
|
||||
/* Used by emulparams/plt_unwind.sh. */
|
||||
OPTION_LD_GENERATED_UNWIND_INFO,
|
||||
OPTION_NO_LD_GENERATED_UNWIND_INFO,
|
||||
/* Used by emultempl/aarch64elf.em. */
|
||||
OPTION_FIX_ERRATUM_835769,
|
||||
OPTION_FIX_ERRATUM_843419,
|
||||
OPTION_NO_APPLY_DYNAMIC_RELOCS,
|
||||
/* Used by emultempl/aix.em. */
|
||||
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,
|
||||
/* Used by emultempl/alphaelf.em. */
|
||||
OPTION_TASO,
|
||||
OPTION_SECUREPLT,
|
||||
OPTION_NO_SECUREPLT,
|
||||
/* Used by emultempl/armelf.em. */
|
||||
OPTION_BE8,
|
||||
OPTION_TARGET1_REL,
|
||||
OPTION_TARGET1_ABS,
|
||||
OPTION_TARGET2,
|
||||
OPTION_FIX_V4BX,
|
||||
OPTION_USE_BLX,
|
||||
OPTION_VFP11_DENORM_FIX,
|
||||
OPTION_FIX_V4BX_INTERWORKING,
|
||||
OPTION_FIX_CORTEX_A8,
|
||||
OPTION_NO_FIX_CORTEX_A8,
|
||||
OPTION_FIX_ARM1176,
|
||||
OPTION_NO_FIX_ARM1176,
|
||||
OPTION_LONG_PLT,
|
||||
OPTION_STM32L4XX_FIX,
|
||||
OPTION_CMSE_IMPLIB,
|
||||
OPTION_IN_IMPLIB,
|
||||
/* Used by emultempl/avrelf.em. */
|
||||
OPTION_NO_CALL_RET_REPLACEMENT,
|
||||
OPTION_PMEM_WRAP_AROUND,
|
||||
OPTION_NO_STUBS,
|
||||
OPTION_DEBUG_STUBS,
|
||||
OPTION_DEBUG_RELAX,
|
||||
/* Used by emultempl/bfin.em. */
|
||||
OPTION_CODE_IN_L1,
|
||||
OPTION_DATA_IN_L1,
|
||||
/* Used by emultempl/cskyelf.em. */
|
||||
OPTION_BRANCH_STUB,
|
||||
OPTION_NO_BRANCH_STUB,
|
||||
/* Used by emultempl/elf.em. */
|
||||
OPTION_DISABLE_NEW_DTAGS,
|
||||
OPTION_ENABLE_NEW_DTAGS,
|
||||
OPTION_GROUP,
|
||||
OPTION_EH_FRAME_HDR,
|
||||
OPTION_NO_EH_FRAME_HDR,
|
||||
OPTION_HASH_STYLE,
|
||||
OPTION_PACKAGE_METADATA,
|
||||
OPTION_AUDIT,
|
||||
OPTION_COMPRESS_DEBUG,
|
||||
/* Used by emultempl/hppaelf.em. */
|
||||
OPTION_MULTI_SUBSPACE,
|
||||
/* Used by emultempl/ia64elf.em. */
|
||||
OPTION_ITANIUM,
|
||||
/* Used by emultempl/m68hc1xelf.em. */
|
||||
OPTION_NO_TRAMPOLINE,
|
||||
OPTION_BANK_WINDOW,
|
||||
/* Used by emultempl/m68kelf.em. */
|
||||
OPTION_GOT,
|
||||
/* Used by emultempl/mipself.em. */
|
||||
OPTION_INSN32,
|
||||
OPTION_NO_INSN32,
|
||||
OPTION_IGNORE_BRANCH_ISA,
|
||||
OPTION_NO_IGNORE_BRANCH_ISA,
|
||||
OPTION_COMPACT_BRANCHES,
|
||||
OPTION_NO_COMPACT_BRANCHES,
|
||||
/* Used by emultempl/msp430.em. */
|
||||
OPTION_CODE_REGION,
|
||||
OPTION_DATA_REGION,
|
||||
OPTION_DISABLE_TRANS,
|
||||
/* Used by emultempl/nds32elf.em. */
|
||||
OPTION_BASELINE,
|
||||
OPTION_ELIM_GC_RELOCS,
|
||||
OPTION_FP_AS_GP,
|
||||
OPTION_NO_FP_AS_GP,
|
||||
OPTION_REDUCE_FP_UPDATE,
|
||||
OPTION_NO_REDUCE_FP_UPDATE,
|
||||
OPTION_EXPORT_SYMBOLS,
|
||||
OPTION_HYPER_RELAX,
|
||||
OPTION_TLSDESC_TRAMPOLINE,
|
||||
OPTION_NO_TLSDESC_TRAMPOLINE,
|
||||
/* Used by emultempl/nto.em. */
|
||||
OPTION_LAZY_STACK,
|
||||
/* Used by emultempl/pe.em, emultempl/pep.em and emultempl/beos.em. */
|
||||
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_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_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_PDB,
|
||||
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,
|
||||
/* Used by emultempl/pep.em. */
|
||||
OPTION_DISABLE_HIGH_ENTROPY_VA,
|
||||
OPTION_HIGH_ENTROPY_VA,
|
||||
/* Used by emultempl/ppc32elf.em. */
|
||||
OPTION_NEW_PLT,
|
||||
OPTION_OLD_PLT,
|
||||
OPTION_OLD_GOT,
|
||||
OPTION_PPC476_WORKAROUND,
|
||||
OPTION_NO_PPC476_WORKAROUND,
|
||||
OPTION_NO_PICFIXUP,
|
||||
OPTION_VLE_RELOC_FIXUP,
|
||||
/* Used by emultempl/ppc64elf.em. */
|
||||
OPTION_PLT_STATIC_CHAIN,
|
||||
OPTION_NO_PLT_STATIC_CHAIN,
|
||||
OPTION_PLT_THREAD_SAFE,
|
||||
OPTION_NO_PLT_THREAD_SAFE,
|
||||
OPTION_PLT_LOCALENTRY,
|
||||
OPTION_NO_PLT_LOCALENTRY,
|
||||
OPTION_POWER10_STUBS,
|
||||
OPTION_NO_POWER10_STUBS,
|
||||
OPTION_NO_PCREL_OPT,
|
||||
OPTION_SAVRES,
|
||||
OPTION_NO_SAVRES,
|
||||
OPTION_DOTSYMS,
|
||||
OPTION_NO_DOTSYMS,
|
||||
OPTION_TLS_GET_ADDR_OPT,
|
||||
OPTION_TLS_GET_ADDR_REGSAVE,
|
||||
OPTION_NO_TLS_GET_ADDR_REGSAVE,
|
||||
OPTION_NO_OPD_OPT,
|
||||
OPTION_NO_TOC_OPT,
|
||||
OPTION_NO_MULTI_TOC,
|
||||
OPTION_NO_TOC_SORT,
|
||||
OPTION_NON_OVERLAPPING_OPD,
|
||||
/* Used by emultempl/riscvelf.em. */
|
||||
OPTION_RELAX_GP,
|
||||
OPTION_NO_RELAX_GP,
|
||||
OPTION_CHECK_ULEB128,
|
||||
OPTION_NO_CHECK_ULEB128,
|
||||
/* Used by emultempl/rxelf.em. */
|
||||
OPTION_NO_FLAG_MISMATCH_WARNINGS,
|
||||
OPTION_IGNORE_LMA,
|
||||
OPTION_NO_IGNORE_LMA,
|
||||
OPTION_FLAG_MISMATCH_WARNINGS,
|
||||
/* Used by emultempl/s390.em. */
|
||||
OPTION_PGSTE,
|
||||
/* Used by emultempl/spuelf.em. */
|
||||
OPTION_SPU_PLUGIN,
|
||||
OPTION_SPU_NO_OVERLAYS,
|
||||
OPTION_SPU_COMPACT_STUBS,
|
||||
OPTION_SPU_STUB_SYMS,
|
||||
OPTION_SPU_NON_OVERLAY_STUBS,
|
||||
OPTION_SPU_LOCAL_STORE,
|
||||
OPTION_SPU_STACK_ANALYSIS,
|
||||
OPTION_SPU_STACK_SYMS,
|
||||
OPTION_SPU_AUTO_OVERLAY,
|
||||
OPTION_SPU_AUTO_RELINK,
|
||||
OPTION_SPU_OVERLAY_RODATA,
|
||||
OPTION_SPU_SOFT_ICACHE,
|
||||
OPTION_SPU_LINE_SIZE,
|
||||
OPTION_SPU_NUM_LINES,
|
||||
OPTION_SPU_LRLIVE,
|
||||
OPTION_SPU_NON_IA_TEXT,
|
||||
OPTION_SPU_FIXED_SPACE,
|
||||
OPTION_SPU_RESERVED_SPACE,
|
||||
OPTION_SPU_EXTRA_STACK,
|
||||
OPTION_SPU_NO_AUTO_OVERLAY,
|
||||
OPTION_SPU_EMIT_FIXUPS,
|
||||
/* Used by emultempl/tic6xdsbt.em. */
|
||||
OPTION_DSBT_INDEX,
|
||||
OPTION_DSBT_SIZE,
|
||||
/* Used by emultempl/ticoff.em. */
|
||||
OPTION_COFF_FORMAT,
|
||||
/* Used by emultempl/vms.em. */
|
||||
OPTION_IDENTIFICATION,
|
||||
/* Used by emultempl/vxworks.em. */
|
||||
OPTION_FORCE_DYNAMIC,
|
||||
/* Used by emultempl/xtensaelf.em. */
|
||||
OPTION_OPT_SIZEOPT,
|
||||
OPTION_LITERAL_MOVEMENT,
|
||||
OPTION_NO_LITERAL_MOVEMENT,
|
||||
OPTION_ABI_WINDOWED,
|
||||
OPTION_ABI_CALL0,
|
||||
};
|
||||
|
||||
/* The initial parser states. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue