From mboxrd@z Thu Jan 1 00:00:00 1970 From: pbonzini@redhat.com (Paolo Bonzini) Date: Mon, 15 Feb 2010 09:10:14 +0100 Subject: [ltt-dev] [PATCH 04/11] define sync_core for x86 PIC In-Reply-To: <20100214143743.GE5871@Krystal> References: <1266081392-8732-1-git-send-email-pbonzini@redhat.com> <1266081392-8732-5-git-send-email-pbonzini@redhat.com> <20100214143743.GE5871@Krystal> Message-ID: <4B790166.70901@redhat.com> 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. Paolo