[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH 2/2] plat/linuxu: Use position independent code (PIC) in entry64.S



Use RIP-relative addressing for PIC.

Signed-off-by: Razvan Deaconescu <razvan.deaconescu@xxxxxxxxx>
---
 plat/linuxu/x86/entry64.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plat/linuxu/x86/entry64.S b/plat/linuxu/x86/entry64.S
index 578d828..f111a95 100644
--- a/plat/linuxu/x86/entry64.S
+++ b/plat/linuxu/x86/entry64.S
@@ -47,8 +47,8 @@ _liblinuxuplat_start:
        andq $~15, %rsp         # align stack to 16-byte boundary
 
        # Run _liblinuxuplat_entry(argc, argv)
-       callq _liblinuxuplat_entry
+       callq *_liblinuxuplat_entry@GOTPCREL(%rip)
 
        # Protection
 _liblinuxuplat_start_err:
-       jmp _liblinuxuplat_start_err
+       jmp *_liblinuxuplat_start_err(%rip)
-- 
2.17.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.