diff options
Diffstat (limited to 'ld/testsuite/ld-scripts/map-address.exp')
-rw-r--r-- | ld/testsuite/ld-scripts/map-address.exp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ld/testsuite/ld-scripts/map-address.exp b/ld/testsuite/ld-scripts/map-address.exp index 0eeca10fdd8..fbea9064265 100644 --- a/ld/testsuite/ld-scripts/map-address.exp +++ b/ld/testsuite/ld-scripts/map-address.exp @@ -120,3 +120,30 @@ if {[regexp_diff \ } else { pass $testname } + +if { [is_elf_format] } { + set testname "map with locals" + + if {![ld_link $ld tmpdir/map-address \ + "$LDFLAGS -T $srcdir/$subdir/map-address.t \ + $IMAGE_BASE tmpdir/map-address.o \ + -Map=tmpdir/map-locals.map --print-map-locals"]} { + fail $testname + return + } + + if [is_remote host] then { + remote_upload host "tmpdir/map-locals.map" + } + + # Some ELF targets do not preserve their local symbols. + setup_xfail "d30v-*-*" "dlx-*-*" "pj-*-*" "s12z-*-*" "xgate-*-*" + + if {[regexp_diff \ + "tmpdir/map-locals.map" \ + "$srcdir/$subdir/map-locals.d"]} { + fail $testname + } else { + pass $testname + } +} |