Re: [PATCH v4 02/13] selftests/sgx: Produce static-pie executable for test enclave

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

 



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



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux