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

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



Thanks a lot!

Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>

On 23.03.20 16:08, Razvan Deaconescu wrote:
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)




 


Rackspace

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