summaryrefslogtreecommitdiff
path: root/rts/linker/CacheFlush.c
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2017-06-08 14:58:38 -0400
committerBen Gamari <ben@smart-cactus.org>2017-06-08 15:35:58 -0400
commit1c83fd814b12754be8af211a387cec906ca198b3 (patch)
tree1c93c8791e62885462da53100f0ccd4aafd9dd2c /rts/linker/CacheFlush.c
parent7bb2aa00bd93e0f3f00def586094e349e39035dd (diff)
downloadhaskell-1c83fd814b12754be8af211a387cec906ca198b3.tar.gz
[linker] fix armv7 & add aarch64
This adds Global Offset Table logic, as well as PLT like logic for armv7 and aarch64; which replaces the preexisting symbolExtras logic, by placing the PLT tables next to the separtely loaded sections. This is needed to ensure that the symbol stubs are in range. Reviewers: bgamari, austin, erikd, simonmar Reviewed By: bgamari Subscribers: Ericson2314, ryantrinkle, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3448
Diffstat (limited to 'rts/linker/CacheFlush.c')
-rw-r--r--rts/linker/CacheFlush.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/rts/linker/CacheFlush.c b/rts/linker/CacheFlush.c
index 206b2ef7ef..d14af153b2 100644
--- a/rts/linker/CacheFlush.c
+++ b/rts/linker/CacheFlush.c
@@ -3,28 +3,7 @@
#include "Rts.h"
#include "linker/CacheFlush.h"
-#if defined(arm_HOST_ARCH)
-
-void
-ocFlushInstructionCache( ObjectCode *oc )
-{
- int i;
- // Object code
- for (i=0; i < oc->n_sections; i++) {
- Section *s = &oc->sections[i];
- // This is a bit too broad but we don't have any way to determine what
- // is certainly code
- if (s->kind == SECTIONKIND_CODE_OR_RODATA)
- __clear_cache(s->start, (void*) ((uintptr_t) s->start + s->size));
- }
-
- // Jump islands
- // Note the (+1) to ensure that the last symbol extra is covered by the
- // flush.
- __clear_cache(oc->symbol_extras, &oc->symbol_extras[oc->n_symbol_extras+1]);
-}
-
-#elif defined(powerpc_HOST_ARCH)
+#if defined(powerpc_HOST_ARCH)
/*
ocFlushInstructionCache