Re: [RFC][PATCH] linux-2.6.4-pre1_vsyscall-gtod_B3-part3 (3/3)

john stultz
2004-03-04T19:02:43Z

On Thu, 2004-03-04 at 00:09, Ulrich Drepper wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> john stultz wrote:
>
> > Before we start up this larger debate again, might there be some short
> > term solution for my patch that would satisfy both of you?
>
> I suggest the following:
>
> ~ define a symbol __kernel_gettimeofday_offset in the vdso's symbol
> table. This should be an absolute symbol containing the offset of the
> gettimeofday implementation from the beginning of the vdso (the address
> passed up in the auxiliary vector)
>
> ~ glibc can then use the equivalent of
> dlsym("__kernel_gettimeofday_offset"). If the symbol is not defined,
> it's not used (doh). If it is defined, the final function address is
> computed by adding the offset to the vdso address.
>
>
> This ensures a direct jump and it still keeps the vdso relocatable
> without modifying the symbol table.

Excellent, this sounds similar to what Andrea was suggesting.
I'll start working to implement this.

thanks for the momentary truce ;)
-john