aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-01-02 19:29:38 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-01-02 19:29:38 +0000
commit54ac0771d70dc2db461671bb5e1cd00852278de9 (patch)
treef42c1523fa7eca4e044306ceca32c80f193377d0 /ld
parentd88805311b781c162446afb8d31c2bb854b024cc (diff)
downloadgdb-54ac0771d70dc2db461671bb5e1cd00852278de9.zip
gdb-54ac0771d70dc2db461671bb5e1cd00852278de9.tar.gz
gdb-54ac0771d70dc2db461671bb5e1cd00852278de9.tar.bz2
bfd/
2009-01-02 H.J. Lu <hongjiu.lu@intel.com> PR ld/9679 * elflink.c (elf_merge_st_other): New. (_bfd_elf_merge_symbol): Use it on skipped weak definitions and hide them if needed. (elf_link_add_object_symbols): Updated. ld/testsuite/ 2009-01-02 H.J. Lu <hongjiu.lu@intel.com> PR ld/9679 * ld-elf/pr9679-1.c: New. * ld-elf/pr9679-2.c: Likewise. * ld-elf/pr9679.rd: Likewise. * ld-elf/shared.exp (build_tests): Add test for libpr9679.so.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog9
-rw-r--r--ld/testsuite/ld-elf/pr9679-1.c5
-rw-r--r--ld/testsuite/ld-elf/pr9679-2.c13
-rw-r--r--ld/testsuite/ld-elf/pr9679.rd5
-rw-r--r--ld/testsuite/ld-elf/shared.exp3
5 files changed, 35 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 7936368..30be1ed 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,5 +1,14 @@
2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
+ PR ld/9679
+ * ld-elf/pr9679-1.c: New.
+ * ld-elf/pr9679-2.c: Likewise.
+ * ld-elf/pr9679.rd: Likewise.
+
+ * ld-elf/shared.exp (build_tests): Add test for libpr9679.so.
+
+2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
+
PR ld/9676
* ld-elf/pr9676-1.c: New.
* ld-elf/pr9676-2.c: Likewiswe.
diff --git a/ld/testsuite/ld-elf/pr9679-1.c b/ld/testsuite/ld-elf/pr9679-1.c
new file mode 100644
index 0000000..cf7abbb
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr9679-1.c
@@ -0,0 +1,5 @@
+int
+foo (void)
+{
+ return 1;
+}
diff --git a/ld/testsuite/ld-elf/pr9679-2.c b/ld/testsuite/ld-elf/pr9679-2.c
new file mode 100644
index 0000000..e125a6b
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr9679-2.c
@@ -0,0 +1,13 @@
+extern int foo (void) __attribute__((weak,__visibility__ ("hidden")));
+
+int
+foo (void)
+{
+ return 1;
+}
+
+int
+bar (void)
+{
+ return foo ();
+}
diff --git a/ld/testsuite/ld-elf/pr9679.rd b/ld/testsuite/ld-elf/pr9679.rd
new file mode 100644
index 0000000..0585b1c
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr9679.rd
@@ -0,0 +1,5 @@
+Symbol table '\.dynsym' contains [0-9]+ entries:
+ +Num: +Value +Size Type +Bind +Vis +Ndx Name
+#...
+ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +LOCAL +HIDDEN +[0-9]+ +foo
+#...
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index ff8bc8f..4f45bdd 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -145,6 +145,9 @@ set build_tests {
"-shared tmpdir/pr9676-4.o -Ltmpdir -lpr9676-3 -Wl,--start-group -lpr9676-1 -lpr9676-2 -Wl,--end-group"
"-fPIC"
{dummy.c} {{readelf {-s} pr9676.rd}} "libpr9676-4a.so"}
+ {"Build libpr9679.so"
+ "-shared" "-fPIC -O0"
+ {pr9679-1.c pr9679-2.c} {{readelf {-s} pr9679.rd}} "libpr9679.so"}
}
set run_tests {