From: Alan Modra <amodra@gmail.com>
To: binutils@sourceware.org
Subject: Remove coff_pointerize_aux table_end param
Date: Mon, 27 Mar 2023 22:02:42 +1030 [thread overview]
Message-ID: <ZCF+2jvDqqXV1fVf@squeak.grove.modra.org> (raw)
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
reply other threads:[~2023-03-27 11:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZCF+2jvDqqXV1fVf@squeak.grove.modra.org \
--to=amodra@gmail.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).