From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1062) id 63E343858C54; Mon, 27 Mar 2023 11:33:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 63E343858C54 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Alan Modra To: bfd-cvs@sourceware.org Subject: [binutils-gdb] Remove coff_pointerize_aux table_end param X-Act-Checkin: binutils-gdb X-Git-Author: Alan Modra X-Git-Refname: refs/heads/master X-Git-Oldrev: a2c7ca15a5609ea230771fc418511a3b8db16bd1 X-Git-Newrev: f00a29e30bfbe33e1be8d174e01763e745190a4a Message-Id: <20230327113350.63E343858C54@sourceware.org> Date: Mon, 27 Mar 2023 11:33:50 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2023 11:33:50 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Df00a29e30bfb= e33e1be8d174e01763e745190a4a commit f00a29e30bfbe33e1be8d174e01763e745190a4a Author: Alan Modra Date: Mon Mar 27 16:45:57 2023 +1030 Remove coff_pointerize_aux table_end param =20 I'm fairly certain the table_end checks are redundant now. This patch reverts commit 334d4ced42d3. =20 * coffgen.c (coff_pointerize_aux): Remove table_end parameter. (coff_get_normalized_symtab): Adjust to suit. Diff: --- bfd/coffgen.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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 =3D symbol->u.syment.n_type; unsigned int n_sclass =3D symbol->u.syment.n_sclass; @@ -1465,9 +1464,7 @@ coff_pointerize_aux (bfd *abfd, || n_sclass =3D=3D 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 =3D table_base + auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.u32; @@ -1476,8 +1473,7 @@ coff_pointerize_aux (bfd *abfd, =20 /* 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 =3D table_base + auxent->u.auxent.x_sym.x_tagndx.u32; @@ -1768,8 +1764,7 @@ coff_get_normalized_symtab (bfd *abfd) &(internal_ptr->u.auxent)); =20 internal_ptr->is_sym =3D false; - coff_pointerize_aux (abfd, internal, symbol_ptr, i, - internal_ptr, internal_end); + coff_pointerize_aux (abfd, internal, symbol_ptr, i, internal_ptr); } }