From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id A749B3858D20 for ; Fri, 4 Feb 2022 21:05:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A749B3858D20 Received: by mail-pl1-x631.google.com with SMTP id x3so6199172pll.3 for ; Fri, 04 Feb 2022 13:05:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=dMlhI4kzSCpqBW74G+UseVPWi6tRFpDXTBR8RmEbhOY=; b=mtSZg6ISZCSDJ0HeKoEHzEA9niN/wueeqEGyLu4yMl5Uu0gIKppdr/uvaqs7mKiigi BAHBWr6a4MJar7njzuQCGy2oUphb/Xl0AgzRKbhiNF3jEaFKiNLlfzVC2EzokjF33bxK P66WgcKsYzPfnPa+2cYVwNOcnb6Cdt/Mxa7nOFQABlVFaoUTyjVXEc12TqkzbLYKKSIA +fYfGmT8uP3ESrsz81gGsJ2vWfm9SdtBMbm298RBceyJ2d5AcdyxW2m+XRg6+3nHwtHf EYb1JUvOFKwwhYppt+WUIbRzXhfYII8LTfweP6aE0XpSEsiEKYZL4f2tmE3YJejCyQVT o2rg== X-Gm-Message-State: AOAM532q5KqkZkVDknUWp1crFdVsEAAufMYX64f+7JikuCLCzkFE1lKN VukchePYUR+vyicXods+kTeXC3PbQGg= X-Google-Smtp-Source: ABdhPJwXkFlMUWZhQ9ItA4A8kdoacOkKiTx48vBxjzg7OJYpedWxSnOy+TBhBNXdHSKaoKdKzRwPBw== X-Received: by 2002:a17:902:904b:: with SMTP id w11mr5035707plz.87.1644008752140; Fri, 04 Feb 2022 13:05:52 -0800 (PST) Received: from gnu-tgl-3.localdomain ([172.58.38.240]) by smtp.gmail.com with ESMTPSA id b4sm3640453pfv.188.2022.02.04.13.05.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Feb 2022 13:05:51 -0800 (PST) Received: from gnu-tgl-3.. (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id A3D85C0695 for ; Fri, 4 Feb 2022 13:05:50 -0800 (PST) From: "H.J. Lu" To: binutils@sourceware.org Subject: [PATCH] ld: Ad emultempl/emulation.em Date: Fri, 4 Feb 2022 13:05:50 -0800 Message-Id: <20220204210550.1410672-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3029.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Feb 2022 21:05:59 -0000 Add emultempl/emulation.em to define ld_${EMULATION_NAME}_emulation so that new emulation hooks can be added easily. * emultempl/aix.em (LDEMUL_AFTER_OPEN): New. (LDEMUL_SET_OUTPUT_ARCH): Likewise. (LDEMUL_CHOOSE_TARGET): Likewise. (LDEMUL_BEFORE_ALLOCATION): Likewise. (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Likewise. (LDEMUL_OPEN_DYNAMIC_ARCHIVE): Likewise. (LDEMUL_PARSE_ARGS): Likewise. (LDEMUL_ADD_OPTIONS): Likewise. (LDEMUL_HANDLE_OPTION): Likewise. (LDEMUL_UNRECOGNIZED_FILE): Likewise. (LDEMUL_PRINT_SYMBOL): Likewise. (ld_${EMULATION_NAME}_emulation): Removed. Source ${srcdir}/emultempl/emulation.em. * emultempl/beos.em (gld_${EMULATION_NAME}_before_parse): Renamed to ... (gld${EMULATION_NAME}_before_parse): This. (gld_${EMULATION_NAME}_set_symbols): Renamed to ... (gld${EMULATION_NAME}_set_symbols): This. (gld_${EMULATION_NAME}_after_open): Renamed to ... (gld${EMULATION_NAME}_after_open): This. (gld_${EMULATION_NAME}_before_allocation): Renamed to ... (gld${EMULATION_NAME}_before_allocation): This. (gld_${EMULATION_NAME}_get_script): Renamed to ... (gld${EMULATION_NAME}_get_script): This. (LDEMUL_AFTER_OPEN): New. (LDEMUL_BEFORE_ALLOCATION): Likewise. (LDEMUL_PLACE_ORPHAN): Likewise. (LDEMUL_SET_SYMBOLS): Likewise. (LDEMUL_ADD_OPTIONS): Likewise. (LDEMUL_HANDLE_OPTION): Likewise. (ld_${EMULATION_NAME}_emulation): Removed. Source ${srcdir}/emultempl/emulation.em. * emultempl/elf.em (LDEMUL_AFTER_PARSE): New. (LDEMUL_AFTER_OPEN): Likewise. (LDEMUL_BEFORE_PLACE_ORPHANS): Likewise. (LDEMUL_AFTER_ALLOCATION): Likewise. (LDEMUL_SET_OUTPUT_ARCH): Likewise. (LDEMUL_BEFORE_ALLOCATION): Likewise. (LDEMUL_OPEN_DYNAMIC_ARCHIVE): Likewise. (LDEMUL_PLACE_ORPHAN): Likewise. (LDEMUL_ADD_OPTIONS): Likewise. (LDEMUL_HANDLE_OPTION): Likewise. (LDEMUL_LIST_OPTIONS): Likewise. (LDEMUL_UNRECOGNIZED_FILE): Likewise. (ld_${EMULATION_NAME}_emulation): Removed. Source ${srcdir}/emultempl/emulation.em. * emultempl/emulation.em: New file. * emultempl/generic.em (ld_${EMULATION_NAME}_emulation): Removed. Source ${srcdir}/emultempl/emulation.em. * emultempl/msp430.em (LDEMUL_AFTER_OPEN): New. (LDEMUL_AFTER_ALLOCATION): Likewise. (LDEMUL_PLACE_ORPHAN): Likewise. (LDEMUL_FINISH): Likewise. (LDEMUL_ADD_OPTIONS): Likewise. (LDEMUL_HANDLE_OPTION): Likewise. (LDEMUL_LIST_OPTIONS): Likewise. (ld_${EMULATION_NAME}_emulation): Removed. Source ${srcdir}/emultempl/emulation.em. * emultempl/pe.em (gld_${EMULATION_NAME}_before_parse): Renamed to ... (gld${EMULATION_NAME}_before_parse): This. (gld_${EMULATION_NAME}_list_options): Renamed to ... (gld${EMULATION_NAME}_list_options): This. (gld_${EMULATION_NAME}_set_symbols): Renamed to ... (gld${EMULATION_NAME}_set_symbols): This. (gld_${EMULATION_NAME}_after_parse): Renamed to ... (gld${EMULATION_NAME}_after_parse): This. (gld_${EMULATION_NAME}_after_open): Renamed to ... (gld${EMULATION_NAME}_after_open): This. (gld_${EMULATION_NAME}_before_allocation): Renamed to ... (gld${EMULATION_NAME}_before_allocation): This. (gld_${EMULATION_NAME}_unrecognized_file): Renamed to ... (gld${EMULATION_NAME}_unrecognized_file): This. (gld_${EMULATION_NAME}_recognized_file): Renamed to ... (gld${EMULATION_NAME}_recognized_file): This. (gld_${EMULATION_NAME}_finish): Renamed to ... (gld${EMULATION_NAME}_finish): This. (gld_${EMULATION_NAME}_place_orphan): Renamed to ... (gld${EMULATION_NAME}_place_orphan): This. (gld_${EMULATION_NAME}_open_dynamic_archive): Renamed to ... (gld${EMULATION_NAME}_open_dynamic_archive): This. (gld_${EMULATION_NAME}_find_potential_libraries): Renamed to ... (gld${EMULATION_NAME}_find_potential_libraries): This. (gld_${EMULATION_NAME}_get_script): Renamed to ... (gld${EMULATION_NAME}_get_script): This. (LDEMUL_AFTER_PARSE): New. (LDEMUL_AFTER_OPEN): Likewise. (LDEMUL_BEFORE_ALLOCATION): Likewise. (LDEMUL_FINISH=): Likewise. (LDEMUL_OPEN_DYNAMIC_ARCHIVE): Likewise. (LDEMUL_PLACE_ORPHAN): Likewise. (LDEMUL_SET_SYMBOLS): Likewise. (LDEMUL_ADD_OPTIONS): Likewise. (LDEMUL_HANDLE_OPTION): Likewise. (LDEMUL_UNRECOGNIZED_FILE): Likewise. (LDEMUL_LIST_OPTIONS): Likewise. (LDEMUL_RECOGNIZED_FILE): Likewise. (LDEMUL_FIND_POTENTIAL_LIBRARIES): Likewise. (ld_${EMULATION_NAME}_emulation): Removed. Source ${srcdir}/emultempl/emulation.em. * emultempl/pep.em (gld_${EMULATION_NAME}_before_parse): Renamed to ... (gld${EMULATION_NAME}_before_parse): This. (gld_${EMULATION_NAME}_list_options): Renamed to ... (gld${EMULATION_NAME}_list_options): This. (gld_${EMULATION_NAME}_set_symbols): Renamed to ... (gld${EMULATION_NAME}_set_symbols): This. (gld_${EMULATION_NAME}_after_parse): Renamed to ... (gld${EMULATION_NAME}_after_parse): This. (gld_${EMULATION_NAME}_after_open): Renamed to ... (gld${EMULATION_NAME}_after_open): This. (gld_${EMULATION_NAME}_before_allocation): Renamed to ... (gld${EMULATION_NAME}_before_allocation): This. (gld_${EMULATION_NAME}_unrecognized_file): Renamed to ... (gld${EMULATION_NAME}_unrecognized_file): This. (gld_${EMULATION_NAME}_recognized_file): Renamed to ... (gld${EMULATION_NAME}_recognized_file): This. (gld_${EMULATION_NAME}_finish): Renamed to ... (gld${EMULATION_NAME}_finish): This. (gld_${EMULATION_NAME}_place_orphan): Renamed to ... (gld${EMULATION_NAME}_place_orphan): This. (gld_${EMULATION_NAME}_open_dynamic_archive): Renamed to ... (gld${EMULATION_NAME}_open_dynamic_archive): This. (gld_${EMULATION_NAME}_find_potential_libraries): Renamed to ... (gld${EMULATION_NAME}_find_potential_libraries): This. (gld_${EMULATION_NAME}_get_script): Renamed to ... (gld${EMULATION_NAME}_get_script): This. (LDEMUL_AFTER_PARSE): New. (LDEMUL_AFTER_OPEN): Likewise. (LDEMUL_BEFORE_ALLOCATION): Likewise. (LDEMUL_FINISH=): Likewise. (LDEMUL_OPEN_DYNAMIC_ARCHIVE): Likewise. (LDEMUL_PLACE_ORPHAN): Likewise. (LDEMUL_SET_SYMBOLS): Likewise. (LDEMUL_ADD_OPTIONS): Likewise. (LDEMUL_HANDLE_OPTION): Likewise. (LDEMUL_UNRECOGNIZED_FILE): Likewise. (LDEMUL_LIST_OPTIONS): Likewise. (LDEMUL_RECOGNIZED_FILE): Likewise. (LDEMUL_FIND_POTENTIAL_LIBRARIES): Likewise. (ld_${EMULATION_NAME}_emulation): Removed. Source ${srcdir}/emultempl/emulation.em. * emultempl/ticoff.em (gld_${EMULATION_NAME}_list_options): Renamed to ... (gld${EMULATION_NAME}_list_options): This. (gld_${EMULATION_NAME}_before_parse): Renamed to ... (gld_${EMULATION_NAME}_get_script): Renamed to ... (gld${EMULATION_NAME}_get_script): This. (LDEMUL_ADD_OPTIONS): New. (LDEMUL_HANDLE_OPTION): Likewise. (LDEMUL_LIST_OPTIONS): Likewise. (ld_${EMULATION_NAME}_emulation): Removed. Source ${srcdir}/emultempl/emulation.em. * emultempl/vanilla.em (LDEMUL_BEFORE_PARSE): New. (LDEMUL_SET_OUTPUT_ARCH): Likewise. (LDEMUL_GET_SCRIPT): Likewise. (EMULATION_NAME): Likewise. (OUTPUT_FORMAT): Likewise. (ld_vanilla_emulation): Removed. Source ${srcdir}/emultempl/emulation.em. --- ld/emultempl/aix.em | 49 +++++++---------------- ld/emultempl/beos.em | 55 ++++++------------------- ld/emultempl/elf.em | 52 +++++++----------------- ld/emultempl/emulation.em | 40 +++++++++++++++++++ ld/emultempl/generic.em | 39 +----------------- ld/emultempl/msp430.em | 46 +++++---------------- ld/emultempl/pe.em | 84 ++++++++++++++------------------------- ld/emultempl/pep.em | 80 +++++++++++++------------------------ ld/emultempl/ticoff.em | 48 ++++------------------ ld/emultempl/vanilla.em | 44 ++++---------------- 10 files changed, 165 insertions(+), 372 deletions(-) create mode 100644 ld/emultempl/emulation.em diff --git a/ld/emultempl/aix.em b/ld/emultempl/aix.em index b82305dc09e..6807aaee1c8 100644 --- a/ld/emultempl/aix.em +++ b/ld/emultempl/aix.em @@ -1601,39 +1601,18 @@ gld${EMULATION_NAME}_print_symbol (struct bfd_link_hash_entry *hash_entry, return true; } - -struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = { - gld${EMULATION_NAME}_before_parse, - syslib_default, - hll_default, - after_parse_default, - gld${EMULATION_NAME}_after_open, - after_check_relocs_default, - before_place_orphans_default, - after_allocation_default, - gld${EMULATION_NAME}_set_output_arch, - gld${EMULATION_NAME}_choose_target, - gld${EMULATION_NAME}_before_allocation, - gld${EMULATION_NAME}_get_script, - "${EMULATION_NAME}", - "${OUTPUT_FORMAT}", - finish_default, - gld${EMULATION_NAME}_create_output_section_statements, - gld${EMULATION_NAME}_open_dynamic_archive, - 0, /* place_orphan */ - 0, /* set_symbols */ - gld${EMULATION_NAME}_parse_args, - gld${EMULATION_NAME}_add_options, - gld${EMULATION_NAME}_handle_option, - gld${EMULATION_NAME}_unrecognized_file, - NULL, /* list_options */ - NULL, /* recognized_file */ - NULL, /* find potential_libraries */ - NULL, /* new_vers_pattern */ - NULL, /* extra_map_file_text */ - ${LDEMUL_EMIT_CTF_EARLY-NULL}, - ${LDEMUL_ACQUIRE_STRINGS_FOR_CTF-NULL}, - ${LDEMUL_NEW_DYNSYM_FOR_CTF-NULL}, - gld${EMULATION_NAME}_print_symbol -}; EOF + +LDEMUL_AFTER_OPEN=gld${EMULATION_NAME}_after_open +LDEMUL_SET_OUTPUT_ARCH=gld${EMULATION_NAME}_set_output_arch +LDEMUL_CHOOSE_TARGET=gld${EMULATION_NAME}_choose_target +LDEMUL_BEFORE_ALLOCATION=gld${EMULATION_NAME}_before_allocation +LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=gld${EMULATION_NAME}_create_output_section_statements +LDEMUL_OPEN_DYNAMIC_ARCHIVE=gld${EMULATION_NAME}_open_dynamic_archive +LDEMUL_PARSE_ARGS=gld${EMULATION_NAME}_parse_args +LDEMUL_ADD_OPTIONS=gld${EMULATION_NAME}_add_options +LDEMUL_HANDLE_OPTION=gld${EMULATION_NAME}_handle_option +LDEMUL_UNRECOGNIZED_FILE=gld${EMULATION_NAME}_unrecognized_file +LDEMUL_PRINT_SYMBOL=gld${EMULATION_NAME}_print_symbol + +source_em ${srcdir}/emultempl/emulation.em diff --git a/ld/emultempl/beos.em b/ld/emultempl/beos.em index bebad8af2f7..93e85a792a3 100644 --- a/ld/emultempl/beos.em +++ b/ld/emultempl/beos.em @@ -62,7 +62,7 @@ static int dll; extern const char *output_filename; static void -gld_${EMULATION_NAME}_before_parse (void) +gld${EMULATION_NAME}_before_parse (void) { ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`); output_filename = "a.exe"; @@ -322,7 +322,7 @@ gld${EMULATION_NAME}_handle_option (int optc) read. */ static void -gld_${EMULATION_NAME}_set_symbols (void) +gld${EMULATION_NAME}_set_symbols (void) { /* Run through and invent symbols for all the names and insert the defaults. */ @@ -372,7 +372,7 @@ gld_${EMULATION_NAME}_set_symbols (void) } static void -gld_${EMULATION_NAME}_after_open (void) +gld${EMULATION_NAME}_after_open (void) { after_open_default (); @@ -606,7 +606,7 @@ sort_sections (lang_statement_union_type *s) } static void -gld_${EMULATION_NAME}_before_allocation (void) +gld${EMULATION_NAME}_before_allocation (void) { #ifdef TARGET_IS_armpe /* FIXME: we should be able to set the size of the interworking stub @@ -710,7 +710,7 @@ gld${EMULATION_NAME}_place_orphan (asection *s, } static char * -gld_${EMULATION_NAME}_get_script (int *isfile) +gld${EMULATION_NAME}_get_script (int *isfile) EOF if test x"$COMPILE_IN" = xyes @@ -759,42 +759,11 @@ fragment < Generate a base file for relocatable DLLs\n")); fprintf (file, _(" --dll Set image base to the default for DLLs\n")); @@ -1002,7 +1002,7 @@ compute_dll_image_base (const char *ofile) read. */ static void -gld_${EMULATION_NAME}_set_symbols (void) +gld${EMULATION_NAME}_set_symbols (void) { /* Run through and invent symbols for all the names and insert the defaults. */ @@ -1069,7 +1069,7 @@ gld_${EMULATION_NAME}_set_symbols (void) have been read. */ static void -gld_${EMULATION_NAME}_after_parse (void) +gld${EMULATION_NAME}_after_parse (void) { /* PR ld/6744: Warn the user if they have used an ELF-only option hoping it will work on PE. */ @@ -1382,7 +1382,7 @@ setup_build_id (bfd *ibfd) } static void -gld_${EMULATION_NAME}_after_open (void) +gld${EMULATION_NAME}_after_open (void) { after_open_default (); @@ -1803,7 +1803,7 @@ gld_${EMULATION_NAME}_after_open (void) } static void -gld_${EMULATION_NAME}_before_allocation (void) +gld${EMULATION_NAME}_before_allocation (void) { #if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_wince_pe) /* FIXME: we should be able to set the size of the interworking stub @@ -1849,7 +1849,7 @@ saw_option (char *option) #endif /* DLL_SUPPORT */ static bool -gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED) +gld${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED) { #ifdef DLL_SUPPORT const char *ext = entry->filename + strlen (entry->filename) - 4; @@ -1930,7 +1930,7 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB } static bool -gld_${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED) +gld${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED) { #ifdef DLL_SUPPORT #ifdef TARGET_IS_i386pe @@ -1952,7 +1952,7 @@ gld_${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUT } static void -gld_${EMULATION_NAME}_finish (void) +gld${EMULATION_NAME}_finish (void) { #if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_wince_pe) struct bfd_link_hash_entry * h; @@ -2052,9 +2052,9 @@ gld_${EMULATION_NAME}_finish (void) sort_sections. */ static lang_output_section_statement_type * -gld_${EMULATION_NAME}_place_orphan (asection *s, - const char *secname, - int constraint) +gld${EMULATION_NAME}_place_orphan (asection *s, + const char *secname, + int constraint) { const char *orig_secname = secname; char *dollar = NULL; @@ -2251,7 +2251,7 @@ gld_${EMULATION_NAME}_place_orphan (asection *s, } static bool -gld_${EMULATION_NAME}_open_dynamic_archive +gld${EMULATION_NAME}_open_dynamic_archive (const char *arch ATTRIBUTE_UNUSED, search_dirs_type *search, lang_input_statement_type *entry) @@ -2357,14 +2357,14 @@ gld_${EMULATION_NAME}_open_dynamic_archive } static int -gld_${EMULATION_NAME}_find_potential_libraries +gld${EMULATION_NAME}_find_potential_libraries (char *name, lang_input_statement_type *entry) { return ldfile_open_file_search (name, entry, "", ".lib"); } static char * -gld_${EMULATION_NAME}_get_script (int *isfile) +gld${EMULATION_NAME}_get_script (int *isfile) EOF if test x"$COMPILE_IN" = xyes @@ -2426,42 +2426,18 @@ fragment < Generate a base file for relocatable DLLs\n")); fprintf (file, _(" --dll Set image base to the default for DLLs\n")); @@ -945,7 +945,7 @@ compute_dll_image_base (const char *ofile) read. */ static void -gld_${EMULATION_NAME}_set_symbols (void) +gld${EMULATION_NAME}_set_symbols (void) { /* Run through and invent symbols for all the names and insert the defaults. */ @@ -1012,7 +1012,7 @@ gld_${EMULATION_NAME}_set_symbols (void) have been read. */ static void -gld_${EMULATION_NAME}_after_parse (void) +gld${EMULATION_NAME}_after_parse (void) { /* PR ld/6744: Warn the user if they have used an ELF-only option hoping it will work on PE+. */ @@ -1366,7 +1366,7 @@ setup_build_id (bfd *ibfd) } static void -gld_${EMULATION_NAME}_after_open (void) +gld${EMULATION_NAME}_after_open (void) { after_open_default (); @@ -1694,7 +1694,7 @@ gld_${EMULATION_NAME}_after_open (void) } static void -gld_${EMULATION_NAME}_before_allocation (void) +gld${EMULATION_NAME}_before_allocation (void) { is_underscoring (); before_allocation_default (); @@ -1719,7 +1719,7 @@ saw_option (char *option) #endif /* DLL_SUPPORT */ static bool -gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED) +gld${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED) { #ifdef DLL_SUPPORT const char *ext = entry->filename + strlen (entry->filename) - 4; @@ -1800,7 +1800,7 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB } static bool -gld_${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED) +gld${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED) { is_underscoring (); #ifdef DLL_SUPPORT @@ -1814,7 +1814,7 @@ gld_${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUT } static void -gld_${EMULATION_NAME}_finish (void) +gld${EMULATION_NAME}_finish (void) { is_underscoring (); finish_default (); @@ -1864,7 +1864,7 @@ gld_${EMULATION_NAME}_finish (void) sort_sections. */ static lang_output_section_statement_type * -gld_${EMULATION_NAME}_place_orphan (asection *s, +gld${EMULATION_NAME}_place_orphan (asection *s, const char *secname, int constraint) { @@ -2063,7 +2063,7 @@ gld_${EMULATION_NAME}_place_orphan (asection *s, } static bool -gld_${EMULATION_NAME}_open_dynamic_archive +gld${EMULATION_NAME}_open_dynamic_archive (const char *arch ATTRIBUTE_UNUSED, search_dirs_type *search, lang_input_statement_type *entry) @@ -2169,14 +2169,14 @@ gld_${EMULATION_NAME}_open_dynamic_archive } static int -gld_${EMULATION_NAME}_find_potential_libraries +gld${EMULATION_NAME}_find_potential_libraries (char *name, lang_input_statement_type *entry) { return ldfile_open_file_search (name, entry, "", ".lib"); } static char * -gld_${EMULATION_NAME}_get_script (int *isfile) +gld${EMULATION_NAME}_get_script (int *isfile) EOF if test x"$COMPILE_IN" = xyes @@ -2238,42 +2238,18 @@ fragment <