From b5248d602e4d42a3bf8229dd18f02989cd5b831a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Cl=C3=A9ment=20Chigot?= Date: Fri, 13 Oct 2023 16:43:32 +0200 Subject: [PATCH] ld: replace wrong bfd_malloc in nto.em xmalloc should be called in ld instead of bfd_malloc. ld/ChangeLog: * emultempl/nto.em (nto_lookup_QNX_note_section): Replace bfd_malloc by xmalloc. --- ld/emultempl/nto.em | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ld/emultempl/nto.em b/ld/emultempl/nto.em index f4c76f18fc2..273502dd802 100644 --- a/ld/emultempl/nto.em +++ b/ld/emultempl/nto.em @@ -98,7 +98,7 @@ nto_lookup_QNX_note_section(int type) continue; /* Verify that this is a QNX note of the expected type. */ - sec->contents = bfd_malloc(sec->size); + sec->contents = xmalloc(sec->size); if (!bfd_get_section_contents (sec->owner, sec, sec->contents, (file_ptr) 0, sec->size)) einfo (_("%F%P: %pB: can't read contents of section .note: %E\n"), -- 2.30.2