OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.18.50/] [ld/] [testsuite/] [ld-powerpc/] [powerpc.exp] - Blame information for rev 332

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
# Expect script for ld-powerpc tests
2
#   Copyright 2002, 2003, 2005, 2006, 2007 Free Software Foundation
3
#
4
# This file is part of the GNU Binutils.
5
#
6
# This program is free software; you can redistribute it and/or modify
7
# it under the terms of the GNU General Public License as published by
8
# the Free Software Foundation; either version 3 of the License, or
9
# (at your option) any later version.
10
#
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
# GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with this program; if not, write to the Free Software
18
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19
# MA 02110-1301, USA.
20
#
21
 
22
if { ![istarget "powerpc*-*-*"] } {
23
    return
24
}
25
 
26
if {[istarget "*-*-vxworks"]} {
27
    set ppcvxtests {
28
        {"VxWorks shared library test 1 (default script)" "-shared"
29
         "-mregnames" {vxworks1-lib.s}
30
         {{readelf --segments vxworks1-lib.sd}}
31
         "libvxworks1.so"}
32
        {"VxWorks shared library test 1" "-shared -Tvxworks1.ld"
33
         "-mregnames" {vxworks1-lib.s}
34
         {{readelf --relocs vxworks1-lib.rd} {objdump -dr vxworks1-lib.dd}
35
          {readelf --symbols vxworks1-lib.nd} {readelf -d vxworks1-lib.td}}
36
         "libvxworks1.so"}
37
        {"VxWorks executable test 1 (dynamic)" \
38
         "tmpdir/libvxworks1.so -Tvxworks1.ld -q --force-dynamic"
39
         "-mregnames" {vxworks1.s}
40
         {{readelf --relocs vxworks1.rd} {objdump -dr vxworks1.dd}}
41
         "vxworks1"}
42
        {"VxWorks executable test 2 (dynamic)" \
43
         "-Tvxworks1.ld -q --force-dynamic"
44
         "-mregnames" {vxworks2.s}
45
         {{readelf --segments vxworks2.sd}}
46
         "vxworks2"}
47
        {"VxWorks executable test 2 (static)"
48
         "-Tvxworks1.ld"
49
         "-mregnames" {vxworks2.s}
50
         {{readelf --segments vxworks2-static.sd}}
51
         "vxworks2"}
52
    }
53
    run_ld_link_tests $ppcvxtests
54
    run_dump_test "vxworks1-static"
55
    return
56
}
57
 
58
# powerpc ELF only at the moment.  Disable for nto too, even though it
59
# is ELF, because we pass -melf32ppc to ld and powerpc-nto-ld wants
60
# -melf32ppcnto.
61
 
62
if { [istarget "*-*-macos*"] || [istarget "*-*-netware*"]
63
     || [istarget "*-*-pe"] || [istarget "*-*-winnt*"]
64
     || [istarget "*-*-cygwin*"] || [istarget "*-*-aix*"]
65
     || [istarget "*-*-beos*"] || [istarget "*-*-lynxos*"]
66
     || [istarget "*-*-nto*"] } {
67
    return
68
}
69
 
70
proc supports_ppc64 { } {
71
    global ld
72
 
73
    catch "exec $ld --help | grep emulations" tmp
74
    if [ string match "*elf64ppc*" $tmp ] then {
75
        return 1
76
    } else {
77
        return 0
78
    }
79
}
80
 
81
# List contains test-items with 3 items followed by 2 lists:
82
# 0:name 1:ld options 2:assembler options
83
# 3:filenames of assembler files 4: action and options. 5: name of output file
84
 
85
# Actions:
86
# objdump: Apply objdump options on result.  Compare with regex (last arg).
87
# nm: Apply nm options on result.  Compare with regex (last arg).
88
# readelf: Apply readelf options on result.  Compare with regex (last arg).
89
 
