0

is vdso supported for a 32 bit application which is running on a 64 bit kernel with glibc version 2.15.? If yes, how do I make it work for 32 bit application running on 64 bit kernel.? Cause even though dlopen on "linux-vdso.so.1" is success, dlsym on "__vdso_gettimeofday" fails.

On the same system I able to do a dlopen on "linux-vdso.so.1" & dlsym on "__vdso_gettimeofday" from a application compiled for 64 bit.

user3465381
  • 41
  • 1
  • 4
  • Vdso support for 32-bit kernel was added later. Make sure you have checked the kernel versions. – rakib_ Aug 17 '16 at 05:47
  • @rakib My kernel is 64 bit, its the **application that is 32 bit**. As I mentioned in the question on the same kernel, application compiled for 64bit seems to have vdso support. – user3465381 Aug 17 '16 at 09:16

1 Answers1

0

On my 64-bit Linux 4.4.15, the 32-bit vdso has these symbols:

readelf -Ws vdso32

Symbol table '.dynsym' contains 9 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 00000ce0     9 FUNC    GLOBAL DEFAULT   12 __kernel_sigreturn@@LINUX_2.5
     2: 00000d00    13 FUNC    GLOBAL DEFAULT   12 __kernel_vsyscall@@LINUX_2.5
     3: 00000ad0   438 FUNC    GLOBAL DEFAULT   12 __vdso_gettimeofday@@LINUX_2.6
     4: 00000c90    42 FUNC    GLOBAL DEFAULT   12 __vdso_time@@LINUX_2.6
     5: 00000770   853 FUNC    GLOBAL DEFAULT   12 __vdso_clock_gettime@@LINUX_2.6
     6: 00000cf0     8 FUNC    GLOBAL DEFAULT   12 __kernel_rt_sigreturn@@LINUX_2.5
     7: 00000000     0 OBJECT  GLOBAL DEFAULT  ABS LINUX_2.5
     8: 00000000     0 OBJECT  GLOBAL DEFAULT  ABS LINUX_2.6

This suggests that the __vdso_gettimeofday you are looking for has been added in kernel 2.6, and that your kernel version is older.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362