From: Thiemo Seufer Date: Fri, 24 Aug 2001 03:56:28 +0000 (+0000) Subject: * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f6be24f9a4bd68f883dd4d2a78256d9b3eb8a420;p=binutils-gdb.git * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca() by bfd_malloc(). --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 88958283471..166ca49a374 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2001-08-24 Thiemo Seufer + + * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca() + by bfd_malloc(). + 2001-08-23 Andreas Jaeger * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if diff --git a/bfd/linker.c b/bfd/linker.c index 00389aca6c2..89b95269154 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -1007,9 +1007,13 @@ _bfd_generic_link_add_archive_symbols (abfd, info, checkfn) let's look for its import thunk */ if (info->pei386_auto_import) { - char *buf = alloca (strlen (h->root.string) + 10); + char *buf = (char *) bfd_malloc (strlen (h->root.string) + 10); + if (buf == NULL) + return false; + sprintf (buf, "__imp_%s", h->root.string); arh = archive_hash_lookup (&arsym_hash, buf, false, false); + free(buf); } if (arh == (struct archive_hash_entry *) NULL) {