[PATCH] powerpc: Define USE_PPC64_NOTOC iff compiler and linker also supports it
Florian Weimer
fweimer@redhat.com
Tue Nov 16 20:48:50 GMT 2021
* Tulio Magno Quites Machado Filho via Libc-alpha:
> Tulio Magno Quites Machado Filho via Libc-alpha <libc-alpha@sourceware.org> writes:
>
>> Alan Modra via Libc-alpha <libc-alpha@sourceware.org> writes:
>>
>>> I have a question about powerpc64/ppc-mcount.S. Why is the assembly
>>> wrapper using ENTRY and a NOTOC call? By using ENTRY you are saying
>>> that calls to _mcount must have r2 valid. Given that r2 is valid, why
>>> then use NOTOC?
>>
>> I wouldn't be surprised if that was a misinterpretation of the ABI on my part.
>>
>> Looking at table 2.20 "Protocols for Local Function Calls", I think this is a
>> scenario that falls to the last row of this table, where we have:
>
> OK, I should be looking at table 2.19 because this is not a call within the
> same compilation unit.
I'm not entirely sure about that. I think “local” in this context means
“the caller has complete information about the callee”, and this is true
for most direct calls within libc.so.6. It's also necessary to make
LTO-based calling convention optimizations effective.
Thanks,
Florian
More information about the Libc-alpha
mailing list