I wish the LLD code were less horrible to work with. Currently, we apply static relocations in three overlapping places:
The LLVM back end applies any that are PC-relative and point within the same module.
LLD applies them in linking.
JITLink applies them when loading JIT’d objects.
All of these places should be using the same TableGen description of what the relocations are and how to apply them. All of them are actually doing manual and error-prone bit twiddling.
I wish the LLD code were less horrible to work with. Currently, we apply static relocations in three overlapping places:
All of these places should be using the same TableGen description of what the relocations are and how to apply them. All of them are actually doing manual and error-prone bit twiddling.