[PATCH V2] testsuite: support mold linker
Martin Liška
mliska@suse.cz
Mon Dec 5 14:52:02 GMT 2022
On 12/5/22 15:48, Jan Beulich wrote:
> On 05.12.2022 15:24, Martin Liška wrote:
>> On 12/5/22 15:08, Jan Beulich wrote:
>>> On 05.12.2022 14:48, Martin Liška wrote:
>>> 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.
>>
>> This nm invocation is supposed to save dynamic symbols (.dyns) and normal symbols ('.fsyms'),
>> where .fsymc contains both data and functions.
>>
>> The symbol which I need to properly list is:
>>
>> mtest.c:int global = 1;
>>
>> which gets 'b' with mold linker.
>
> Yet then 'b' != 'd',
Sure, 'd' should be there.
> and this is unrelated to "main" (which is the only
> thing you mention in the description)?
I mentioned 'symbols like main', so would it be better mentioning
'global symbols and variables'?
Thanks,
Martin
>
> Jan
More information about the Binutils
mailing list