This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 1/2] ld/testing: run_dump_test can now check linker mapfiles.
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Andrew Burgess <andrew dot burgess at embecosm dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 7 Jan 2015 20:21:00 -0500 (EST)
- Subject: Re: [PATCH 1/2] ld/testing: run_dump_test can now check linker mapfiles.
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1420631791 dot git dot andrew dot burgess at embecosm dot com> <83c76e053661eddd25742de29d39e07208b1b83e dot 1420631791 dot git dot andrew dot burgess at embecosm dot com>
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