1 # Expect script for ld-mn10300 tests
2 # Copyright (C) 2007 Free Software Foundation
4 # This file is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 if {!([istarget "am3*-*-*"]) && !([istarget "mn10300*-*-*"]) } {
23 # Set up a list as described in ld-lib.exp
28 "--relax -Ttext 0x8000000"
30 { "i36434.s" "i36434-2.s" }
31 { {objdump -dz i36434.d} }
35 "difference of two symbols"
39 { {objdump -d i112045-1.d} }
43 "(shared) difference of two symbols"
47 { {objdump -R i112045-2.d} }
51 "adjustment of symbols due to relaxation"
55 { {readelf --syms i135409.d } }
60 run_ld_link_tests $am33_tests
62 proc i126256-test { } {
69 set testname "Issue 126256 - seg fault whilst linking one shared library into another when relaxation is enabled."
71 if { ![ld_compile "$CC -mrelax -fPIC" $srcdir/$subdir/i126256-1.c $tmpdir/i126256-1.o] } {
76 if { ![ld_compile "$CC -mrelax -fPIC" $srcdir/$subdir/i126256-2.c $tmpdir/i126256-2.o] } {
81 if { ![ld_simple_link $ld $tmpdir/i126256-1.so "-shared $tmpdir/i126256-1.o -e 0"]} {
86 if { ![ld_simple_link $ld $tmpdir/i126256-2.so "--relax -shared $tmpdir/i126256-2.o $tmpdir/i126256-1.so -e 0"]} {