3 ms·
Doesn't he need to deal with relocation types? Otherwise you can't do a lot of interesting stuff like relative jumps, or loads computed from a base address. x
by rwmj 5y ago
Doesn't he need to deal with relocation types? Otherwise you can't do a lot of interesting stuff like relative jumps, or loads computed from a base address. x86 has dozens of different relocation types.
- Joker_vD 5y agoAre you perhaps confusing it with SPARC? That one does have dozens of different relocation types because its instructions can have displacements of about 10 different widths. As for interesting stuff... relative jumps are normally not used for jumping to a symbol defined in a different object, and base address computations are trivially supported by sticking a special symbol at the beginning of every object file.
- jcranmer 5y agox86-64 has 39 relocation types (not counting R_X86_64_NONE, which isn't really a relocation type, also not counting 3 deprecated relocation types).