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
- Repository
 - rL LLVM
 
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).
Generally looking good.
| COFF/Chunks.cpp | ||
|---|---|---|
| 388–389 ↗ | (On Diff #105678) | Is this a to-do, or really empty?  | 
| COFF/Chunks.cpp | ||
|---|---|---|
| 388–389 ↗ | (On Diff #105678) | 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 ↗ | (On Diff #105916) | Then do not override this function. The base class provides a function that does nothing.  |