aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/lib
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2002-05-07 11:08:57 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2002-05-07 11:08:57 +0000
commit3e3f011f9342b3ae7fd2f4b0e9a1484be6a31d60 (patch)
tree0f400df6d751c416063420d40b895933e86a3259 /ld/testsuite/lib
parent9f88b410a04363dbc584211667fcc3b565f37466 (diff)
downloadgdb-3e3f011f9342b3ae7fd2f4b0e9a1484be6a31d60.zip
gdb-3e3f011f9342b3ae7fd2f4b0e9a1484be6a31d60.tar.gz
gdb-3e3f011f9342b3ae7fd2f4b0e9a1484be6a31d60.tar.bz2
* lib/ld-lib.exp (run_dump_test): Add -L$srcdir/$subdir.
(is_elf_format): New, extracted from... * ld-scripts/weak.exp: ...here. * ld-scripts/overlay-size.exp: New test. * ld-scripts/overlay-size.[tsd], * ld-scripts/overlay-size-map.d: New files for it.
Diffstat (limited to 'ld/testsuite/lib')
-rw-r--r--ld/testsuite/lib/ld-lib.exp29
1 files changed, 28 insertions, 1 deletions
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 06583e5..418c000 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -323,6 +323,29 @@ proc default_ld_nm { nm nmflags object } {
}
#
+# is_elf_format
+# true if the object format is known to be ELF
+#
+proc is_elf_format {} {
+ if { ![istarget *-*-sysv4*] \
+ && ![istarget *-*-unixware*] \
+ && ![istarget *-*-elf*] \
+ && ![istarget *-*-eabi*] \
+ && ![istarget *-*-linux*] \
+ && ![istarget *-*-irix5*] \
+ && ![istarget *-*-irix6*] \
+ && ![istarget *-*-solaris2*] } {
+ return 0
+ }
+
+ if { [istarget *-*-linux*aout*] \
+ || [istarget *-*-linux*oldld*] } {
+ return 0
+ }
+ return 1
+}
+
+#
# simple_diff
# compares two files line-by-line
# returns differences if exist
@@ -685,7 +708,11 @@ proc run_dump_test { name } {
# Perhaps link the file(s).
if { $run_ld } {
set objfile "tmpdir/dump"
- set cmd "$LD $LDFLAGS $opts(ld) -o $objfile $objfiles"
+
+ # Add -L$srcdir/$subdir so that the linker command can use
+ # linker scripts in the source directory.
+ set cmd "$LD $LDFLAGS -L$srcdir/$subdir \
+ $opts(ld) -o $objfile $objfiles"
send_log "$cmd\n"
set cmdret [catch "exec $cmd" comp_output]