[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/20306] ld fails when linking with shared object, "--gc-sections"
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/20306] ld fails when linking with shared object, "--gc-sections" and "-u". |
Date: |
Tue, 28 Jun 2016 12:57:45 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=20306
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-06-28
Ever confirmed|0 |1
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
This works:
diff --git a/bfd/elflink.c b/bfd/elflink.c
index ad8493b..3e24940 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -9053,7 +9053,8 @@ elf_link_check_versioned_symbol (struct bfd_link_info
*info,
case bfd_link_hash_undefined:
case bfd_link_hash_undefweak:
abfd = h->root.u.undef.abfd;
- if ((abfd->flags & DYNAMIC) == 0
+ if (abfd == NULL
+ || (abfd->flags & DYNAMIC) == 0
|| (elf_dyn_lib_class (abfd) & DYN_DT_NEEDED) == 0)
return FALSE;
break;
--
You are receiving this mail because:
You are on the CC list for the bug.