From: Clément Chigot Date: Fri, 13 Oct 2023 14:43:32 +0000 (+0200) Subject: ld: replace wrong bfd_malloc in nto.em X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b5248d602e4d42a3bf8229dd18f02989cd5b831a;p=binutils-gdb.git 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. --- 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"),