+2010-04-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/11434
+ * elf-bfd.h (SYMBOLIC_BIND): Don't bind unique symbol locally.
+
2010-04-06 Tristan Gingold <gingold@adacore.com>
* vms-lib.c (_bfd_vms_lib_write_archive_contents): Fix idd flags.
while (0)
/* Will a symbol be bound to the the definition within the shared
- library, if any. */
+ library, if any. A unique symbol can never be bound locally. */
#define SYMBOLIC_BIND(INFO, H) \
- ((INFO)->symbolic || ((INFO)->dynamic && !(H)->dynamic))
+ (!(H)->unique_global \
+ && ((INFO)->symbolic || ((INFO)->dynamic && !(H)->dynamic)))
#endif /* _LIBELF_H_ */
+2010-04-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/11434
+ * ld/testsuite/ld-x86-64/unique1.d: New.
+ * ld/testsuite/ld-x86-64/unique1.s: Likewise.
+
+ * ld-x86-64/x86-64.exp: Run unique1.
+
2010-04-05 Kai Tietz <kai.tietz@onevision.com>
* emultempl/pep.em (U): Macro modified.
--- /dev/null
+#name: STB_GNU_UNIQUE with -Bsymbolic
+#as: --64
+#ld: -melf_x86_64 -shared -Bsymbolic
+#readelf: -rs --wide
+
+#...
+[0-9a-f]+ +[0-9a-f]+ +R_X86_64_GLOB_DAT +[0-9a-f]+ bar \+ 0
+#...
+ +[0-9]+: +[0-9a-f]+ +8 +OBJECT +UNIQUE +DEFAULT +[0-9]+ bar
+#pass
--- /dev/null
+ .text
+foo:
+ movq bar@GOTPCREL(%rip), %rbp
+ .weak bar
+ .data
+ .type bar, @gnu_unique_object
+ .size bar, 8
+bar:
+ .quad 8
run_dump_test "protected3-l1om"
run_dump_test "tlsle1"
run_dump_test "tlspie1"
+run_dump_test "unique1"