From bfb06a0d501804e35037cfb7c802c3879e1336e1 Mon Sep 17 00:00:00 2001 From: John van Groningen Date: Tue, 30 Jul 2013 13:22:31 +0000 Subject: if PIC is defined, adjust to modified descriptors for position independent code --- astartup.asm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/astartup.asm b/astartup.asm index 292b8c1..d6545b8 100644 --- a/astartup.asm +++ b/astartup.asm @@ -1359,7 +1359,12 @@ printD: test al,2 DtoAC_record: ifdef NEW_DESCRIPTORS + ifdef PIC + movsxd rbx,dword ptr (-6)[rax] + lea rbp,(-6)[rax+rbx] + else movsxd rbp,dword ptr (-6)[rax] + endif else movsx rbp,dword ptr (-4)[rbp] endif @@ -1451,6 +1456,9 @@ printD_: print_record: movsxd rbp,dword ptr (-6)[rax] + ifdef PIC + lea rbp,-6[rax+rbp] + endif jmp print_string_a2 else lea rbp,(-2)[rax] -- cgit v1.2.3