From 1bcff65cd748f5c51f5a09976e6b8e57b5bf618b Mon Sep 17 00:00:00 2001
From: John van Groningen
Date: Wed, 4 Dec 2013 16:23:13 +0000
Subject: if shared libraries are used on 64 bit linux, the descriptors in
 _system may be at larger addresses than other descriptors, therefore extra
 tests are necessary in the garbage collector

---
 acopy.asm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

(limited to 'acopy.asm')

diff --git a/acopy.asm b/acopy.asm
index 9410d6a..312bf22 100644
--- a/acopy.asm
+++ b/acopy.asm
@@ -1235,9 +1235,19 @@ copy_arity_0_node2_:
 	ret
 
 copy_string_or_array_2:
+ ifdef PIC
+	je	copy_string_2
+	lea	r9,__ARRAY__+2+0
+	cmp	rcx,r9
+	jb	copy_normal_hnf_0_2
+	mov	rcx,rdx
+	jmp	copy_array_2
+copy_string_2:
+	mov	rcx,rdx
+ else
 	mov	rcx,rdx
 	jne	copy_array_2
-
+ endif
 	sub	rdx,heap_p1+0
 	cmp	rdx,semi_space_size+0
 	jae	copy_string_or_array_constant
-- 
cgit v1.2.3