90
set ppcelftests {
91
    {"Reloc section order" "-melf32ppc -shared -z nocombreloc" "-a32" {reloc.s}
92
     {{objdump -hw reloc.d}} "reloc.so"}
93
    {"APUinfo section processing" "-melf32ppc"
94
     "-a32 -me500" {apuinfo1.s apuinfo2.s}
95
    {{readelf -x2 apuinfo.rd}} "apuinfo"}
96
    {"TLS32 static exec" "-melf32ppc" "-a32"  {tls32.s tlslib32.s}
97
     {{objdump -dr tls32.d} {objdump -sj.got tls32.g}
98
      {objdump -sj.tdata tls32.t}}
99
     "tls32"}
100
    {"TLS32 helper shared library" "-shared -melf32ppc tmpdir/tlslib32.o" "" {}
101
     {} "libtlslib32.so"}
102
    {"TLS32 dynamic exec" "-melf32ppc tmpdir/tls32.o tmpdir/libtlslib32.so" "" {}
103
     {{readelf -WSsrl tlsexe32.r} {objdump -dr tlsexe32.d}
104
      {objdump -sj.got tlsexe32.g} {objdump -sj.tdata tlsexe32.t}}
105
      "tlsexe32"}
106
    {"TLS32 shared" "-shared -melf32ppc tmpdir/tls32.o" "" {}
107
     {{readelf -WSsrl tlsso32.r} {objdump -dr tlsso32.d}
108
      {objdump -sj.got tlsso32.g} {objdump -sj.tdata tlsso32.t}}
109
      "tls32.so"}
110
    {"Shared library with global symbol" "-shared -melf32ppc" "-a32" {sdalib.s}
111
     {} "sdalib.so"}
112
    {"Dynamic application with SDA" "-melf32ppc tmpdir/sdalib.so" "-a32" {sdadyn.s}
113
     {{objdump -R sdadyn.d}} "sdadyn"}
114
}
115
 
116
set ppc64elftests {
117
    {"TLS static exec" "-melf64ppc" "-a64"  {tls.s tlslib.s}
118
     {{objdump -dr tls.d} {objdump -sj.got tls.g} {objdump -sj.tdata tls.t}}
119
      "tls"}
120
    {"TLS helper shared library" "-shared -melf64ppc tmpdir/tlslib.o" "" {}
121
     {} "libtlslib.so"}
122
    {"TLS dynamic exec" "-melf64ppc tmpdir/tls.o tmpdir/libtlslib.so" "" {}
123
     {{readelf -WSsrl tlsexe.r} {objdump -dr tlsexe.d}
124
      {objdump -sj.got tlsexe.g} {objdump -sj.tdata tlsexe.t}}
125
      "tlsexe"}
126
    {"TLS shared" "-shared -melf64ppc tmpdir/tls.o" "" {}
127
     {{readelf -WSsrl tlsso.r} {objdump -dr tlsso.d}
128
      {objdump -sj.got tlsso.g} {objdump -sj.tdata tlsso.t}}
129
      "tls.so"}
130
    {"TLSTOC static exec" "-melf64ppc tmpdir/tlslib.o " "-a64"  {tlstoc.s}
131
     {{objdump -dr tlstoc.d} {objdump -sj.got tlstoc.g}
132
      {objdump -sj.tdata tlstoc.t}}
133
      "tlstoc"}
134
    {"TLSTOC dynamic exec" "-melf64ppc tmpdir/tlstoc.o tmpdir/libtlslib.so"
135
     "" {}
136
     {{readelf -WSsrl tlsexetoc.r} {objdump -dr tlsexetoc.d}
137
      {objdump -sj.got tlsexetoc.g} {objdump -sj.tdata tlsexetoc.t}}
138
      "tlsexetoc"}
139
    {"TLSTOC shared" "-shared -melf64ppc tmpdir/tlstoc.o" "" {}
140
     {{readelf -WSsrl tlstocso.r} {objdump -dr tlstocso.d}
141
      {objdump -sj.got tlstocso.g} {objdump -sj.tdata tlstocso.t}}
142
      "tlstoc.so"}
143
    {"sym@tocbase" "-shared -melf64ppc" "-a64" {symtocbase-1.s symtocbase-2.s}
144
        {{objdump -dj.data symtocbase.d}} "symtocbase.so"}
145
}
146
 
147
 
148
run_ld_link_tests $ppcelftests
149
 
150
if [ supports_ppc64 ] then {
151
    run_ld_link_tests $ppc64elftests
152
    run_dump_test "relbrlt"
153
}
154
 
155
run_dump_test "plt1"
156
 
157
run_dump_test "attr-gnu-4-00"
158
run_dump_test "attr-gnu-4-01"
159
run_dump_test "attr-gnu-4-02"
160
run_dump_test "attr-gnu-4-10"
161
run_dump_test "attr-gnu-4-11"
162
run_dump_test "attr-gnu-4-12"
163
run_dump_test "attr-gnu-4-13"
164
run_dump_test "attr-gnu-4-20"
165
run_dump_test "attr-gnu-4-21"
166
run_dump_test "attr-gnu-4-22"
167
run_dump_test "attr-gnu-4-31"
168
 
169
run_dump_test "attr-gnu-8-11"
170
run_dump_test "attr-gnu-8-23"
171
run_dump_test "attr-gnu-8-31"

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.