diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-11-15 22:44:56 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-11-15 22:44:56 +0000 |
commit | 1b09c02b1788bb88abd2e325f82600018290dbb3 (patch) | |
tree | e4a9638ce822bfe10aa2d1cb93f31e3dc54f3467 /ld/testsuite | |
parent | d7cde714c1fd98e48ffb94d259ac8156be0ffffa (diff) | |
download | gdb-1b09c02b1788bb88abd2e325f82600018290dbb3.zip gdb-1b09c02b1788bb88abd2e325f82600018290dbb3.tar.gz gdb-1b09c02b1788bb88abd2e325f82600018290dbb3.tar.bz2 |
* ld-srec/srec.exp: New tests.
* ld-srec/sr1.c, ld-srec/sr2.c, ld-srec/sr3.cc: New files.
* lib/ld.exp (ld_simple_link): Discard warnings about not being
able to find the entry symbol.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/.Sanitize | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-srec/.Sanitize | 39 | ||||
-rw-r--r-- | ld/testsuite/ld-srec/sr2.c | 18 | ||||
-rw-r--r-- | ld/testsuite/lib/ld.exp | 5 |
4 files changed, 63 insertions, 0 deletions
diff --git a/ld/testsuite/.Sanitize b/ld/testsuite/.Sanitize index 46d518c..945f437 100644 --- a/ld/testsuite/.Sanitize +++ b/ld/testsuite/.Sanitize @@ -32,6 +32,7 @@ ld-empic ld-scripts ld-sh ld-shared +ld-srec ld-undefined ld-versados diff --git a/ld/testsuite/ld-srec/.Sanitize b/ld/testsuite/ld-srec/.Sanitize new file mode 100644 index 0000000..19e17bf --- /dev/null +++ b/ld/testsuite/ld-srec/.Sanitize @@ -0,0 +1,39 @@ +# .Sanitize for ld dejagnu testsuites + +# Each directory to survive it's way into a release will need a file +# like this one called "./.Sanitize". All keyword lines must exist, +# and must exist in the order specified by this file. Each directory +# in the tree will be processed, top down, in the following order.. + +# Hash started lines like this one are comments and will be deleted +# before anything else is done. Blank lines will also be squashed +# out. + +# The lines between the "Do-first:" line and the "Things-to-keep:" +# line are executed as a /bin/sh shell script before anything else is +# done in this directory. + +Do-first: + +# All files listed between the "Things-to-keep:" line and the +# "Do-last:" line will be kept. All other files will be removed. +# Directories listed in this section will have their own Sanitize +# called. Directories not listed will be removed in their entirety +# with rm -rf. + +Things-to-keep: + +sr1.c +sr2.c +sr3.cc +srec.exp + +Things-to-lose: + +# The lines between the "Do-last:" line and the end of the file +# are executed as a /bin/sh shell script after everything else is +# done. + +Do-last: + +#eof diff --git a/ld/testsuite/ld-srec/sr2.c b/ld/testsuite/ld-srec/sr2.c new file mode 100644 index 0000000..5736cfa --- /dev/null +++ b/ld/testsuite/ld-srec/sr2.c @@ -0,0 +1,18 @@ +/* This file is compiled and linked into the S-record format. */ + +int e1; +int e2 = 1; + +int +fn1 (s) + char *s; +{ + return s[e1]; +} + +int +fn2 (s) + char *s; +{ + return s[e2]; +} diff --git a/ld/testsuite/lib/ld.exp b/ld/testsuite/lib/ld.exp index 55994d0..a6dfdb0 100644 --- a/ld/testsuite/lib/ld.exp +++ b/ld/testsuite/lib/ld.exp @@ -96,6 +96,11 @@ proc default_ld_simple_link { ld target objects } { catch "exec $ld -o $target $objects" exec_output set exec_output [prune_system_crud $host_triplet $exec_output] + + # We don't care if we get a warning about a non-existent start + # symbol, since the default linker script might use ENTRY. + regsub -all "(^|\n)($ld: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output + if [string match "" $exec_output] then { return 1 } else { |