From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id 74CD23858D28 for ; Fri, 4 Feb 2022 19:34:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 74CD23858D28 Received: by mail-pg1-x52d.google.com with SMTP id g20so5810559pgn.10 for ; Fri, 04 Feb 2022 11:34:09 -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:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CeJuyeuT+KsmlaZMfy0DHa7IBxn75SpcEI/yhLAfk80=; b=7dUcDK9qmLCkJp8xElTXSVS2ITxZUdqM4B5eRzSLYQPAGOzHKr9pVqoYOCikXIgsRZ cb4hu1H9m/SiSrg8xYrmWkLxBA0CV75p73QUcYxMcH5p4p8Gv8Aeku2KVjj5WK5LzrUm tbnxPTeSQOR2Sx7wke9Y7lq1fzip99Soh6zkskf96BYKnqjr264wNIgbuCXpizb68HQI oyya3PMUY9sfiGbKOaFhG6mfEML3XuorYfIHq7uATIHkcQpMxy3ZT7BnINvViUgtCHUA OD6cXxM4EdrYfuBSmOLT1Q4F9ixFxmbCAb7z8jkTI6zT1tKya5bqgxgfDUlPGyJf7vZq WbtQ== X-Gm-Message-State: AOAM533Ft5L0nTnddEuCWWtPBguis54zCg7ZQk26Fhd47GTtLvxGdZAk h6alGFsfECdjktJ2Gvm3XtiAkZWD9OM= X-Google-Smtp-Source: ABdhPJyvTC7nRRIGRUJp94WyJOURMwlAMRb1elekSxmp7KZSd2tJzHGhXgrtbhWVr2wy6gcNS5xDQQ== X-Received: by 2002:a05:6a00:1150:: with SMTP id b16mr4587697pfm.57.1644003248457; Fri, 04 Feb 2022 11:34:08 -0800 (PST) Received: from gnu-tgl-3.localdomain ([172.58.38.240]) by smtp.gmail.com with ESMTPSA id n13sm544583pfv.212.2022.02.04.11.34.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Feb 2022 11:34:07 -0800 (PST) Received: from gnu-tgl-3.. (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id C473DC0654; Fri, 4 Feb 2022 11:34:06 -0800 (PST) From: "H.J. Lu" To: binutils@sourceware.org Subject: [PATCH] ld: Remove emultempl/armcoff.em Date: Fri, 4 Feb 2022 11:34:06 -0800 Message-Id: <20220204193406.1245920-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 19:34:11 -0000 Remove emultempl/armcoff.em which has been unused after commit 2ac93be706418f3b2aebeb22159a328023faed52 Author: Alan Modra Date: Mon Apr 16 20:33:36 2018 +0930 Remove arm-aout and arm-coff support This also removes arm-netbsd (not arm-netbsdelf!), arm-openbsd, and arm-riscix. Those targets weren't on the obsolete list but they are all aout, and it doesn't make all that much sense to remove arm-aout without removing them too. * emultempl/armcoff.em: Removed. --- ld/emultempl/armcoff.em | 293 ---------------------------------------- 1 file changed, 293 deletions(-) delete mode 100644 ld/emultempl/armcoff.em diff --git a/ld/emultempl/armcoff.em b/ld/emultempl/armcoff.em deleted file mode 100644 index b82855ae04f..00000000000 --- a/ld/emultempl/armcoff.em +++ /dev/null @@ -1,293 +0,0 @@ -# This shell script emits a C file. -*- C -*- -# It does some substitutions. -fragment < Set the entry point to be Thumb symbol \n")); -} - -static bool -gld${EMULATION_NAME}_handle_option (int optc) -{ - switch (optc) - { - default: - return false; - - case OPTION_SUPPORT_OLD_CODE: - support_old_code = 1; - break; - - case OPTION_THUMB_ENTRY: - thumb_entry_symbol = optarg; - break; - } - - return true; -} - -static void -gld${EMULATION_NAME}_before_parse (void) -{ -#ifndef TARGET_ /* I.e., if not generic. */ - ldfile_set_output_arch ("`echo ${ARCH}`", bfd_arch_unknown); -#endif /* not TARGET_ */ -} - -/* This is called after the sections have been attached to output - sections, but before any sizes or addresses have been set. */ - -static void -gld${EMULATION_NAME}_before_allocation (void) -{ - /* we should be able to set the size of the interworking stub section */ - - /* Here we rummage through the found bfds to collect glue information */ - /* FIXME: should this be based on a command line option? krk@cygnus.com */ - { - LANG_FOR_EACH_INPUT_STATEMENT (is) - { - if (! bfd_arm_process_before_allocation - (is->the_bfd, & link_info, support_old_code)) - { - /* xgettext:c-format */ - einfo (_("%P: errors encountered processing file %s\n"), - is->filename); - } - } - } - - /* We have seen it all. Allocate it, and carry on */ - bfd_arm_allocate_interworking_sections (& link_info); - - before_allocation_default (); -} - -static void -gld${EMULATION_NAME}_after_open (void) -{ - after_open_default (); - - if (strstr (bfd_get_target (link_info.output_bfd), "arm") == NULL) - { - /* The arm backend needs special fields in the output hash structure. - These will only be created if the output format is an arm format, - hence we do not support linking and changing output formats at the - same time. Use a link followed by objcopy to change output formats. */ - einfo (_("%F%P: error: cannot change output format " - "whilst linking %s binaries\n"), "ARM"); - return; - } - - { - LANG_FOR_EACH_INPUT_STATEMENT (is) - { - if (bfd_arm_get_bfd_for_interworking (is->the_bfd, & link_info)) - break; - } - } -} - -static void -gld${EMULATION_NAME}_finish (void) -{ - if (thumb_entry_symbol != NULL) - { - struct bfd_link_hash_entry * h; - - h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol, - false, false, true); - - if (h != (struct bfd_link_hash_entry *) NULL - && (h->type == bfd_link_hash_defined - || h->type == bfd_link_hash_defweak) - && h->u.def.section->output_section != NULL) - { - static char buffer[32]; - bfd_vma val; - - /* Special procesing is required for a Thumb entry symbol. The - bottom bit of its address must be set. */ - val = (h->u.def.value - + bfd_section_vma (h->u.def.section->output_section) - + h->u.def.section->output_offset); - - val |= 1; - - /* Now convert this value into a string and store it in entry_symbol - where the lang_finish() function will pick it up. */ - buffer[0] = '0'; - buffer[1] = 'x'; - - sprintf_vma (buffer + 2, val); - - if (entry_symbol.name != NULL && entry_from_cmdline) - einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"), - thumb_entry_symbol, entry_symbol.name); - entry_symbol.name = buffer; - } - else - einfo (_("%P: warning: cannot find thumb start symbol %s\n"), - thumb_entry_symbol); - } - - finish_default (); -} - -static char * -gld${EMULATION_NAME}_get_script (int *isfile) -EOF - -if test x"$COMPILE_IN" = xyes -then -# Scripts compiled in. - -# sed commands to quote an ld script as a C string. -sc="-f stringify.sed" - -fragment <> e${EMULATION_NAME}.c -echo ' ; else if (bfd_link_relocatable (&link_info)) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c -echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c -echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c -echo ' ; else return' >> e${EMULATION_NAME}.c -sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c -echo '; }' >> e${EMULATION_NAME}.c - -else -# Scripts read from the filesystem. - -fragment <