From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc2f.google.com (mail-oo1-xc2f.google.com [IPv6:2607:f8b0:4864:20::c2f]) by sourceware.org (Postfix) with ESMTPS id 420293858C42 for ; Wed, 17 Jan 2024 15:46:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 420293858C42 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 420293858C42 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::c2f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705506407; cv=none; b=SY+P67MhIaXYbLCaYlgci1D8VdlKjJdyl/Cp7ZfWCQx8Kdirp/0c+wEKCl7mHqn7FPAKkuSg8+q3wiCXGp8apI9cYtSIE++fF+24/i8ZKYlb447OCJcDCRg7H1Z1VEwU9i/JMWosiFI4TRObR41ccZswKYG1LSAwe1jXwS/NTfc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705506407; c=relaxed/simple; bh=2DCTCERhvfTaE6V9MFZh9B2OV9g2tSmzr6iQVnXsA6I=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=PPVpNHzsXx/84lVjEWhvfu6ucrcyqSaMIR8gYuQGwIs79nDlwXw2LaHmWdIvGqtHqJZGOM7v7Cyyer83w1B27rXPEAYLq0myv0+6wYv0aB7oGU+P1BSX0klHrmVCg7/Jt76JFjUrq9u49Z0vUlkYgUn5dzFkXahajhCQHDKi5fI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-5986d902ae6so4553758eaf.3 for ; Wed, 17 Jan 2024 07:46:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705506400; x=1706111200; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=IiGQ+4L5q67rlhVkgKJWjhIoQwXhABTyyqxtFpTofWI=; b=JNdDhp4WJpOUZiGBA266lbL30wRrHjgsyq8jQXlT3xNb+f9620WgMbzS02fVouUOzd cdsCAJ2aAh2joyAVlvpiiFs64KQgNvLvYQCgIRO6zIRmhBny+LsW4Co58Up9ssMT+qRn QhmYM8aUiwHcPnmnVj8G3/pnXRxOgWSKWv7l3v1cjqQj4iIKlfJxO6i0Elztov/mzaea E/IuZC8WNlX5iVRAJIoGDVfW671cALs0TJm+bVQJXc/brnzkDSz80NIreRdpk2ZoFOwe teL507g9lNJ7XrUpi1uqtmrl/qBlHAm5RZwnilrbBHkZExKIf4kPMA/NS+HihWEH4ddK UNJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705506400; x=1706111200; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IiGQ+4L5q67rlhVkgKJWjhIoQwXhABTyyqxtFpTofWI=; b=RdrreY9lWfZJeCcXxsn8c0Ozl0uU2hyXk9Dv952zBj2TfiJbUqLToUNvUDLgAZHT3e 3DHcTzJaZEnqQmo5b5AYm1bD5fFZL/sMC8F4tCp2Rm4NTrltZ49BapdpUSVbwKTetlT4 w5fvXy7dk8T88CJBw0cm7JC3zwwqnHsWdlECvG367VbQgmYGXyO/jXs4MVWt0e/I64bZ N2OILhQRsMlUMr+F1JwcJRz+FKPp7TMDAViDqZePlu+7Gjr6uZFoEx3AeFlZp3Q8G3em 5A9WRHV5Ms7JJ7cXfIyevcvnnmbvW9W5fF5QDTQrwvcK3fvu7BQhkOmWLC0dkdQr5KVt zMqw== X-Gm-Message-State: AOJu0YxqVfnhHhZiQvu8zSkW4RggGbxQ5/5XgzV52JRvQpI4ZlJnDv0q hhNr/Gaz2x/FC+5FJgJoDx5Dr/x1uLQ= X-Google-Smtp-Source: AGHT+IG6dWLe6gF3q8koDYfRJDKIAX2Gs2cWOSir8n7OQh5uz7PUWVuo05//fSaE/93LRNu6JV6lJg== X-Received: by 2002:a05:6359:728e:b0:173:24:b272 with SMTP id uw14-20020a056359728e00b001730024b272mr6116111rwb.23.1705506399368; Wed, 17 Jan 2024 07:46:39 -0800 (PST) Received: from gnu-cfl-3.localdomain ([172.56.168.9]) by smtp.gmail.com with ESMTPSA id t187-20020a6281c4000000b006d99125b114sm1648366pfd.65.2024.01.17.07.46.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 07:46:38 -0800 (PST) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id 6BAC77400A2 for ; Wed, 17 Jan 2024 07:46:37 -0800 (PST) From: "H.J. Lu" To: binutils@sourceware.org Subject: [PATCH] ld: Put all emulation options in ldlex.h Date: Wed, 17 Jan 2024 07:46:37 -0800 Message-ID: <20240117154637.1735065-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3024.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,UPPERCASE_50_75 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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. --- ld/emulparams/elf32mcore.sh | 4 - ld/emulparams/plt_unwind.sh | 5 - ld/emultempl/aarch64elf.em | 10 -- ld/emultempl/aix.em | 50 ++----- ld/emultempl/alphaelf.em | 6 - ld/emultempl/armelf.em | 25 ---- ld/emultempl/avrelf.em | 9 -- ld/emultempl/beos.em | 16 -- ld/emultempl/bfin.em | 5 - ld/emultempl/cskyelf.em | 6 - ld/emultempl/elf.em | 22 +-- ld/emultempl/hppaelf.em | 5 - ld/emultempl/ia64elf.em | 4 - ld/emultempl/m68hc1xelf.em | 5 - ld/emultempl/m68kelf.em | 4 - ld/emultempl/metagelf.em | 4 - ld/emultempl/mipself.em | 12 -- ld/emultempl/msp430.em | 5 +- ld/emultempl/nds32elf.em | 12 -- ld/emultempl/nto.em | 8 - ld/emultempl/pe.em | 78 ---------- ld/emultempl/pep.em | 73 --------- ld/emultempl/ppc32elf.em | 20 --- ld/emultempl/ppc64elf.em | 35 ----- ld/emultempl/riscvelf.em | 10 -- ld/emultempl/rxelf.em | 7 - ld/emultempl/s390.em | 4 - ld/emultempl/scoreelf.em | 1 - ld/emultempl/spuelf.em | 24 --- ld/emultempl/tic6xdsbt.em | 6 - ld/emultempl/ticoff.em | 2 +- ld/emultempl/vms.em | 2 +- ld/emultempl/vxworks.em | 6 - ld/emultempl/xtensaelf.em | 14 +- ld/ldlex.h | 286 ++++++++++++++++++++++++++++++++++++ 35 files changed, 304 insertions(+), 481 deletions(-) diff --git a/ld/emulparams/elf32mcore.sh b/ld/emulparams/elf32mcore.sh index 88a8cb6e70b..7d433fc0f2d 100644 --- a/ld/emulparams/elf32mcore.sh +++ b/ld/emulparams/elf32mcore.sh @@ -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}, ' diff --git a/ld/emulparams/plt_unwind.sh b/ld/emulparams/plt_unwind.sh index ab16156415e..beb67260443 100644 --- a/ld/emulparams/plt_unwind.sh +++ b/ld/emulparams/plt_unwind.sh @@ -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}, 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 < @@ -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 < #include "elf-bfd.h" @@ -556,28 +557,7 @@ EOF fi fi -if test -n "$PARSE_AND_LIST_PROLOGUE" ; then fragment <