[PATCH V2] testsuite: support mold linker

Jan Beulich jbeulich@suse.com
Mon Dec 5 14:08:58 GMT 2022


On 05.12.2022 14:48, Martin Liška wrote:
> Mold linker demotes symbols like main to be local and the patch
> adjusts expected output from nm.
> 
> Moreover, simplify the patterns and remove accidental type 'D' that
> is supported value for _?main functions.

Hmm, in my v1 comment I've said "accidental" to the difference, not
to the presence of D. In fact I was expecting you to uniformly use
[TtDd] everywhere. See also adacfc818440 (sadly without any real
description). (That commit is also where [some of] the odd ([...]+)?
regexp constructs were introduced.) Cc-ing Jakub in case he recalls
background.

Furthermore I now even less understand ...

> --- a/libbacktrace/Makefile.am
> +++ b/libbacktrace/Makefile.am
> @@ -498,7 +498,7 @@ TESTS += mtest_minidebug
>  
>  %_minidebug: %
>  	$(NM) -D $< -P --defined-only | $(AWK) '{ print $$1 }' | sort > $<.dsyms
> -	$(NM) $< -P --defined-only | $(AWK) '{ if ($$2 == "T" || $$2 == "t" || $$2 == "D") print $$1 }' | sort > $<.fsyms
> +	$(NM) $< -P --defined-only | $(AWK) '{ if ($$2 == "T" || $$2 == "t" || $$2 == "D" || $$2 == "d") print $$1 }' | sort > $<.fsyms

... this part of the change, where - as in v1 - you add a check for
'd', while a check for 't' (which supposedly is what you're after)
was already there.

Jan


More information about the Binutils mailing list