old-cross-binutils/ld/testsuite/ld-scripts/overlay-size.d
Andrew Burgess 43d66c95c8 ld/testing: run_dump_test can now check linker mapfiles.
Add a new option 'map' to the ld run_dump_test mechanism.  When the
'map' option is given run_dump_test will ensure that there is a
-Map=MAPFILE present in the linker command line, adding one if needed.

The MAPFILE is then compared with the file passed to the new 'map'
option using the regexp_diff function.  This should make it slightly
easier to write tests that check the linker mapfile output.

The only test I found that already compares mapfile content is updated
to use the new mechanism.

ld/testsuite/ChangeLog:

	* ld-scripts/overlay-size.d: Add 'map' option.
	* ld-scripts/overlay-size.exp: Remove manual check of mapfile.
	* lib/ld-lib.exp (run_dump_test): Add support for new 'map'
	option, checking linker mapfile output.
2015-01-20 09:47:37 +00:00

33 lines
796 B
Makefile

# ld: -T overlay-size.t -Map tmpdir/overlay-size.map
# name: overlay size
# objdump: --headers
# map: overlay-size-map.d
# xfail: rx-*-*
# FAILS on the RX because the linker has to set LMA == VMA for the
# Renesas loader.
#
# The .bss[123] LMAs are deliberately blanked out. We can't
# reliably map overlaid sections to segments.
#...
.. \.bss1 +0+010 +0+20000 .*
#...
.. \.bss2 +0+030 +0+20000 .*
#...
.. \.bss3 +0+020 +0+20000 .*
#...
.. \.mtext +0+020 +0+10000 +0+30000 .*
#...
.. \.mbss +0+230 +0+20030 .*
#...
.. \.text1 +0+080 +0+10020 +0+30020 .*
#...
.. \.text2 +0+040 +0+10020 +0+300a0 .*
#...
.. \.text3 +0+020 +0+10020 +0+300e0 .*
#...
.. \.data1 +0+030 +0+20260 +0+30100 .*
#...
.. \.data2 +0+040 +0+20260 +0+30130 .*
#...
.. \.data3 +0+050 +0+20260 +0+30170 .*
#pass