MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / dyn_ptr

Method dyn_ptr

src/symbols_linux.cpp:253–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251 }
252
253 char* dyn_ptr(ElfDyn* dyn) {
254 // GNU dynamic linker relocates pointers in the dynamic section, while musl doesn't.
255 // Also, [vdso] is not relocated, and its vaddr may differ from the load address.
256 if (_relocate_dyn || (char*)dyn->d_un.d_ptr < _base) {
257 return (char*)_vaddr_diff + dyn->d_un.d_ptr;
258 } else {
259 return (char*)dyn->d_un.d_ptr;
260 }
261 }
262
263 ElfSection* findSection(uint32_t type, const char* name);
264 ElfProgramHeader* findProgramHeader(uint32_t type);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected