summaryrefslogtreecommitdiff
path: root/rts/Linker.c
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2016-10-28 09:26:08 -0400
committerBen Gamari <ben@smart-cactus.org>2016-11-02 15:42:01 -0400
commit6fecb7e784daabe3f62ef8090e7019d7ad384080 (patch)
treeded767c52fe6892fd404a273dc8fb95fc7337e6e /rts/Linker.c
parentbdc262cc0ee511aa7bcd5c458f25ea1e4cc38583 (diff)
downloadhaskell-6fecb7e784daabe3f62ef8090e7019d7ad384080.tar.gz
linker: Move ARM interworking note to SymbolExtras.c
Diffstat (limited to 'rts/Linker.c')
-rw-r--r--rts/Linker.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/rts/Linker.c b/rts/Linker.c
index 27a8ffc098..e46fc05d1f 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -202,30 +202,6 @@ int ocTryLoad( ObjectCode* oc );
#endif
/*
- Note [The ARM/Thumb Story]
- ~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- Support for the ARM architecture is complicated by the fact that ARM has not
- one but several instruction encodings. The two relevant ones here are the original
- ARM encoding and Thumb, a more dense variant of ARM supporting only a subset
- of the instruction set.
-
- How the CPU decodes a particular instruction is determined by a mode bit. This
- mode bit is set on jump instructions, the value being determined by the low
- bit of the target address: An odd address means the target is a procedure
- encoded in the Thumb encoding whereas an even address means it's a traditional
- ARM procedure (the actual address jumped to is even regardless of the encoding bit).
-
- Interoperation between Thumb- and ARM-encoded object code (known as "interworking")
- is tricky. If the linker needs to link a call by an ARM object into Thumb code
- (or vice-versa) it will produce a jump island. This, however, is incompatible with
- GHC's tables-next-to-code. For this reason, it is critical that GHC emit
- exclusively ARM or Thumb objects for all Haskell code.
-
- We still do, however, need to worry about foreign code.
-*/
-
-/*
* Due to the small memory model (see above), on x86_64 we have to map
* all our non-PIC object files into the low 2Gb of the address space
* (why 2Gb and not 4Gb? Because all addresses must be reachable