diff options
Diffstat (limited to 'ld/testsuite/ld-scripts/map-address.exp')
-rw-r--r-- | ld/testsuite/ld-scripts/map-address.exp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/ld/testsuite/ld-scripts/map-address.exp b/ld/testsuite/ld-scripts/map-address.exp index 1f9457a8cdb..e8d3683c018 100644 --- a/ld/testsuite/ld-scripts/map-address.exp +++ b/ld/testsuite/ld-scripts/map-address.exp @@ -46,6 +46,7 @@ if {[regexp_diff \ pass $testname } + set testname "map to directory" if {![ld_link $ld tmpdir/map-address \ @@ -67,3 +68,49 @@ if {[regexp_diff \ } else { pass $testname } + + +set testname "map to % directory" + +if {![ld_link $ld tmpdir/map-address \ + "$LDFLAGS -T $srcdir/$subdir/map-address.t \ + tmpdir/map-address.o \ + -Map=tmpdir/% --output fred"]} { + fail $testname + return +} + +if [is_remote host] then { + remote_upload host "tmpdir/fred.map" +} + +if {[regexp_diff \ + "tmpdir/fred.map" \ + "$srcdir/$subdir/map-address.d"]} { + fail $testname +} else { + pass $testname +} + + +set testname "map to %.foo directory" + +if {![ld_link $ld tmpdir/map-address \ + "$LDFLAGS -T $srcdir/$subdir/map-address.t \ + tmpdir/map-address.o \ + -Map=tmpdir/%.foo --output fred"]} { + fail $testname + return +} + +if [is_remote host] then { + remote_upload host "tmpdir/fred.foo" +} + +if {[regexp_diff \ + "tmpdir/fred.foo" \ + "$srcdir/$subdir/map-address.d"]} { + fail $testname +} else { + pass $testname +} |