aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorClément Chigot <chigot@adacore.com>2023-10-13 16:43:32 +0200
committerClément Chigot <chigot@adacore.com>2023-10-13 16:50:23 +0200
commitb5248d602e4d42a3bf8229dd18f02989cd5b831a (patch)
treeab28af0e9d352c38d9c4a6fa10e2cca866be05e6 /ld/emultempl
parent4f6f3bea520d6575cc8fec1a0b094bb455a18b85 (diff)
downloadgdb-b5248d602e4d42a3bf8229dd18f02989cd5b831a.zip
gdb-b5248d602e4d42a3bf8229dd18f02989cd5b831a.tar.gz
gdb-b5248d602e4d42a3bf8229dd18f02989cd5b831a.tar.bz2
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.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/nto.em2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/emultempl/nto.em b/ld/emultempl/nto.em
index f4c76f1..273502d 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"),