From patchwork Mon Mar 27 11:32:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 75354 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1437156vqo; Mon, 27 Mar 2023 04:32:58 -0700 (PDT) X-Google-Smtp-Source: AKy350bI4/SnBdDIPoqWwtz0ys83uXGjPy6gCiQ2zAOHxzTotGVqguvCvCgexj9GBtj6sDCdgLyq X-Received: by 2002:a17:906:31cb:b0:92c:a80e:225f with SMTP id f11-20020a17090631cb00b0092ca80e225fmr13428096ejf.52.1679916778582; Mon, 27 Mar 2023 04:32:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679916778; cv=none; d=google.com; s=arc-20160816; b=b5/UnHpWyFKmtbid72H46Ml1/3qJ2YVaDJuYv0DFj2p62iHY0yHqFtJii/KTB3oYuF wEmAa1i98qnk8y9vPCiyEgoc3dtfWzOpSs1jChflkd5WpybBFfDrf/9+x9zT/pbQflGY oOUdo/X/G6YXswJ4q1+3cB4GqPm/ACoXVSYby/qXmqoyZ+mW6ex9uH6/t1JVEGP5HuOn 608c6Km7M5gsYW+/BDxziVcaBPvdvwLmdx/0FDG+QWW4uQK/kKqYw0qrNCqFbCPDQy0X y/mmV3UcJz+4fRx0wTnXuP426L0lnF+NH5WQeSOsLIWQ+un0Al9+f3QLBcXfdOqPI0cA yP1w== 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=X4jsTRTEenj4CPcid+6/WqyUxzeGJiHnkEv90/tgABw=; b=bjfViYpbg31FL0dNCnJ/vNFr+/clmHHhdqmNOfAEvBZQti9GDtW2ICj8WDnvl2Dehn dkcutx/FTSPlIkN6FyLmwGOGpj8LoZHyhdCG412xZPStxiGXVbusmjNefJQXaez8wmkD WBC1yOogFa35dZhndMcSBTKXGiU2g6h2PGhJqhn7eRgpmXgOaAqqq2B9k498wNRcKseR GWVyscJ5tkROltIb83bCnNXKNHjVPKrv0UbkBqj7OHMuxo2faOODV1rZQ6L+gUk5VjRh NhA/R6p06W/GUHdQZfFAb4d3+OhR0epcFRI2HHwjqel7x8/KT9qKLdwULN9jUADoB1UR BTLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=Uv5HxilK; 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 jx11-20020a170907760b00b008b17ae97330si26425330ejc.880.2023.03.27.04.32.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 04:32:58 -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=Uv5HxilK; 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 3C74D3858CDA for ; Mon, 27 Mar 2023 11:32:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C74D3858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679916775; bh=X4jsTRTEenj4CPcid+6/WqyUxzeGJiHnkEv90/tgABw=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Uv5HxilKPh0rMfkOr9Rc9wUdbr8amr/P3oQCVRyH2L+U+jUXx/C9RCLh8rWnl1/Yr mmQ22aHpoRngT+rrKXCElQLur4FbbTORvOuGf2lN721Vadpsjlb4YJ0pVDRvx+I2lF lIiqarxlkL8597PbHAZZTRIsxfTbRU2U1UKJw+IA= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by sourceware.org (Postfix) with ESMTPS id 69D353858426 for ; Mon, 27 Mar 2023 11:32:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 69D353858426 Received: by mail-pj1-x1030.google.com with SMTP id mp3-20020a17090b190300b0023fcc8ce113so11489354pjb.4 for ; Mon, 27 Mar 2023 04:32:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679916765; 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=X4jsTRTEenj4CPcid+6/WqyUxzeGJiHnkEv90/tgABw=; b=vxS8lPT6SEdKva5alPTNIvk5yVTDN6zKP/hXKTU9f2FAqNvv8Nt8b1XIYk6KOV2rA1 mAEypK+fD9iC7hzF/Lf6YjXV6du6AOmETu4XqZl8XXljLGcV0qpaKa8rEcCj82ly0O88 7MoO8fg6OIIDzDkbsLJ9NSigZg6blwT1BMAQbbP1OznhgCzgC+eA+Ed6XObeyTQrZSO3 KXQRkyup9SvIQDq7zH7/EGsRwPZyPGh70F70xfP4kTF2WjQyGWjmzJkpp2R2m2sD2XL7 nThIWgNeFUis7F9kBB7UI+3OZm0ZL3+39yyvmTCJdyNrp9qDGUFAg3Az0KBcfOHO/6XV lsXQ== X-Gm-Message-State: AO0yUKWVZYPd8LPHoouagRY8ICAvj2C0pgm1cfeT7NEit/ud0EgOWAJL 6eRgQhJbEk7dSzU0OyvM3GbXnlxOCbc= X-Received: by 2002:a05:6a20:b70f:b0:da:318a:981f with SMTP id fg15-20020a056a20b70f00b000da318a981fmr10329146pzb.42.1679916765218; Mon, 27 Mar 2023 04:32:45 -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 c26-20020aa781da000000b0062d7fa4b618sm2141233pfn.175.2023.03.27.04.32.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 04:32:44 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 9B263114276F; Mon, 27 Mar 2023 22:02:42 +1030 (ACDT) Date: Mon, 27 Mar 2023 22:02:42 +1030 To: binutils@sourceware.org Subject: Remove coff_pointerize_aux table_end param Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3035.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.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?1761520415980322605?= X-GMAIL-MSGID: =?utf-8?q?1761520415980322605?= I'm fairly certain the table_end checks are redundant now. This patch reverts commit 334d4ced42d3. * coffgen.c (coff_pointerize_aux): Remove table_end parameter. (coff_get_normalized_symtab): Adjust to suit. diff --git a/bfd/coffgen.c b/bfd/coffgen.c index 3eec2d5e23c..4725406b5ae 100644 --- a/bfd/coffgen.c +++ b/bfd/coffgen.c @@ -1434,8 +1434,7 @@ coff_pointerize_aux (bfd *abfd, combined_entry_type *table_base, combined_entry_type *symbol, unsigned int indaux, - combined_entry_type *auxent, - combined_entry_type *table_end) + combined_entry_type *auxent) { unsigned int type = symbol->u.syment.n_type; unsigned int n_sclass = symbol->u.syment.n_sclass; @@ -1465,9 +1464,7 @@ coff_pointerize_aux (bfd *abfd, || n_sclass == C_FCN) && auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.u32 > 0 && (auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.u32 - < obj_raw_syment_count (abfd)) - && (table_base + auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.u32 - < table_end)) + < obj_raw_syment_count (abfd))) { auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p = table_base + auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.u32; @@ -1476,8 +1473,7 @@ coff_pointerize_aux (bfd *abfd, /* A negative tagndx is meaningless, but the SCO 3.2v4 cc can generate one, so we must be careful to ignore it. */ - if (auxent->u.auxent.x_sym.x_tagndx.u32 < obj_raw_syment_count (abfd) - && table_base + auxent->u.auxent.x_sym.x_tagndx.u32 < table_end) + if (auxent->u.auxent.x_sym.x_tagndx.u32 < obj_raw_syment_count (abfd)) { auxent->u.auxent.x_sym.x_tagndx.p = table_base + auxent->u.auxent.x_sym.x_tagndx.u32; @@ -1768,8 +1764,7 @@ coff_get_normalized_symtab (bfd *abfd) &(internal_ptr->u.auxent)); internal_ptr->is_sym = false; - coff_pointerize_aux (abfd, internal, symbol_ptr, i, - internal_ptr, internal_end); + coff_pointerize_aux (abfd, internal, symbol_ptr, i, internal_ptr); } }