(md_apply_fix3:BFD_RELOC_ARM_IMMEDIATE): Do not allow values which have come
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elf / frame.exp
CommitLineData
117a3ac8
L
1# Expect script for common symbol tests
2# Copyright 2004 Free Software Foundation, Inc.
3#
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 2 of the License, or
7# (at your option) any later version.
8#
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.
13#
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.
17#
18# Written by H.J. Lu (hongjiu.lu@intel.com)
19#
20
21# Make sure that ld correctly handles frame sections in ELF.
22
23# This test can only be run on ELF platforms.
24if ![is_elf_format] {
25 return
26}
27
3874ed78
AM
28# No shared lib support on this target.
29if { [istarget "mcore-*-*"] } {
30 return
31}
32
117a3ac8
L
33set test1 "read-only .eh_frame section"
34set test2 "read-only .gcc_except_table section"
35
36global as
37global ld
38
39if { ![ld_assemble $as $srcdir/$subdir/tbss.s tmpdir/tbss.o ]
40 || ![ld_assemble $as $srcdir/$subdir/frame.s tmpdir/frame.o] } {
41 unresolved "$test1"
42 return
43}
44
45if { [ld_simple_link $ld tmpdir/frame.so "--shared tmpdir/frame.o tmpdir/tbss.o"] } {
46 pass "$test1"
47} else {
e6f12cf6
NC
48 if [string match "*shared not supported*" $link_output] {
49 unsupported "-shared is not supported by this target"
50 } else {
51 fail "$test1"
52 }
117a3ac8
L
53}
54
55if ![ld_assemble $as $srcdir/$subdir/table.s tmpdir/table.o ] {
56 unresolved "$test2"
57 return
58}
59
60if { [ld_simple_link $ld tmpdir/table.so "--shared tmpdir/table.o tmpdir/tbss.o"] } {
61 pass "$test2"
62} else {
e6f12cf6
NC
63 if [string match "*shared not supported*" $link_output] {
64 unsupported "-shared is not supported by this target"
65 } else {
66 fail "$test2"
67 }
117a3ac8 68}
This page took 0.0324 seconds and 4 git commands to generate.