diff options
author | Magnus Lång <[email protected]> | 2016-05-02 19:35:04 +0200 |
---|---|---|
committer | Magnus Lång <[email protected]> | 2016-05-04 17:53:36 +0200 |
commit | beead8e0e29ff6e62f5044f590665d7e02229469 (patch) | |
tree | 9301ffd886824b22528d4c99bf5b64dc1e849012 /erts/emulator/hipe | |
parent | 3d9b2a2b4ad7f24b7297fe2133ac65dafd297f87 (diff) | |
download | otp-beead8e0e29ff6e62f5044f590665d7e02229469.tar.gz otp-beead8e0e29ff6e62f5044f590665d7e02229469.tar.bz2 otp-beead8e0e29ff6e62f5044f590665d7e02229469.zip |
hipe_x86: Patch relocations with implicit addends
LLVM likes to use relocation addends on x86, which HiPE was ignoring,
causing crashes.
Diffstat (limited to 'erts/emulator/hipe')
-rw-r--r-- | erts/emulator/hipe/hipe_x86.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/hipe/hipe_x86.c b/erts/emulator/hipe/hipe_x86.c index 3d25646231..5f6c8c200e 100644 --- a/erts/emulator/hipe/hipe_x86.c +++ b/erts/emulator/hipe/hipe_x86.c @@ -37,7 +37,7 @@ void hipe_patch_load_fe(Uint32 *address, Uint32 value) { /* address points to a disp32 or imm32 operand */ - *address = value; + *address += value; } int hipe_patch_insn(void *address, Uint32 value, Eterm type) @@ -54,7 +54,7 @@ int hipe_patch_insn(void *address, Uint32 value, Eterm type) default: return -1; } - *(Uint32*)address = value; + *(Uint32*)address += value; return 0; } |