This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: ld/2218: Weak undefined symbol doesn't work properly with PIE
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Date: Thu, 26 Jan 2006 23:03:35 -0800
- Subject: PATCH: ld/2218: Weak undefined symbol doesn't work properly with PIE
We should treat global symbols in PIE like shared library. There is
no regression on Linux/x86/x86-64/ia64.
H.J.
----
2006-01-26 H.J. Lu <hongjiu.lu@intel.com>
PR ld/2218
* elflink.c (elf_link_add_object_symbols): Mark global symbol
in shared library dynamic.
--- bfd/elflink.c.pie 2006-01-25 09:02:12.000000000 -0800
+++ bfd/elflink.c 2006-01-26 21:42:37.000000000 -0800
@@ -4050,7 +4050,7 @@ elf_link_add_object_symbols (bfd *abfd,
}
else
h->def_regular = 1;
- if (! info->executable
+ if (info->shared
|| h->def_dynamic
|| h->ref_dynamic)
dynsym = TRUE;