Roger Oberholtzer wrote:
On Thu, 2012-02-09 at 15:00 +0100, Per Jessen wrote:
Roger Oberholtzer wrote:
Is it the case that applications should just magically get the VDSO version of the three system calls listed above? If that is the case, I should not see calls to gettimeofday in straces of my app. But I do.
I suspect there is is an additional step needed. I have not recognized it in my googling on the topic. Perhaps a compile/linker option?
I think you need to link in the vdso module when you build your application.
OK. Where is that? I looked for something called *vdso* in /usr/lib, but came up empty.
I only read the article, sometimes another pair of eyes will help. This is the section:
Let's compile a test case to exercise the vDSO call:
/* notb.c */ #include
int main(void) { int notb = number_of_the_beast();
printf("His number is %d\n", notb);
return 0; }
Then, compile the code above as:
gcc notb.c -o notb vdso.so
The file you link against is vdso.so, which provides the symbol resolution needed to make the kernel call. The kernel version of number_of_the_beast() is called, even if the code for that function is completely different in vdso.so. Where is vdso.so located? It's located in the kernel build directory after building the kernel:linux-2.6.37/arch/x86/vdso/vdso.so.
Let us know how it goes, it's an interesting topic. /Per Jessen, Zürich -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-programming+owner@opensuse.org