| 2740 | } |
| 2741 | |
| 2742 | const void* VDSOSupport::SetBase(const void* base) { |
| 2743 | ABSL_RAW_CHECK(base != debug_internal::ElfMemImage::kInvalidBase, "internal error"); |
| 2744 | const void* old_base = vdso_base_.load(std::memory_order_relaxed); |
| 2745 | vdso_base_.store(base, std::memory_order_relaxed); |
| 2746 | image_.Init(base); |
| 2747 | // Also reset getcpu_fn_, so GetCPU could be tested with simulated VDSO. |
| 2748 | getcpu_fn_.store(&InitAndGetCPU, std::memory_order_relaxed); |
| 2749 | return old_base; |
| 2750 | } |
| 2751 | |
| 2752 | bool VDSOSupport::LookupSymbol(const char* name, const char* version, int type, SymbolInfo* info) const { |
| 2753 | return image_.LookupSymbol(name, version, type, info); |