aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-elf')
-rw-r--r--ld/testsuite/ld-elf/elf.exp26
-rw-r--r--ld/testsuite/ld-elf/pr17068.s2
-rw-r--r--ld/testsuite/ld-elf/pr17068a.s4
-rw-r--r--ld/testsuite/ld-elf/pr17068b.s4
-rw-r--r--ld/testsuite/ld-elf/pr17068c.s4
-rw-r--r--ld/testsuite/ld-elf/pr17068d.s6
-rw-r--r--ld/testsuite/ld-elf/pr17068e.s3
-rw-r--r--ld/testsuite/ld-elf/pr17068ez.s4
8 files changed, 47 insertions, 6 deletions
diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp
index 4c8ca3a..839c931 100644
--- a/ld/testsuite/ld-elf/elf.exp
+++ b/ld/testsuite/ld-elf/elf.exp
@@ -77,13 +77,12 @@ if { ![istarget hppa64*-hpux*] } {
}
}
-# Run a test to check linking a shared library with a broken linker
-# script that accidentally marks dynamic sections as notes. The
-# resulting executable is not expected to work, but the linker
-# should not seg-fault whilst creating the binary.
-#
-# Only run the test on targets thats support creating shared libraries.
+# Only run these tests on targets thats support creating shared libraries.
if { [check_shared_lib_support] } then {
+ # Run a test to check linking a shared library with a broken linker
+ # script that accidentally marks dynamic sections as notes. The
+ # resulting executable is not expected to work, but the linker
+ # should not seg-fault whilst creating the binary.
setup_xfail "tic6x-*-*"
run_ld_link_tests {
{"Build shared library for next test"
@@ -93,6 +92,21 @@ if { [check_shared_lib_support] } then {
{ { ld "note-3.l" } }
"a.out" }
}
+ setup_xfail "tic6x-*-*"
+ run_ld_link_tests {
+ {"Build pr17068.so"
+ "-shared" "" ""
+ {pr17068d.s} {} "pr17068.so"}
+ {"Build pr17068a.a"
+ "" "" ""
+ {pr17068a.s pr17068c.s pr17068ez.s} {} "pr17068a.a"}
+ {"Build pr17068b.a"
+ "" "" ""
+ {pr17068b.s pr17068e.s} {} "pr17068b.a"}
+ {"pr17068 link --as-needed lib in group"
+ "--as-needed" "--start-group tmpdir/pr17068a.a tmpdir/pr17068.so tmpdir/pr17068b.a --end-group" ""
+ {start.s pr17068.s} {} "pr17068"}
+ }
}
set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
diff --git a/ld/testsuite/ld-elf/pr17068.s b/ld/testsuite/ld-elf/pr17068.s
new file mode 100644
index 0000000..9675ab4
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr17068.s
@@ -0,0 +1,2 @@
+ .data
+ .dc.a a
diff --git a/ld/testsuite/ld-elf/pr17068a.s b/ld/testsuite/ld-elf/pr17068a.s
new file mode 100644
index 0000000..552697c
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr17068a.s
@@ -0,0 +1,4 @@
+ .data
+ .globl a
+a:
+ .dc.a b
diff --git a/ld/testsuite/ld-elf/pr17068b.s b/ld/testsuite/ld-elf/pr17068b.s
new file mode 100644
index 0000000..aa536f2
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr17068b.s
@@ -0,0 +1,4 @@
+ .data
+ .globl b
+b:
+ .dc.a c
diff --git a/ld/testsuite/ld-elf/pr17068c.s b/ld/testsuite/ld-elf/pr17068c.s
new file mode 100644
index 0000000..1d78f6d
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr17068c.s
@@ -0,0 +1,4 @@
+ .data
+ .globl c
+c:
+ .dc.a d
diff --git a/ld/testsuite/ld-elf/pr17068d.s b/ld/testsuite/ld-elf/pr17068d.s
new file mode 100644
index 0000000..6165128
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr17068d.s
@@ -0,0 +1,6 @@
+ .data
+ .globl d
+ .type d,%object
+d:
+ .dc.a e
+ .size d,.-d
diff --git a/ld/testsuite/ld-elf/pr17068e.s b/ld/testsuite/ld-elf/pr17068e.s
new file mode 100644
index 0000000..095eb89
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr17068e.s
@@ -0,0 +1,3 @@
+ .data
+ .globl e
+e:
diff --git a/ld/testsuite/ld-elf/pr17068ez.s b/ld/testsuite/ld-elf/pr17068ez.s
new file mode 100644
index 0000000..70e040d
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr17068ez.s
@@ -0,0 +1,4 @@
+ .data
+ .globl e
+e:
+ .dc.a z