ChangeLog rotatation and copyright year update
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elf / compress.exp
CommitLineData
4a114e3e 1# Expect script for ELF compressed debug section tests.
b90efa5b 2# Copyright (C) 2010-2015 Free Software Foundation, Inc.
4a114e3e
L
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# Exclude non-ELF targets.
23
24if ![is_elf_format] {
25 return
26}
27
65951855
RM
28if ![is_zlib_supported] {
29 return
30}
31
4a114e3e
L
32# The following tests require running the executable generated by ld.
33if ![isnative] {
34 return
35}
36
37# Check if compiler works
38if { [which $CC] == 0 } {
39 return
40}
41
42global as
43if { ![ld_assemble $as "--compress-debug-sections $srcdir/$subdir/empty.s" tmpdir/empty.o ] } {
44 unsupported "linker compressed debug sections"
45}
46
47set build_tests {
48 {"Build libfoo.so with compressed debug sections"
49 "-shared" "-fPIC -g -Wa,--compress-debug-sections"
50 {foo.c} {} "libfoo.so"}
51 {"Build libbar.so with compressed debug sections"
52 "-shared" "-fPIC -g -Wa,--compress-debug-sections"
53 {begin.c end.c} {} "libbar.so"}
54}
55
56set run_tests {
57 {"Run normal with libfoo.so with compressed debug sections"
58 "tmpdir/begin.o tmpdir/libfoo.so tmpdir/end.o" "-Wa,--compress-debug-sections"
59 {main.c} "normal" "normal.out"}
60}
61
62run_cc_link_tests $build_tests
63run_ld_link_exec_tests [] $run_tests
This page took 0.211427 seconds and 4 git commands to generate.