[ltt-dev] [PATCH 04/11] define sync_core for x86 PIC
Mathieu Desnoyers
compudj at krystal.dyndns.org
Mon Feb 15 09:56:30 EST 2010
* Paolo Bonzini (pbonzini at redhat.com) wrote:
> On 02/14/2010 03:37 PM, Mathieu Desnoyers wrote:
>> Please add a note saying that it also works in the presence of signal
>> handlers, because we are not using the ebx value returned by cpuid.
>>
>> It would not be correct to use this with signals enabled if we cared
>> about the ebx value returned by cpuid.
>
> It would, because %ebx is callee-save and the signal handler would have
> to reinitialize it (since each shared library for example has its own
> GOT, it doesn't know if the caller had the same GOT). In general,
> functions that are not static or hidden, or that have their address
> taken need to rebuild the GOT pointer. Signal handlers fall obviously
> in the latter category.
OK, that makes perfect sense. Thanks for the explanation. It could be
good to add a few words explaining this in your patch.
Mathieu
>
> Paolo
>
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
More information about the lttng-dev
mailing list