This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/2] ld/testing: run_dump_test can now check linker mapfiles.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]