diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2002-05-07 11:08:57 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2002-05-07 11:08:57 +0000 |
commit | 3e3f011f9342b3ae7fd2f4b0e9a1484be6a31d60 (patch) | |
tree | 0f400df6d751c416063420d40b895933e86a3259 /ld/testsuite/lib | |
parent | 9f88b410a04363dbc584211667fcc3b565f37466 (diff) | |
download | gdb-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.exp | 29 |
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] |