diff options
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r-- | bfd/elf64-ppc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index f702a0e..4f15c8b 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -1715,10 +1715,12 @@ ppc64_elf_unhandled_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, if (error_message != NULL) { - static char buf[60]; - sprintf (buf, "generic linker can't handle %s", - reloc_entry->howto->name); - *error_message = buf; + static char *message; + free (message); + if (asprintf (&message, _("generic linker can't handle %s"), + reloc_entry->howto->name) < 0) + message = NULL; + *error_message = message; } return bfd_reloc_dangerous; } |