-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VDSOEmulation: Stop using dlopen for VDSO
We have been relying on the `YesIKnowImNotSupposedToUseTheGlibcAllocator` fault avoidance for a long while now. The plan was to rewrite the symbol fetching in the future to avoid this since VDSO is kind of special anyway. That time is now, I have had this VDSO symbol parsing code living in a different project for a few months now and it is working great. The basic things here are that the Linux kernel provides the VDSO mapping base pointer through the auxv value `AT_SYSINFO_EHDR`. We then need a minimal ELF parser that /only/ parses the dynamic symbol header (and accompanying string header). Then it's a simple case of walking the symbol table and recording the pointers. Confirmed this fetches all the correct symbols (As I've been using it for a while already I already knew it worked.) This lets us stop allocating memory through the glibc allocator due to dlopen.
- Loading branch information
1 parent
304b5de
commit fd1e1f3
Showing
1 changed file
with
75 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters