Apply machine instruction fixups to ELF section code
commitac751e4de8b5ae05cb6801bc4c9d1b3249bf3845
authorDouglas Katzman <dougk@google.com>
Sat, 9 Dec 2017 22:03:45 +0000 (9 17:03 -0500)
committerDouglas Katzman <dougk@google.com>
Sat, 9 Dec 2017 22:22:31 +0000 (9 17:22 -0500)
treeca2b8a4cc903eb79fb0562034bacb656d6628684
parent27f2f75b4e1df8364e6c89fd40b5d72f9b83425e
Apply machine instruction fixups to ELF section code

We sometimes use "MOV RAX, #xADDR; CALL RAX" when calling even though CALL rel
would have worked, as would "LEA RAX, [RIP+k]" to make the MOV self-relocating.
Applying fixups is a more general fix as it allows copying the dynamic space
code into an ELF section. (All calls from dynamic space use the absolute MOV by
necessity and I don't think we should rewrite them in editcore.)
And the stepper requires an absolute MOV which is why that form appears
in immobile code when it otherwise needn't.
tools-for-build/editcore.lisp