[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ca765c3a-8457-81f0-614d-4165579bf034@cs.kuleuven.be>
Date: Thu, 31 Aug 2023 10:49:24 +0200
From: Jo Van Bulck <jo.vanbulck@...kuleuven.be>
To: "Huang, Kai" <kai.huang@...el.com>,
"linux-sgx@...r.kernel.org" <linux-sgx@...r.kernel.org>,
"jarkko@...nel.org" <jarkko@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc: "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH v4 02/13] selftests/sgx: Produce static-pie executable for
test enclave
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
Powered by blists - more mailing lists