[PATCH] glibc vDSO bits for ppc/ppc64 update

Ulrich Drepper drepper@redhat.com
Wed Nov 16 07:38:00 GMT 2005


Tom Gall wrote:
> Enclosed is the next revision of the glibc vDSO implementation for 
> ppc/ppc64 that goes hand in hand with benh's vDSO kernel work currently 
> available at http://gate.crashing.org/~benh/ppc64-vdso-update.diff.

I assume benh already told you what is wrong with the patch.  You cannot 
just call the vdso functions.  They work like syscalls, especially with 
the most recent kernels.  They return error values and set the bit in 
cr0 on error.  You need to define some asm macro like INTERNAL_SYSCALL. 
  Ideally with the same interface.  Then handle the error case 
appropriate (again, same macros as for INTERNAL_SYSCALL).

The SYSCALL_GETRES_MONOTONIC has a stray #ifdef.

About the name lookup in the vdso.  You use the traditional lookup which 
of course works.  But since the vdso symbol table only contains 
definitions which are actually used it would be faster to just iterate 
over the symbol table and determine whether the symbol is used or not.

Furthermore, the symbols in the vdso are versioned, right?  So use the 
version name in the lookup.  We know at each time which version we want. 
  This needs to be hardcoded.

There is no user of _dl_vdso_sym and _dl_vdso_vsym.  Scratch the 
definitions.

There are still plenty of formatting bugs.  Missing white spaces etc. 
Unnecessary { }.

use __builtin_expect for error cases.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖



More information about the Libc-alpha mailing list