aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-11-20 22:17:27 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-11-20 22:17:27 +0000
commitdda8ddc56f160befb8f8fc3ddc69d66cec6ac4f8 (patch)
tree6a21a6b6aab0bb38f1f46477eb562273cc48f61b /ld
parentb039ef04574106adbac611394b008109967d2a73 (diff)
downloadfsf-binutils-gdb-dda8ddc56f160befb8f8fc3ddc69d66cec6ac4f8.zip
fsf-binutils-gdb-dda8ddc56f160befb8f8fc3ddc69d66cec6ac4f8.tar.gz
fsf-binutils-gdb-dda8ddc56f160befb8f8fc3ddc69d66cec6ac4f8.tar.bz2
Remove ref_dynamic_nonweak added by accident
bfd/ 2012-11-20 H.J. Lu <hongjiu.lu@intel.com> PR ld/14862 * elf-bfd.h (elf_link_hash_entry): Remove ref_dynamic_nonweak added by accident. (elf_link_add_object_symbols): Don't set nor check ref_dynamic_nonweak. ld/testsuite/ 2012-11-20 H.J. Lu <hongjiu.lu@intel.com> PR ld/14862 * ld-elf/shared.exp (build_tests): Build libpr14862-1.o and libpr14862.so. (run_tests): Test pr14862. * ld-elf/pr14862-1.c: New file. * ld-elf/pr14862-2.c: Likewise. * ld-elf/pr14862.map: Likewise. * ld-elf/pr14862.out: Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog12
-rw-r--r--ld/testsuite/ld-elf/pr14862-1.c9
-rw-r--r--ld/testsuite/ld-elf/pr14862-2.c7
-rw-r--r--ld/testsuite/ld-elf/pr14862.map4
-rw-r--r--ld/testsuite/ld-elf/pr14862.out1
-rw-r--r--ld/testsuite/ld-elf/shared.exp9
6 files changed, 42 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 81ec67c..30a4d99 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,5 +1,17 @@
2012-11-20 H.J. Lu <hongjiu.lu@intel.com>
+ PR ld/14862
+ * ld-elf/shared.exp (build_tests): Build libpr14862-1.o and
+ libpr14862.so.
+ (run_tests): Test pr14862.
+
+ * ld-elf/pr14862-1.c: New file.
+ * ld-elf/pr14862-2.c: Likewise.
+ * ld-elf/pr14862.map: Likewise.
+ * ld-elf/pr14862.out: Likewise.
+
+2012-11-20 H.J. Lu <hongjiu.lu@intel.com>
+
* ld-elf/global1.d: New file.
2012-11-07 James Murray <jsm@jsm-net.demon.co.uk>
diff --git a/ld/testsuite/ld-elf/pr14862-1.c b/ld/testsuite/ld-elf/pr14862-1.c
new file mode 100644
index 0000000..258a834
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr14862-1.c
@@ -0,0 +1,9 @@
+extern void bar () __attribute__((weak));
+
+int
+main (void)
+{
+ if (bar)
+ bar ();
+ return 0;
+}
diff --git a/ld/testsuite/ld-elf/pr14862-2.c b/ld/testsuite/ld-elf/pr14862-2.c
new file mode 100644
index 0000000..1b9b393
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr14862-2.c
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+void
+bar (void)
+{
+ printf ("OK\n");
+}
diff --git a/ld/testsuite/ld-elf/pr14862.map b/ld/testsuite/ld-elf/pr14862.map
new file mode 100644
index 0000000..2947640
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr14862.map
@@ -0,0 +1,4 @@
+VERS_1 {
+ global: bar;
+ local: *;
+};
diff --git a/ld/testsuite/ld-elf/pr14862.out b/ld/testsuite/ld-elf/pr14862.out
new file mode 100644
index 0000000..d86bac9
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr14862.out
@@ -0,0 +1 @@
+OK
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index c9f2056..9b35d53 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -173,6 +173,12 @@ set build_tests {
{"Build libpr14323-2.so"
"-shared" "-fPIC"
{pr14323-2.c} {} "libpr14323-2.so"}
+ {"Build pr14862-1.o"
+ "-r -nostdlib" ""
+ {pr14862-1.c} {} "libpr14862-1.o"}
+ {"Build libpr14862.so"
+ "-shared -Wl,--version-script=pr11138-1.map" "-fPIC"
+ {pr14862-2.c} {} "libpr14862.so"}
}
run_cc_link_tests $build_tests
@@ -308,6 +314,9 @@ set run_tests {
{"Run with pr14323-1.c pr14323-2.so"
"tmpdir/libpr14323-2.so" ""
{pr14323-1.c} "pr14323" "pass.out"}
+ {"Run with pr14862-1.c libpr14862.so"
+ "--as-needed tmpdir/libpr14862-1.o tmpdir/libpr14862.so" ""
+ {dummy.c} "pr14862" "pr14862.out"}
}
# NetBSD ELF systems do not currently support the .*_array sections.