| 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); |
nothing calls this directly
no outgoing calls
no test coverage detected