lkml.org 
[lkml]   [2023]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v4 02/13] selftests/sgx: Produce static-pie executable for test enclave
From
On 29.08.23 12:55, Huang, Kai wrote:> Could you please add the linker 
error (as you mentioned in the v3) to the
> changelog to justify this code change?

Makes sense, done.

> And sigh.. I still don't quite understand why linker complains
>
> lea (encl_stack)(%rbx), %rax
>
> because ....
>
>> jmp encl_entry_core
>> encl_dyn_entry:
>> # Entry point for dynamically created TCS page expected to follow
>
> we have a
>
> lea -1(%rbx), %rax
>
> right here.
>
> Can't the compiler/linker just treat it as an immediate just like -1? :-(

I think the linker complains because with -static-pie -fPIE afaik all
local symbols need to have RIP-relative addressing "encl_stack(%rip)".

Best,
Jo

\
 
 \ /
  Last update: 2023-08-31 10:50    [W:0.224 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site