From: "H.J. Lu" <hjl.tools@gmail.com>
To: binutils@sourceware.org
Subject: [PATCH] gas: Fix create_note_reloc
Date: Tue, 9 Apr 2024 16:03:29 -0700 [thread overview]
Message-ID: <20240409230329.2466447-1-hjl.tools@gmail.com> (raw)
* write.c (create_note_reloc): Replace XNEW with bfd_xalloc.
---
gas/write.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gas/write.c b/gas/write.c
index 1a3a84ec4f6..27827d46469 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -1961,7 +1961,7 @@ create_note_reloc (segT sec,
{
struct reloc_list * reloc;
- reloc = XNEW (struct reloc_list);
+ reloc = bfd_xalloc (stdoutput, sizeof (struct reloc_list));
/* We create a .b type reloc as resolve_reloc_expr_symbols() has already been called. */
reloc->u.b.sec = sec;
--
2.44.0
reply other threads:[~2024-04-09 23:03 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=20240409230329.2466447-1-hjl.tools@gmail.com \
--to=hjl.tools@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).