This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] PR ld/18250: segfault on BFD linker using clang llvm plugin
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: binutils at sourceware dot org
- Date: Sat, 11 Apr 2015 14:47:38 -0700
- Subject: [PATCH] PR ld/18250: segfault on BFD linker using clang llvm plugin
- Authentication-results: sourceware.org; auth=none
When ELF linker backend searchs the symbol table of an archive element,
it should skip the object which has been claimed by plugin. I will
check it in next week.
H.J.
---
PR ld/18250
* elflink.c (elf_link_is_defined_archive_symbol): Return FALSE if
the object has been claimed by plugin.
---
bfd/elflink.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 98d3108..e3d1abe 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -2936,6 +2936,10 @@ elf_link_is_defined_archive_symbol (bfd * abfd, carsym * symdef)
if (abfd == NULL)
return FALSE;
+ /* Return FALSE if the object has been claimed by plugin. */
+ if (abfd->plugin_format == bfd_plugin_yes)
+ return FALSE;
+
if (! bfd_check_format (abfd, bfd_object))
return FALSE;
--
2.1.0