From patchwork Thu Aug 31 12:07:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 137284 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c792:0:b0:3f2:4152:657d with SMTP id b18csp194443vqu; Thu, 31 Aug 2023 05:07:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGnejGf88x9vAPvCb6FCB361an3g+CGZXUHzifQZ2wkRbe7j22NX3ba5sPxev5aAEz++Jnd X-Received: by 2002:ac2:46d2:0:b0:4fd:d470:203b with SMTP id p18-20020ac246d2000000b004fdd470203bmr3790825lfo.69.1693483651006; Thu, 31 Aug 2023 05:07:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693483650; cv=none; d=google.com; s=arc-20160816; b=OmxqwMcIaHtxDFiRKFXu9gYmp7iLZLtv4dLaYn2QXIgM7BXh46zGSe/RJBYgTMRbHv IQB+5I+qf8YUtbyahMwI9sPzDdok1dQl4+2CzsPSWHwNMZgnlCZou/3z5XgjTEa8m64U woqAgOEAmF5t4SUSN8D4Sg1MiaKaPtlXNooDPrMRiYvIfZnt/8pQqAP3Ta9UjTIwRZmr 3oeBniT0kIv0doAdaqKAAIe+YhO2X6ahc/yYg+n9H5LFCzAw5qRBNe6yYuxr0jq9xrXn L+3/FGh4h6bNF6jC69ImrOvcNeIF4W7o/S3tHol2PSNmAPZZZlX547gq9zXP6im+dfY5 II5w== 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=g1CHpu6uw2eu9UCYSi8wlRwuEnPA9nzq4YPbvAguh0k=; fh=NLxAvL/bDfPg4AGOtxqvQlND8vazkZrNzKLY8+LAbBY=; b=z9v7kdLtpr+V95OqLA3ZJ5M4JrXUlljOO2HY4ppyQK9zUJa9OTsenzZUpPkwQemied 1DdIx9AgXqzNOqW3V33VX9VJZxdWSNDQDd63q5HLBP07vxQRj+5AUPpFOTxdMmxrkCYp BOJiiPS4x2zgDSM3D0lSpgge53M76H6dij1n88DsX/MuqAh9hkevhcjPjeb2+sp0y4Uw GOByKpHSybxKmdplv1RbZqF3ITSb6GOizbw0opO8X49OixQE/iTnfsmWMYmzKHANL6jb Xcl0lW7EgWBqJ2WS+U3hKAXRGcLu9EJ3WZhouORfFj9RXfi/39dvnkP5Kq6W59kII5Kp 1QwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="SC/coQoL"; 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 (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id e24-20020aa7d7d8000000b0052a3a1c943csi988900eds.159.2023.08.31.05.07.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Aug 2023 05:07:30 -0700 (PDT) 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="SC/coQoL"; 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 A7F0D385841D for ; Thu, 31 Aug 2023 12:07:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A7F0D385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1693483649; bh=g1CHpu6uw2eu9UCYSi8wlRwuEnPA9nzq4YPbvAguh0k=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=SC/coQoLleEX7dlZ9J4xre6nb/b1/EbvlrmaksXwyEA9gCSS0ug1x6Agh/foZkIig jSeu1wITpWoTIvi1n/+tRi01NyYb/XZyp8zkIble84uMRgr7B1MKJttESNLI6Zhp3J G8kox3yXFZ/vn08BjK7P/TdQuugU8sGyxe0GNV9s= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id 485CA3858D20 for ; Thu, 31 Aug 2023 12:07:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 485CA3858D20 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-68c0d4cc3a4so558215b3a.1 for ; Thu, 31 Aug 2023 05:07:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693483638; x=1694088438; 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=g1CHpu6uw2eu9UCYSi8wlRwuEnPA9nzq4YPbvAguh0k=; b=LZiTK8+sewPy3MIf78irdsBI9TS6zmBp3lOun3Ux2SrbdIr0i2HERxKKmIlYV+fpek tTeot3pRNH0UlKKunuWHA1HJLBma7tWGQCjadrCdud8iQyX04Xy3/dSf78bCg9C6wAGG cvTJmK6HXejtc68v4CmPOWYQh/EZ1CiNxyW2vMqqL42NXdy6tiVpur9bG+7mxBrpdgpQ yVW3/SchFp0aJGTU61g4kC7I0o7/vd0k17tewJOR0lo5cYzmdlObgJTXclrXzOjI3v3Q OzUsuN9nABqSpZSJAqqjOQ+YalwHbmzJswiLLt3qTmRgdHo1XoxgzJJNRY15hN6SPw5p P+0A== X-Gm-Message-State: AOJu0Yyy+IRnxPl7hCnaH8ofW9ZrQ9HJ6ocU4sOxHh25i52QmapOMGcW k/osmUd0alm1NDcBoSeCd2sLFV/56CE= X-Received: by 2002:a05:6a00:1490:b0:68c:10c:1c52 with SMTP id v16-20020a056a00149000b0068c010c1c52mr5763453pfu.9.1693483638243; Thu, 31 Aug 2023 05:07:18 -0700 (PDT) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id i16-20020a633c50000000b005701110ca06sm1268942pgn.5.2023.08.31.05.07.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Aug 2023 05:07:17 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 1721C114241C; Thu, 31 Aug 2023 21:37:14 +0930 (ACST) Date: Thu, 31 Aug 2023 21:37:14 +0930 To: binutils@sourceware.org Subject: gas OBJ_PROCESS_STAB Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3034.1 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.30 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: INBOX X-GMAIL-THRID: 1775746312755200999 X-GMAIL-MSGID: 1775746312755200999 This macro and the supporting functions have an unused "seg" first argument. Tidy that. * config/obj-aout.c (obj_aout_process_stab): Delete first param. * config/obj-ecoff.h (OBJ_PROCESS_STAB): Likewise. * config/obj-elf.c (elf_process_stab): Likewise. * config/obj-elf.h (OBJ_PROCESS_STAB): Likewise. * config/obj-macho.h (OBJ_PROCESS_STAB): Likewise. * config/obj-multi.h (OBJ_PROCESS_STAB): Likewise. * ecoff.c (ecoff_stab): Likewise. * ecoff.h (ecoff_stab): Likewise. * obj.h (struct format_ops ): Likewise. * stabs.c (OBJ_PROCESS_STAB): Likewise. diff --git a/gas/config/obj-aout.c b/gas/config/obj-aout.c index b602db2a0fa..033a0982d03 100644 --- a/gas/config/obj-aout.c +++ b/gas/config/obj-aout.c @@ -248,8 +248,7 @@ obj_aout_sec_sym_ok_for_reloc (asection *sec ATTRIBUTE_UNUSED) } static void -obj_aout_process_stab (segT seg ATTRIBUTE_UNUSED, - int w, +obj_aout_process_stab (int w, const char *s, int t, int o, diff --git a/gas/config/obj-ecoff.h b/gas/config/obj-ecoff.h index 71b6c765c90..c46329d9098 100644 --- a/gas/config/obj-ecoff.h +++ b/gas/config/obj-ecoff.h @@ -64,8 +64,8 @@ struct ecoff_sy_obj #define obj_app_file(name) ecoff_new_file (name) /* At the moment we don't want to do any stabs processing in read.c. */ -#define OBJ_PROCESS_STAB(seg, what, string, type, other, desc) \ - ecoff_stab ((seg), (what), (string), (type), (other), (desc)) +#define OBJ_PROCESS_STAB(what, string, type, other, desc) \ + ecoff_stab ((what), (string), (type), (other), (desc)) #define EMIT_SECTION_SYMBOLS 0 #define obj_sec_sym_ok_for_reloc(SEC) 1 diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index a9258ce334c..1c1b60b0b48 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -3114,8 +3114,7 @@ elf_generate_asm_lineno (void) } static void -elf_process_stab (segT sec ATTRIBUTE_UNUSED, - int what ATTRIBUTE_UNUSED, +elf_process_stab (int what ATTRIBUTE_UNUSED, const char *string ATTRIBUTE_UNUSED, int type ATTRIBUTE_UNUSED, int other ATTRIBUTE_UNUSED, @@ -3123,7 +3122,7 @@ elf_process_stab (segT sec ATTRIBUTE_UNUSED, { #ifdef NEED_ECOFF_DEBUG if (ECOFF_DEBUGGING) - ecoff_stab (sec, what, string, type, other, desc); + ecoff_stab (what, string, type, other, desc); #endif } diff --git a/gas/config/obj-elf.h b/gas/config/obj-elf.h index e8fc3126bed..5c8404ec49d 100644 --- a/gas/config/obj-elf.h +++ b/gas/config/obj-elf.h @@ -265,9 +265,9 @@ extern void obj_elf_init_stab_section (segT); ((void) (ECOFF_DEBUGGING ? 0 : (obj_elf_init_stab_section (seg), 0))) #undef OBJ_PROCESS_STAB -#define OBJ_PROCESS_STAB(seg, what, string, type, other, desc) \ +#define OBJ_PROCESS_STAB(what, string, type, other, desc) \ if (ECOFF_DEBUGGING) \ - ecoff_stab ((seg), (what), (string), (type), (other), (desc)) + ecoff_stab ((what), (string), (type), (other), (desc)) #endif /* ECOFF_DEBUGGING */ #endif /* SEPARATE_STAB_SECTIONS not defined. */ diff --git a/gas/config/obj-macho.h b/gas/config/obj-macho.h index 1a9390d6610..cfce9d9ef48 100644 --- a/gas/config/obj-macho.h +++ b/gas/config/obj-macho.h @@ -76,7 +76,7 @@ extern void obj_mach_o_frob_label (symbolS *); #define obj_frob_symbol(s, punt) punt = obj_mach_o_frob_symbol(s) extern int obj_mach_o_frob_symbol (struct symbol *); -#define OBJ_PROCESS_STAB(SEG,W,S,T,O,D) obj_mach_o_process_stab(W,S,T,O,D) +#define OBJ_PROCESS_STAB(W,S,T,O,D) obj_mach_o_process_stab(W,S,T,O,D) extern void obj_mach_o_process_stab (int, const char *,int, int, int); struct obj_mach_o_frag_data diff --git a/gas/config/obj-multi.h b/gas/config/obj-multi.h index d4c94799edf..894b9245845 100644 --- a/gas/config/obj-multi.h +++ b/gas/config/obj-multi.h @@ -145,9 +145,9 @@ ? (*this_format->copy_symbol_attributes) (d, s) \ : (void) 0) -#define OBJ_PROCESS_STAB(SEG,W,S,T,O,D) \ +#define OBJ_PROCESS_STAB(W,S,T,O,D) \ (this_format->process_stab \ - ? (*this_format->process_stab) (SEG,W,S,T,O,D) \ + ? (*this_format->process_stab) (W,S,T,O,D) \ : (void) 0) #define SEPARATE_STAB_SECTIONS \ diff --git a/gas/ecoff.c b/gas/ecoff.c index 1c01911f55c..5076bbc34a0 100644 --- a/gas/ecoff.c +++ b/gas/ecoff.c @@ -3402,8 +3402,7 @@ ecoff_directive_weakext (int ignore ATTRIBUTE_UNUSED) value a numeric value or an address. */ void -ecoff_stab (segT sec ATTRIBUTE_UNUSED, - int what, +ecoff_stab (int what, const char *string, int type, int other, diff --git a/gas/ecoff.h b/gas/ecoff.h index b2bb8d54812..b649ab699b3 100644 --- a/gas/ecoff.h +++ b/gas/ecoff.h @@ -82,7 +82,7 @@ extern void ecoff_directive_type (int); extern void ecoff_directive_val (int); /* Handle stabs. */ -extern void ecoff_stab (segT sec, int what, const char *string, +extern void ecoff_stab (int what, const char *string, int type, int other, int desc); /* Set the GP prologue size. */ diff --git a/gas/obj.h b/gas/obj.h index 6d92c368a56..3851e67563b 100644 --- a/gas/obj.h +++ b/gas/obj.h @@ -63,7 +63,7 @@ struct format_ops { void (*s_set_type) (symbolS *, int); void (*copy_symbol_attributes) (symbolS *, symbolS *); void (*generate_asm_lineno) (void); - void (*process_stab) (segT, int, const char *, int, int, int); + void (*process_stab) (int, const char *, int, int, int); int (*separate_stab_sections) (void); void (*init_stab_section) (segT); int (*sec_sym_ok_for_reloc) (asection *); diff --git a/gas/stabs.c b/gas/stabs.c index f650a48ae88..6a462c4eee7 100644 --- a/gas/stabs.c +++ b/gas/stabs.c @@ -145,7 +145,7 @@ get_stab_string_offset (const char *string, const char *stabstr_secname, #ifdef AOUT_STABS #ifndef OBJ_PROCESS_STAB -#define OBJ_PROCESS_STAB(SEG,W,S,T,O,D) aout_process_stab(W,S,T,O,D) +#define OBJ_PROCESS_STAB(W,S,T,O,D) aout_process_stab(W,S,T,O,D) #endif /* Here instead of obj-aout.c because other formats use it too. */ @@ -401,7 +401,7 @@ s_stab_generic (int what, } #ifdef OBJ_PROCESS_STAB - OBJ_PROCESS_STAB (seg, what, string, type, other, desc); + OBJ_PROCESS_STAB (what, string, type, other, desc); #endif subseg_set (saved_seg, saved_subseg); @@ -415,7 +415,7 @@ s_stab_generic (int what, obstack_free (¬es, stab_secname); } #ifdef OBJ_PROCESS_STAB - OBJ_PROCESS_STAB (0, what, string, type, other, desc); + OBJ_PROCESS_STAB (what, string, type, other, desc); #else abort (); #endif