aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-tic6x/tic6x.exp
blob: 9bcb5543780508f4e1f0f531f7be11daf16d6c79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
if { ! [istarget tic6x-*-*] } {
    return
}

foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.d]] {
    if { [runtest_file_p $runtests $test] } {
	run_dump_test [file rootname $test]
    }
}

set shlibtests {
    {"C6X shared library without --dsbt-index"
     "-shared  -Tdsbt.ld --dsbt-size=3"
     "-mdsbt -mpic -mpid=near" {shlib-1.s shlib-2.s}
     {{readelf -WSsrld shlib-noindex.rd}
      {objdump "-drj.plt -j.text" shlib-noindex.dd}
      {objdump -sj.got shlib-noindex.sd}}
      "libtestn.so"}
    {"C6X shared library, LE, RELA"
     "-shared  -Tdsbt.ld --dsbt-index=2 --dsbt-size=3"
     "-mdsbt -mpic -mpid=near" {shlib-1.s shlib-2.s}
     {{readelf -WSsrld shlib-1.rd}
      {objdump "-drj.plt -j.text" shlib-1.dd}
      {objdump -sj.got shlib-1.sd}}
      "libtest.so"}
    {"C6X nonstatic app using shared library, LE, RELA"
     "-Tdsbt.ld --dsbt-index 0 --dsbt-size=3 tmpdir/libtest.so"
     "-mdsbt -mpic -mpid=near" {shlib-app-1.s}
     {{readelf -WSsrld shlib-app-1.rd}
      {objdump "-drj.plt -j.text" shlib-app-1.dd}
      {objdump -sj.got shlib-app-1.sd}
      {objdump -R shlib-app-1.od}}
     "shlib-dynapp-1"}
    {"C6X shared library, LE, REL"
     "-shared  -Tdsbt.ld --dsbt-index=2 --dsbt-size=3"
     "-mdsbt -mpic -mpid=near -mgenerate-rel" {shlib-1.s shlib-2.s}
     {{readelf -WSsrld shlib-1r.rd}
      {objdump "-drj.plt -j.text" shlib-1r.dd}
      {objdump -sj.got shlib-1r.sd}}
      "libtestr.so"}
    {"C6X nonstatic app using shared library, LE, REL"
     "-Tdsbt.ld --dsbt-index 0 --dsbt-size=3 tmpdir/libtestr.so"
     "-mdsbt -mpic -mpid=near -mgenerate-rel" {shlib-app-1r.s}
     {{readelf -WSsrld shlib-app-1r.rd}
      {objdump "-drj.plt -j.text" shlib-app-1r.dd}
      {objdump -sj.got shlib-app-1r.sd}
      {objdump -R shlib-app-1r.od}}
     "shlib-dynapp-1r"}
    {"C6X shared library, BE, RELA"
     "-shared  -Tdsbt-be.ld --dsbt-index=2 --dsbt-size=3"
     "-mdsbt -mpic -mpid=near -mbig-endian" {shlib-1.s shlib-2.s}
     {{readelf -WSsrld shlib-1b.rd}
      {objdump "-drj.plt -j.text" shlib-1b.dd}
      {objdump -sj.got shlib-1b.sd}}
      "libtestb.so"}
    {"C6X nonstatic app using shared library, BE, RELA"
     "-Tdsbt-be.ld --dsbt-index 0 --dsbt-size=3 tmpdir/libtestb.so"
     "-mdsbt -mpic -mpid=near -mbig-endian" {shlib-app-1.s}
     {{readelf -WSsrld shlib-app-1b.rd}
      {objdump "-drj.plt -j.text" shlib-app-1b.dd}
      {objdump -sj.got shlib-app-1b.sd}
      {objdump -R shlib-app-1b.od}}
     "shlib-dynapp-1b"}
    {"C6X shared library, BE, REL"
     "-shared  -Tdsbt-be.ld --dsbt-index=2 --dsbt-size=3"
     "-mdsbt -mpic -mpid=near -mgenerate-rel -mbig-endian" {shlib-1.s shlib-2.s}
     {{readelf -WSsrld shlib-1rb.rd}
      {objdump "-drj.plt -j.text" shlib-1rb.dd}
      {objdump -sj.got shlib-1rb.sd}}
      "libtestrb.so"}
    {"C6X nonstatic app using shared library, BE, REL"
     "-Tdsbt-be.ld --dsbt-index 0 --dsbt-size=3 tmpdir/libtestrb.so"
     "-mdsbt -mpic -mpid=near -mgenerate-rel -mbig-endian" {shlib-app-1r.s}
     {{readelf -WSsrld shlib-app-1rb.rd}
      {objdump "-drj.plt -j.text" shlib-app-1rb.dd}
      {objdump -sj.got shlib-app-1rb.sd}
      {objdump -R shlib-app-1rb.od}}
     "shlib-dynapp-1rb"}

    {"C6X static app, LE, RELA"
     "-Tdsbt.ld --dsbt-index 0 --dsbt-size=3"
     "-mdsbt -mpic -mpid=near" {shlib-1.s shlib-2.s shlib-app-1.s}
     {{readelf -WSsrld static-app-1.rd}
      {objdump "-drj.plt -j.text" static-app-1.dd}
      {objdump -sj.got static-app-1.sd}
      {objdump -R static-app-1.od}}
     "static-app-1"}
    {"C6X static app, LE, REL"
     "-Tdsbt.ld --dsbt-index 0 --dsbt-size=3"
     "-mdsbt -mpic -mpid=near -mgenerate-rel" {shlib-1.s shlib-2.s shlib-app-1r.s}
     {{readelf -WSsrld static-app-1r.rd}
      {objdump "-drj.plt -j.text" static-app-1r.dd}
      {objdump -sj.got static-app-1r.sd}
      {objdump -R static-app-1r.od}}
     "static-app-1r"}
    {"C6X static app, BE, RELA"
     "-Tdsbt-be.ld --dsbt-index 0 --dsbt-size=3"
     "-mdsbt -mpic -mpid=near -mbig-endian" {shlib-1.s shlib-2.s shlib-app-1.s}
     {{readelf -WSsrld static-app-1b.rd}
      {objdump "-drj.plt -j.text" static-app-1b.dd}
      {objdump -sj.got static-app-1b.sd}
      {objdump -R static-app-1b.od}}
     "static-app-1b"}
    {"C6X static app, BE, REL"
     "-Tdsbt-be.ld --dsbt-index 0 --dsbt-size=3"
     "-mdsbt -mpic -mpid=near -mbig-endian -mgenerate-rel" {shlib-1.s shlib-2.s shlib-app-1r.s}
     {{readelf -WSsrld static-app-1rb.rd}
      {objdump "-drj.plt -j.text" static-app-1rb.dd}
      {objdump -sj.got static-app-1rb.sd}
      {objdump -R static-app-1rb.od}}
     "static-app-1rb"}
}

run_ld_link_tests $shlibtests