Re: [PATCH v21 24/28] selftests/x86: Add a selftest for SGX

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

 



On Fri, Aug 16, 2019 at 06:43:44PM +0300, Jarkko Sakkinen wrote:
> On Wed, Jul 17, 2019 at 03:37:03PM -0700, Xing, Cedric wrote:
> > > +$(OUTPUT)/encl.bin: $(OUTPUT)/encl.elf $(OUTPUT)/sgxsign
> > > +	objcopy --remove-section=.got.plt -O binary $< $@
> > 
> > .got.plt section will never be present for statically linked binaries.
> 
> You are right that it should not be there because the enclave does not
> use any library calls. And if it did, we would want to assert that and
> fail the compilation if it is the case.
> 
> Assuming that .got.plt can never exist in a static binary, however, is
> simply not true. A common example are library calls such as strncpy().
> The default handler selects the fastest implementation and substitutes
> that to the GOT.
> 
> The right way to fix this is to assert it in the linker script.

In addition, objcopy should be replaced with $(OBJCOPY).

/Jarkko



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

  Powered by Linux