mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-20 14:22:35 +08:00
* 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:
@ -32,6 +32,7 @@ ld-empic
|
|||||||
ld-scripts
|
ld-scripts
|
||||||
ld-sh
|
ld-sh
|
||||||
ld-shared
|
ld-shared
|
||||||
|
ld-srec
|
||||||
ld-undefined
|
ld-undefined
|
||||||
ld-versados
|
ld-versados
|
||||||
|
|
||||||
|
39
ld/testsuite/ld-srec/.Sanitize
Normal file
39
ld/testsuite/ld-srec/.Sanitize
Normal 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
|
18
ld/testsuite/ld-srec/sr2.c
Normal file
18
ld/testsuite/ld-srec/sr2.c
Normal 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];
|
||||||
|
}
|
@ -96,6 +96,11 @@ proc default_ld_simple_link { ld target objects } {
|
|||||||
|
|
||||||
catch "exec $ld -o $target $objects" exec_output
|
catch "exec $ld -o $target $objects" exec_output
|
||||||
set exec_output [prune_system_crud $host_triplet $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 {
|
if [string match "" $exec_output] then {
|
||||||
return 1
|
return 1
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user