From patchwork Thu Feb 16 02:04:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 57812 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp51540wrn; Wed, 15 Feb 2023 18:05:07 -0800 (PST) X-Google-Smtp-Source: AK7set+Na/Afh3qVy9ARcJLKW3jW/CUotWNx50/RvEVQ/NjewGZuoSo2SGFkELbkhzVxBI8EcHxY X-Received: by 2002:aa7:c6d7:0:b0:4ac:54d4:b011 with SMTP id b23-20020aa7c6d7000000b004ac54d4b011mr3803012eds.21.1676513107142; Wed, 15 Feb 2023 18:05:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676513107; cv=none; d=google.com; s=arc-20160816; b=TNQhIVBa1yYR4vysAzfxmrZ5DuY2BQWpT7IDADnW018hKnCSU6T3P6oloennQbnSs3 rwKdk/ef2p07dh+IMJRXE4NAppBO2Xr4Y3NPoY22de7cDANjz9i7D3vkAHoOYgMxxThr zGwc3Sr37Iaf23EroImzcpb58U0jkkgl3Wi4InzhZ/F1TKu1tD9BH2XATw/Crfm2Jtdf yMMnGJdYmu4SlabvwxQHv6LgaTLlS+JpgmLH/LwEdXq15Itqzi3riVyLQcNb281Z69W0 HKURNsFqpGs6/ZEGWigFyij02fthlu9rfFlAfSneu7Hue+SQP6uDZVZsfGXrNbs+zwNy KppA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=+RCAJIHXwme1BdCN1It1PE0nT77cwNX2EYvL2hlx2PI=; b=UT9EuD7u2AXizCVYBsZmPVm+BCM/pOzuuxcFVFe8IDjSFcTcx/jHiupr69f+l8Kfsn W5Ts9KsejAvc2faphaTFosLSjFoIIIbVa/wOMYyl/pGzpS5OdK2n7KBBPcHNUzVLgSj6 rOVKAFnc2PXEfVBPlHFwL3zuo8xNHgbtlNv5pgwDCE8rsWcUys95C58GcZ+mk4cDd6Um QvdCtAS6EWnnWmuqkwy1v1YDDAHsQ2sNzEi/Wlgiwjq+kKVU/6B0+zaF4ptzjpQbk5J5 Q0emZHsi7E0Oih5QVqUbL/CyDjN0ZUuG8l+EH9V8CRQSLtoc7c7jPx0wCCNp+S9s63Ks EgMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=r9gsYkXr; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id e4-20020a056402088400b004ace3ece9f8si537359edy.504.2023.02.15.18.05.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 18:05:07 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=r9gsYkXr; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D75BB385841D for ; Thu, 16 Feb 2023 02:05:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D75BB385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676513104; bh=+RCAJIHXwme1BdCN1It1PE0nT77cwNX2EYvL2hlx2PI=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=r9gsYkXrJgUbkSBdgJ6fk2iktWQ/rjnVTPFG0WO9LAXeJArepALCYWJjnoerItG1J fdtiYYpdL5Z9E5i/5JYWFcaoBXAph3cD46C/9XaUaJtGIrHYlFr+KYpllhKdYDT8HO 3xTJpqtbTmk+xn8W2+3uPXsdGJE0Ne+By4KJN6tg= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by sourceware.org (Postfix) with ESMTPS id 6AE733858D33 for ; Thu, 16 Feb 2023 02:04:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6AE733858D33 Received: by mail-pg1-x52b.google.com with SMTP id e1so346194pgg.9 for ; Wed, 15 Feb 2023 18:04:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+RCAJIHXwme1BdCN1It1PE0nT77cwNX2EYvL2hlx2PI=; b=l6awDpN6XZ4QgwZn//5SGwdAf8unUutxoxHI2sEG+z3nWL1FQuL7XCsCTKczfJPBsC NniktIMp9WmWH4g5+ZdIKpidFE0RO1SVIayJxkNtnWfm/oCKxBPyBcqZ/5j+aIj8ZYZX LC7/nKj/5onK+klq9kwoy+U9vdSwJoXmMNCUZm5sHA5PrHBQaRQlmJjkDp/RKTGRoM1f LDHKrJ7TIQO3kuljdqecgBqH+rezKflG5ysDDXoKWbCNZuZnOYS97C12TffU03Jaweot 2upv9NvHijnGCzq2hxvuYNZEQ6DsiEgKb6iebG5qvRW3hBZvohsABO08RFcdFbTsLgUc cbfQ== X-Gm-Message-State: AO0yUKXoZixzOJjvF/4pgFm8Mp2CmqhJu/hyPByvr3XhwJ/0tDqtRbKE w0WHgR3Yxt7Wucq46CKSsvUUKsAE0WY= X-Received: by 2002:a62:384d:0:b0:5a8:bee5:d0dd with SMTP id f74-20020a62384d000000b005a8bee5d0ddmr3645195pfa.7.1676513092963; Wed, 15 Feb 2023 18:04:52 -0800 (PST) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:e39e:7b87:db68:a9f9]) by smtp.gmail.com with ESMTPSA id 23-20020aa79157000000b005a8686b72fcsm33619pfi.75.2023.02.15.18.04.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 18:04:52 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 66C961142CDA; Thu, 16 Feb 2023 12:34:50 +1030 (ACDT) Date: Thu, 16 Feb 2023 12:34:50 +1030 To: binutils@sourceware.org Subject: Delete PROGRESS macros Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3034.9 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 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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-Patchwork-Original-From: Alan Modra via Binutils From: Alan Modra Reply-To: Alan Modra Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757951408010668862?= X-GMAIL-MSGID: =?utf-8?q?1757951408010668862?= I don't see much point in cluttering the source with the PROGRESS macros, which of course do nothing at all with the definitions in progress.h. progress.h is unchanged apart from the copyright comment since commit d4d4c53c68f0 in 1994. binutils/ * ar.c: Don't include progress.h, or invoke PROGRESS macros. * nm.c: Likewise. * objcopy.c: Likewise. * objdump.c: Likewise. gas/ * as.h: Don't include progress.h. * as.c: Don't invoke PROGRESS macros. * write.c: Likewise. include/ * progress.h: Delete. ld/ * ldmain.c: Don't include progress.h, or invoke PROGRESS macros. diff --git a/binutils/ar.c b/binutils/ar.c index 2c901ca327c..0c6ccf909b0 100644 --- a/binutils/ar.c +++ b/binutils/ar.c @@ -26,7 +26,6 @@ #include "sysdep.h" #include "bfd.h" #include "libiberty.h" -#include "progress.h" #include "getopt.h" #include "aout/ar.h" #include "bucomm.h" @@ -198,10 +197,7 @@ map_over_members (bfd *arch, void (*function)(bfd *), char **files, int count) if (count == 0) { for (head = arch->archive_next; head; head = head->archive_next) - { - PROGRESS (1); - function (head); - } + function (head); return; } @@ -223,7 +219,6 @@ map_over_members (bfd *arch, void (*function)(bfd *), char **files, int count) { const char * filename; - PROGRESS (1); /* PR binutils/15796: Once an archive element has been matched do not match it again. If the user provides multiple same-named parameters on the command line their intent is to match multiple @@ -749,8 +744,6 @@ main (int argc, char **argv) is_ranlib = 0; } - START_PROGRESS (program_name, 0); - if (bfd_init () != BFD_INIT_MAGIC) fatal (_("fatal error: libbfd ABI mismatch")); set_default_bfd_target (); @@ -952,8 +945,6 @@ main (int argc, char **argv) } } - END_PROGRESS (program_name); - xexit (0); return 0; } @@ -1063,7 +1054,6 @@ open_inarch (const char *archive_filename, const char *file) next_one; next_one = bfd_openr_next_archived_file (arch, next_one)) { - PROGRESS (1); *last_one = next_one; last_one = &next_one->archive_next; } diff --git a/binutils/nm.c b/binutils/nm.c index c3c407af266..e91aa676931 100644 --- a/binutils/nm.c +++ b/binutils/nm.c @@ -20,7 +20,6 @@ #include "sysdep.h" #include "bfd.h" -#include "progress.h" #include "getopt.h" #include "aout/stab_gnu.h" #include "aout/ranlib.h" @@ -786,8 +785,6 @@ filter_symbols (bfd *abfd, bool is_dynamic, void *minisyms, int keep = 0; asymbol *sym; - PROGRESS (1); - sym = bfd_minisymbol_to_symbol (abfd, is_dynamic, (const void *) from, store); if (sym == NULL) bfd_fatal (bfd_get_filename (abfd)); @@ -1183,8 +1180,6 @@ print_symbol (bfd * abfd, symbol_info syminfo; struct extended_symbol_info info; - PROGRESS (1); - format->print_symbol_filename (archive_bfd, abfd); bfd_get_symbol_info (abfd, sym, &syminfo); @@ -1604,8 +1599,6 @@ display_archive (bfd *file) for (;;) { - PROGRESS (1); - arfile = bfd_openr_next_archived_file (file, arfile); if (arfile == NULL) @@ -2005,8 +1998,6 @@ main (int argc, char **argv) bfd_plugin_set_program_name (program_name); #endif - START_PROGRESS (program_name, 0); - expandargv (&argc, &argv); if (bfd_init () != BFD_INIT_MAGIC) @@ -2193,13 +2184,10 @@ main (int argc, char **argv) /* We were given several filenames to do. */ while (optind < argc) { - PROGRESS (1); if (!display_file (argv[optind++])) retval++; } - END_PROGRESS (program_name); - exit (retval); return retval; } diff --git a/binutils/objcopy.c b/binutils/objcopy.c index b9d946a38e4..cf830442b3c 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -20,7 +20,6 @@ #include "sysdep.h" #include "bfd.h" -#include "progress.h" #include "getopt.h" #include "libiberty.h" #include "bucomm.h" @@ -6053,8 +6052,6 @@ main (int argc, char *argv[]) program_name = argv[0]; xmalloc_set_program_name (program_name); - START_PROGRESS (program_name, 0); - expandargv (&argc, &argv); strip_symbols = STRIP_UNDEF; @@ -6089,8 +6086,6 @@ main (int argc, char *argv[]) else copy_main (argc, argv); - END_PROGRESS (program_name); - xexit (status); return status; } diff --git a/binutils/objdump.c b/binutils/objdump.c index 8cf9d059801..984c7219a0c 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -52,7 +52,6 @@ #include "bfd.h" #include "elf-bfd.h" #include "coff-bfd.h" -#include "progress.h" #include "bucomm.h" #include "elfcomm.h" #include "demanguse.h" @@ -5838,8 +5837,6 @@ main (int argc, char **argv) xmalloc_set_program_name (program_name); bfd_set_error_program_name (program_name); - START_PROGRESS (program_name, 0); - expandargv (&argc, &argv); if (bfd_init () != BFD_INIT_MAGIC) @@ -6221,7 +6218,5 @@ main (int argc, char **argv) free (dump_ctf_parent_name); free ((void *) source_comment); - END_PROGRESS (program_name); - return exit_status; } diff --git a/gas/as.c b/gas/as.c index 23240989301..598bfd56cf5 100644 --- a/gas/as.c +++ b/gas/as.c @@ -1250,7 +1250,6 @@ perform_an_assembly_pass (int argc, char ** argv) { if (*argv) { /* Is it a file-name argument? */ - PROGRESS (1); saw_a_file++; /* argv->"" if stdin desired, else->filename. */ read_a_source_file (*argv); @@ -1301,7 +1300,6 @@ gas_early_init (int *argcp, char ***argvp) myname = **argvp; xmalloc_set_program_name (myname); bfd_set_error_program_name (myname); - START_PROGRESS (myname, 0); expandargv (argcp, argvp); @@ -1350,8 +1348,6 @@ gas_init (void) if (flag_print_statistics) xatexit (dump_statistics); - PROGRESS (1); - dot_symbol_init (); #ifdef tc_init_after_args @@ -1389,7 +1385,6 @@ main (int argc, char ** argv) struct stat sob; gas_early_init (&argc, &argv); - PROGRESS (1); /* Call parse_args before gas_init so that switches like --hash-size can be honored. */ @@ -1436,8 +1431,6 @@ main (int argc, char ** argv) gas_init (); - PROGRESS (1); - /* Assemble it. */ perform_an_assembly_pass (argc, argv); @@ -1513,8 +1506,6 @@ main (int argc, char ** argv) input_scrub_end (); - END_PROGRESS (myname); - /* Use xexit instead of return, because under VMS environments they may not place the same interpretation on the value given. */ if (had_errors () != 0) diff --git a/gas/as.h b/gas/as.h index 06dfc588f5c..4c5fa9ecf7d 100644 --- a/gas/as.h +++ b/gas/as.h @@ -77,9 +77,6 @@ #include "bfd.h" #include "libiberty.h" -/* Define the standard progress macros. */ -#include "progress.h" - /* Other stuff from config.h. */ #ifdef NEED_DECLARATION_ENVIRON extern char **environ; diff --git a/gas/write.c b/gas/write.c index fe9bb3da479..8273b7a42f1 100644 --- a/gas/write.c +++ b/gas/write.c @@ -2328,8 +2328,6 @@ write_object_file (void) maybe_generate_build_notes (); #endif - PROGRESS (1); - #ifdef tc_frob_file_before_adjust tc_frob_file_before_adjust (); #endif @@ -2472,8 +2470,6 @@ write_object_file (void) } } - PROGRESS (1); - /* Now do any format-specific adjustments to the symbol table, such as adding file symbols. */ #ifdef tc_adjust_symtab diff --git a/include/progress.h b/include/progress.h deleted file mode 100644 index a2b4f2489b3..00000000000 --- a/include/progress.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Default definitions for progress macros. - Copyright (C) 1994-2023 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, - MA 02110-1301, USA. */ - -/* The default definitions below are intended to be replaced by real - definitions, if building the tools for an interactive programming - environment. */ - -#ifndef _PROGRESS_H -#define _PROGRESS_H - -#ifndef START_PROGRESS -#define START_PROGRESS(STR,N) -#endif - -#ifndef PROGRESS -#define PROGRESS(X) -#endif - -#ifndef END_PROGRESS -#define END_PROGRESS(STR) -#endif - -#endif /* _PROGRESS_H */ diff --git a/ld/ldmain.c b/ld/ldmain.c index 8c2fc9b8d8c..25cc89b72f9 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -23,7 +23,6 @@ #include "bfd.h" #include "safe-ctype.h" #include "libiberty.h" -#include "progress.h" #include "bfdlink.h" #include "ctf-api.h" #include "filenames.h" @@ -263,8 +262,6 @@ main (int argc, char **argv) program_name = argv[0]; xmalloc_set_program_name (program_name); - START_PROGRESS (program_name, 0); - expandargv (&argc, &argv); if (bfd_init () != BFD_INIT_MAGIC) @@ -618,8 +615,6 @@ main (int argc, char **argv) } } - END_PROGRESS (program_name); - if (config.stats) { long run_time = get_run_time () - start_time;