1 # Expect script for VAX ELF linker tests
2 # Copyright (C) 2012-2015 Free Software Foundation, Inc.
4 # This file is part of the GNU Binutils.
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.
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.
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,
22 if { ![istarget vax-*-*] || ![is_elf_format] } {
26 run_ld_link_tests [list \
27 [list "PLT test (shared library)" \
28 "-shared -T plt-local-lib.ld" "" \
31 { { objdump -d plt-local-lib.dd } } \
33 [list "PLT test (object 1)" \
36 { plt-local-hidden-pic.s } \
38 "plt-local-hidden-pic-r.o"] \
39 [list "PLT test (object 2)" \
42 { plt-local-rehidden-pic.s } \
44 "plt-local-rehidden-pic-r.o"] \
45 [list "PLT test (executable)" \
46 "-T plt-local.ld tmpdir/plt-local-hidden-pic-r.o tmpdir/plt-local-rehidden-pic-r.o tmpdir/plt-local-lib.so" "" \
49 { { objdump -d plt-local.dd } } \
52 # Global offset table tests. Make sure hidden symbols do not get GOT
54 run_ld_link_tests [list \
55 [list "GOT test (auxiliary shared library)" \
61 [list "GOT test (object 1)" \
66 "got-local-ref-r.o"] \
67 [list "GOT test (object 2)" \
72 "got-local-def-r.o"] \
73 [list "GOT test (executable)" \
74 "-e 0 tmpdir/got-local-aux.so tmpdir/got-local-ref-r.o tmpdir/got-local-def-r.o" "" \
77 { { readelf "-x .got" got-local-exe.xd } } \
79 [list "GOT test (shared library)" \
80 "-shared tmpdir/got-local-aux.so tmpdir/got-local-ref-r.o tmpdir/got-local-def-r.o" "" \
83 { { readelf "-x .got" got-local-lib.xd } } \
86 # Export class relocation tests.
87 run_ld_link_tests [list \
89 "VAX export class call relocation test" \
90 "-shared -Ttext 0x12340000 -T export-class.ld" "" \
92 [list export-class-call.s export-class-def.s] \
94 [list objdump -d export-class-call.dd] \
95 [list readelf -r export-class-call.rd] \
96 [list readelf "-x .got" export-class-call.xd]] \
97 "export-class-call.so"] \
99 "VAX export class data relocation test" \
100 "-shared -Ttext 0x12340000 -T export-class.ld" "" \
102 [list export-class-data.s export-class-def.s] \
104 [list objdump -d export-class-data.dd] \
105 [list readelf -r export-class-data.rd] \
106 [list readelf "-x .got" export-class-data.xd]] \
107 "export-class-data.so"]]