[PATCH 1/2] ld/testing: run_dump_test can now check linker mapfiles.
Hans-Peter Nilsson
hp@bitrange.com
Thu Jan 8 01:21:00 GMT 2015
On Wed, 7 Jan 2015, Andrew Burgess wrote:
> This is just a new mechanism to make it easier to test linker mapfiles.
(Not an approver, but:) Cool. Just a few nits:
> --- a/ld/testsuite/lib/ld-lib.exp
> +++ b/ld/testsuite/lib/ld-lib.exp
> @@ -555,6 +555,14 @@ proc ld_simple_link_defsyms {} {
> # both "error" and "warning". Multiple "warning" directives
> # append to the expected linker warning message.
> #
> +# map: FILE
> +# Adding this option will cause the linker to generate a linker
> +# map file, using the -Map=MAPFILE command line option. If thre
"there"
> +# is no -Map=MAPFILE in the 'ld: FLAGS' then one will be added
> +# to the linker command line. The contents of the generated
Consider simplifying: always add it when "map:" is present.
(I just don't see the use in the more complex function. Keep
it simple.)
> + if { [regexp -- "-Map=(\[^ \]+)" $cmd all mapfile] } then {
> + # Found existing mapfile option
> + verbose -log "Existing mapfile '$mapfile' found"
> + } else {
> + # No mapfile option.
> + set mapfile "tmpdir/dump.map"
> + verbose -log "Adding mapfile '$mapfile' found"
Spurious cutnpasto "found", last?
(Moot if you delete this block. :)
brgds, H-P
More information about the Binutils
mailing list