[PATCH] gas: Fix create_note_reloc

H.J. Lu hjl.tools@gmail.com
Tue Apr 9 23:03:29 GMT 2024


	* 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



More information about the Binutils mailing list