[RFC] ppc64 and calling conventions

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu Nov 11 14:32:48 EST 2004


Hi !

Before I submit the ppc64 vDSO upstream, I want to make sure we decide
on the calling convention to the library. I've been toying with a couple
of options, but I'd like some feedback.

The current one still exports 'normal' function symbols, that is
procedure descriptors and "dot" symbols for the actual function. The
whole thing is linked at +1Mb and mapping it elsewhere would require
some sort of relocations to be done, or the call sites in glibc to do
some additional arithmetic. (I can do relocation from the kernel
triggering copy-on-write, but that seem like a bad idea ...)

Something that was proposed a while ago (by Ulrich I think) is that
instead, I could export simple non-descriptor symbols that point
directly to the code and link the whole thing at 0. That way, what get
exported by the vDSO becomes offsets to the functions. Since glibc will
need call glue anyway, it doesn't make much difference, but allow the
vDSO to be mapped anywhere.

What do you think ? Should I stay to exporting normal symbols or switch
to the above idea ?

Additionally, we may consider, in the future, some ld.so trickery so
that applications OPDs are directly "fixed up" to point to the vDSO to
save the cost of the trampoline.

Ben.





More information about the Linuxppc64-dev mailing list