* 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.
This commit is contained in:
Ian Lance Taylor 1995-11-15 22:44:56 +00:00
parent d7cde714c1
commit 1b09c02b17
4 changed files with 63 additions and 0 deletions

View file

@ -32,6 +32,7 @@ ld-empic
ld-scripts
ld-sh
ld-shared
ld-srec
ld-undefined
ld-versados

View file

@ -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

View file

@ -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];
}

View file

@ -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 {