diff options
author | pyos <pyos@yandex-team.ru> | 2022-02-10 16:47:49 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:49 +0300 |
commit | ef985e41af0868676d7a2275f1d90261253ddf3b (patch) | |
tree | 3a6a11d19d8c39c7b90c132bce7e1c3536be37c1 /contrib/libs/linuxvdso/interface.cpp | |
parent | 8387f1fb70a4161b7581d3c0da52c4810df655be (diff) | |
download | ydb-ef985e41af0868676d7a2275f1d90261253ddf3b.tar.gz |
Restoring authorship annotation for <pyos@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/linuxvdso/interface.cpp')
-rw-r--r-- | contrib/libs/linuxvdso/interface.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/contrib/libs/linuxvdso/interface.cpp b/contrib/libs/linuxvdso/interface.cpp index 1c8b92ad25f..5cf5ac5d7dd 100644 --- a/contrib/libs/linuxvdso/interface.cpp +++ b/contrib/libs/linuxvdso/interface.cpp @@ -1,7 +1,7 @@ #include "interface.h" #include "original/vdso_support.h" -#ifdef HAVE_VDSO_SUPPORT +#ifdef HAVE_VDSO_SUPPORT size_t NVdso::Enumerate(TSymbol* s, size_t len) { if (!len) { @@ -27,21 +27,21 @@ size_t NVdso::Enumerate(TSymbol* s, size_t len) { return n; } - -void* NVdso::Function(const char* name, const char* version) { - base::VDSOSupport::SymbolInfo info; - // Have to cast away the `const` to make this reinterpret_cast-able to a function pointer. - return base::VDSOSupport().LookupSymbol(name, version, STT_FUNC, &info) ? (void*) info.address : nullptr; -} - -#else - -size_t NVdso::Enumerate(TSymbol*, size_t) { - return 0; -} - -void* NVdso::Function(const char*, const char*) { - return nullptr; -} - -#endif + +void* NVdso::Function(const char* name, const char* version) { + base::VDSOSupport::SymbolInfo info; + // Have to cast away the `const` to make this reinterpret_cast-able to a function pointer. + return base::VDSOSupport().LookupSymbol(name, version, STT_FUNC, &info) ? (void*) info.address : nullptr; +} + +#else + +size_t NVdso::Enumerate(TSymbol*, size_t) { + return 0; +} + +void* NVdso::Function(const char*, const char*) { + return nullptr; +} + +#endif |