daily update
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elf / eh-group.exp
CommitLineData
2a7b2e88
JK
1# Expect script for .eh_frame entries to a removed section.
2# Copyright 2008 Free Software Foundation, Inc.
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#
23# Written by Jan Kratochvil (jan.kratochvil@redhat.com)
24#
25# .eh_frame with relocations to a removed (group) section did result to:
26# error in tmpdir/eh-group.o(.eh_frame); no .eh_frame_hdr table will be created.
27# The purpose of this test is to merge two .o files with -r and then link this
28# merged file (containing a discarded R_X86_64_NONE relocation) to the final
29# executable trying to create .eh_frame_hdr. It needs a separate .exp file due
30# to the requirement of two `ld' runs.
31
32# Exclude non-ELF targets.
33
34if ![is_elf_format] {
35 return
36}
37
38set build_tests_ld {
39 {"Build eh-group1.o"
40 "-r" ""
41 {eh-group1.s eh-group2.s} {} "eh-group.o"}
42}
43
44run_ld_link_tests $build_tests_ld
45
46set testname "Link eh-group.o to eh-group"
47if [ld_simple_link $ld "tmpdir/eh-group" "-e _start tmpdir/eh-group.o"] {
48 pass $testname
49} else {
50 fail $testname
51}
This page took 0.025794 seconds and 4 git commands to generate.