diff options
author | Andrew Kaster <andrewdkaster@gmail.com> | 2020-01-03 23:31:51 -0500 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2020-01-04 10:39:04 +0100 |
commit | 767f4c7421139372b50d25c64468e6e6d157a1b2 (patch) | |
tree | 32ca953910c45e81c563ef88bf377864c25c8b4b /LICENSE | |
parent | 85b95f472d1c4932d0a92d70b27ad06910212807 (diff) | |
download | serenity-767f4c7421139372b50d25c64468e6e6d157a1b2.zip |
LibELF+LibC: Split ELFDynamicObject into a Loader + Object
Separate some responsibilities:
ELFDynamicLoader is responsible for loading elf binaries from disk and
performing relocations, calling init functions, and eventually calling
finalizer functions.
ELFDynamicObject is a helper class to parse the .dynamic section of an
elf binary, or the table of Elf32_Dyn entries at the _DYNAMIC symbol.
ELFDynamicObject now owns the helper classes for Relocations, Symbols,
Sections and the like that ELFDynamicLoader will use to perform
relocations and symbol lookup.
Because these new helpers are constructed from offsets into the .dynamic
section within the loaded .data section of the binary, we don't need the
ELFImage for nearly as much of the loading processes as we did before.
Therefore we can remove most of the extra DynamicXXX classes and just
keep the one that lets us find the location of _DYNAMIC in the new ELF.
And finally, since we changed the name of the class that dlopen/dlsym
care about, we need to compile/link and use the new ELFDynamicLoader
class in LibC.
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions