diff options
Diffstat (limited to 'ld/testsuite/ld-scripts')
-rw-r--r-- | ld/testsuite/ld-scripts/map-address.exp | 37 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/map-stats.d | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/rgn-at3.d | 6 |
3 files changed, 34 insertions, 14 deletions
diff --git a/ld/testsuite/ld-scripts/map-address.exp b/ld/testsuite/ld-scripts/map-address.exp index 2291302..776fed4 100644 --- a/ld/testsuite/ld-scripts/map-address.exp +++ b/ld/testsuite/ld-scripts/map-address.exp @@ -130,19 +130,38 @@ if { [is_elf_format] } { $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" - } + } else { - # Some ELF targets do not preserve their local symbols. - setup_xfail "d30v-*-*" "dlx-*-*" "pj-*-*" "s12z-*-*" "xgate-*-*" + 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 + } + } +} + +set testname "map with resource usage" + +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 \ + --stats=tmpdir/map-stats.map"]} { + fail $testname +} else { if {[regexp_diff \ - "tmpdir/map-locals.map" \ - "$srcdir/$subdir/map-locals.d"]} { + "tmpdir/map-stats.map" \ + "$srcdir/$subdir/map-stats.d"]} { fail $testname } else { pass $testname diff --git a/ld/testsuite/ld-scripts/map-stats.d b/ld/testsuite/ld-scripts/map-stats.d new file mode 100644 index 0000000..ba9adf8 --- /dev/null +++ b/ld/testsuite/ld-scripts/map-stats.d @@ -0,0 +1,5 @@ +#... +Stats: phase.* +Stats: name.* +Stats: ALL.* +#pass diff --git a/ld/testsuite/ld-scripts/rgn-at3.d b/ld/testsuite/ld-scripts/rgn-at3.d index b0ea08a..1d21956 100644 --- a/ld/testsuite/ld-scripts/rgn-at3.d +++ b/ld/testsuite/ld-scripts/rgn-at3.d @@ -2,13 +2,9 @@ # source: rgn-at.s # ld: -T rgn-at3.t # objdump: -w -h -# xfail: rx-*-* *-*-nacl* +# xfail: rx-*-* # FAILS on the RX because the linker has to set LMA == VMA for the # Renesas loader. -# FAILs on NaCl targets because the linker extends the first segment -# to fill out the page, making its p_vaddr+p_memsz cover the sh_addr -# of .bss too, which makes BFD compute its LMA from the p_paddr of the -# text segment. .*: file format .* |