@eniko @lofty yeah, its not well documented from a “this is how you implement a loader” POV (I guess people expect that every loader you will ever need has been written…)
For ELF PIE its just
- Read the header
- Read the program headers, which tell you what to load (and at what relative offsets to each other)
- Find the relocation information (in REL or RELA formats) in the DYNamic table
- Apply said relocation information to the binary
- Jump to the entry point with whatever parameters you want setup