This is enough to link a working hello world executable, with a call to an imported function, a string constant passed to the imported function, and loads from a global variable.
Details
Diff Detail
Event Timeline
Added support for the IMAGE_REL_ARM64_PAGEOFFSET_12L relocation as well (and testing of it), improved parts of the test.
Added support for yet another few relocations, added a missed ARM64 part for getBaserelType (tested with wine, loading the exe at a non-default address so the base relocations need to be applied).
COFF/Chunks.cpp | ||
---|---|---|
382–383 | I think it's ok to leave it empty; the instructions in the import thunk load the actual target address using position independent addressing. I've tested this with wine, with the exe loaded at a different address than the base address, and they run fine. |
Minor tweaks to the test, made the PAGEOFFSET_12A/L relocations read the existing immediate value and add that into the value from the relocation.
COFF/Chunks.h | ||
---|---|---|
314 | Then do not override this function. The base class provides a function that does nothing. |
Then do not override this function. The base class provides a function that does nothing.