diff options
author | Andy Lutomirski <luto@amacapital.net> | 2014-02-26 16:05:17 -0800 |
---|---|---|
committer | Andy Lutomirski <luto@amacapital.net> | 2014-02-26 16:05:17 -0800 |
commit | d05e9b6ce09805af68dd10636f19ee3466a5efbc (patch) | |
tree | e5faf5e18b0daaf7fd5529964f1d287514538199 | |
parent | 83ec12a21ef39e4d0a00ed584fb6845a28a027ce (diff) | |
download | misc-tests-d05e9b6ce09805af68dd10636f19ee3466a5efbc.tar.gz |
timing_test: Add support for upcoming 32-bit vdso timing
Build with make EXTRA_CFLAGS='-m32 -msse2'
-rw-r--r-- | timing_test.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/timing_test.cc b/timing_test.cc index 3a8de3c..9e280ea 100644 --- a/timing_test.cc +++ b/timing_test.cc @@ -40,9 +40,11 @@ int main(int argc, char **argv) void *vdso = dlopen("linux-vdso.so.1", RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD); if (!vdso) - printf("dlopen failed: %s", dlerror()); + vdso = dlopen("linux-gate.so.1", RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD); + if (!vdso) + printf("dlopen failed\n");; - vgettime_t vgettime = (vgettime_t)dlsym(vdso, "clock_gettime"); + vgettime_t vgettime = (vgettime_t)dlsym(vdso, "__vdso_clock_gettime"); if (!vgettime) printf("dlsym failed: %s", dlerror()); |