* cgen.c (gas_cgen_parse_operand): Do not set BSF_RELC flag on
[binutils.git] / ld / testsuite / ld-elf / audit.exp
blob407c61af1c06ae5938d96beb36fe1bdcf1b77d67
1 # Expect script for various ELF tests.
2 #   Copyright 2009 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,
19 # MA 02110-1301, USA.
22 # Exclude non-ELF targets.
24 if ![is_elf_format] {
25     return
28 # The following tests require running the executable generated by ld.
29 if ![isnative] {
30     return
33 # Check if compiler works
34 if { [which $CC] == 0 } {
35     return
38 set build_tests {
39   {"Run with -paudit.so"
40      "-Wl,--audit=tmpdir/audit.so" ""
41      {main.c} {{"readelf" {-d} "audit.rd"}} "audit.out"}
42   {"Run with -Paudit.so"
43      "-Wl,-Ptmpdir/audit.so" ""
44      {main.c} {{"readelf" {-d} "depaudit.rd"}} "depaudit.out"}
45   {"Run with --depaudit=audit.so"
46      "-Wl,--depaudit=tmpdir/audit.so" ""
47      {main.c} {{"readelf" {-d} "depaudit.rd"}} "depaudit2.out"}
48   {"Run with shared with --audit"
49      "-shared -Wl,--audit=tmpdir/audit.so" "-fPIC"
50      {main.c} {} "libusesaudit.so"}
51   {"Run with shared with --audit"
52      "-shared -Wl,--audit=tmpdir/audit.so -Wl,--audit=tmpdir/audit2.so \
53      -Wl,--audit=tmpdir/audit3.so"
54      "-fPIC"
55      {main.c} {} "libusesaudit2.so"}
56   {"Run with -lusesaudit"
57      "-Ltmpdir/ -lusesaudit" ""
58      {main.c} {{"readelf" {-d} "depaudit.rd"}} "useslibusesaudit.out"}
59   {"Run with -lusesaudit -lusesaudit2"
60      "-Ltmpdir/ -lusesaudit -lusesaudit2" ""
61      {main.c} {{"readelf" {-d} "depaudit2.rd"}} "useslibusesaudit2.out"}
64 run_cc_link_tests $build_tests