aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/hipe_unified_loader.erl
diff options
context:
space:
mode:
authorbhuztez <[email protected]>2017-12-31 14:07:49 +0800
committerSverker Eriksson <[email protected]>2018-01-29 16:39:21 +0100
commit38a99af36f044459db40b76be2cc72c638eb6d98 (patch)
treee8c656436ed0d934aab93daa5c3bc8ef33a05cd4 /lib/kernel/src/hipe_unified_loader.erl
parentb73e87f5de895860337c0d30473edd1e59667baa (diff)
downloadotp-38a99af36f044459db40b76be2cc72c638eb6d98.tar.gz
otp-38a99af36f044459db40b76be2cc72c638eb6d98.tar.bz2
otp-38a99af36f044459db40b76be2cc72c638eb6d98.zip
make HiPE work on x86_64 when PIE is enabled
Currently HiPE amd64 assumes the runtime system code is loaded into the low 2G of the address space. However, this is not the case when PIE is enabled, it is loaded into a random location. So trampolines are required to call BIFs, and also we have first to load the address of sse2_fnegate_mask to a regisiter before xorpd in fchs.
Diffstat (limited to 'lib/kernel/src/hipe_unified_loader.erl')
-rw-r--r--lib/kernel/src/hipe_unified_loader.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/kernel/src/hipe_unified_loader.erl b/lib/kernel/src/hipe_unified_loader.erl
index f8199fcf71..fd06f0f7d8 100644
--- a/lib/kernel/src/hipe_unified_loader.erl
+++ b/lib/kernel/src/hipe_unified_loader.erl
@@ -275,6 +275,7 @@ needs_trampolines(Architecture) ->
arm -> true;
powerpc -> true;
ppc64 -> true;
+ amd64 -> true;
_ -> false
end.