aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ChangeLog9
-rw-r--r--ld/testsuite/ld-elf/dynamic-1.c10
-rw-r--r--ld/testsuite/ld-elf/dynamic-1.rd5
-rw-r--r--ld/testsuite/ld-elf/dynamic-1.syms3
-rw-r--r--ld/testsuite/ld-elf/shared.exp3
5 files changed, 30 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index e9eb2aa..e289383 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2014-02-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gold/16530
+ * ld-elf/dynamic-1.c: New file.
+ * ld-elf/dynamic-1.rd: Likewise.
+ * ld-elf/dynamic-1.syms: Likewise.
+
+ * ld-elf/shared.exp (build_tests): Add dynamic-1.
+
2014-02-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
* ld-scripts/rgn-at9.d: New file.
diff --git a/ld/testsuite/ld-elf/dynamic-1.c b/ld/testsuite/ld-elf/dynamic-1.c
new file mode 100644
index 0000000..439ffd1
--- /dev/null
+++ b/ld/testsuite/ld-elf/dynamic-1.c
@@ -0,0 +1,10 @@
+void
+dynamic ()
+{
+}
+
+int
+main ()
+{
+ return 0;
+}
diff --git a/ld/testsuite/ld-elf/dynamic-1.rd b/ld/testsuite/ld-elf/dynamic-1.rd
new file mode 100644
index 0000000..2c2f23b
--- /dev/null
+++ b/ld/testsuite/ld-elf/dynamic-1.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 +GLOBAL +DEFAULT +[0-9]+ +_?dynamic
+#...
diff --git a/ld/testsuite/ld-elf/dynamic-1.syms b/ld/testsuite/ld-elf/dynamic-1.syms
new file mode 100644
index 0000000..c9517f8
--- /dev/null
+++ b/ld/testsuite/ld-elf/dynamic-1.syms
@@ -0,0 +1,3 @@
+{
+ dynamic;
+};
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index 981ce71..949851f 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -227,6 +227,9 @@ set build_tests {
{"Build rdynamic-1"
"-rdynamic -Wl,--gc-sections" "-ffunction-sections"
{rdynamic-1.c} {{readelf {-s} rdynamic-1.rd}} "rdynamic-1"}
+ {"Build dynamic-1"
+ "-Wl,--dynamic-list,dynamic-1.syms -Wl,--gc-sections" "-ffunction-sections"
+ {dynamic-1.c} {{readelf {-s} dynamic-1.rd}} "dynamic-1"}
}
run_cc_link_tests $build_tests