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

Ulrich Drepper
2004-03-04T08:10:44Z

-----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.

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD4DBQFARuRa2ijCOnn/RHQRAnITAKCeS30ShpbeadFA5n/TlaTOXYNzygCVG3tg
2HCPVqo5DRtQfUoKwLY6vQ==
=ST37
-----END PGP SIGNATURE-----