From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-x1030.google.com with SMTP id mp3-20020a17090b190300b0023fcc8ce113so11489354pjb.4 for ; Mon, 27 Mar 2023 04:32:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679916765; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=X4jsTRTEenj4CPcid+6/WqyUxzeGJiHnkEv90/tgABw=; b=YlIcxyQIe7k999434VgtCTu4h81X4NpzJWRKW5LJfAeHkwKUcUzQ0ZEW674NeJRiPa Xk7OMYtHK5+TE4Fij6ZDYQKCqCEx8DICec9VbJXdhSb6s7Qzm1jZ4qunePnvtFDlTDKS QPwguRrJb406Kt3Gnd2LkAhZDvAvVfr+LvOu+NrmnyzdiLCZq06pRu0bIgYDVwToHn6r gXFcBs5TjJlT0h5m37LDCinqk3SODyICUcAEA8RPjy02J6MZMdInxr/TVmDA3VFRRKS+ tWYNktoZJFZQIdVk/Pf19aUu6oKOyLsjHugwKPWOwTW6EefcY+Jfmx0rtwggnOBWhaOK wcWw== 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-Google-Smtp-Source: AK7set+Fy7DjZ5Nn7lcpP5o596lySP/riQbFoJ+EU51axej7YIEDu7j/KjwZbDW9DSmazxNzFgySfQ== 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 From: Alan Modra To: binutils@sourceware.org Subject: Remove coff_pointerize_aux table_end param Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 List-Id: 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); } } -- Alan Modra Australia Development Lab, IBM