]> git.ipfire.org Git - thirdparty/openssl.git/commit
x86_64: Always generate .note.gnu.property section for ELF outputs
authorH.J. Lu <hongjiu.lu@intel.com>
Fri, 31 Jan 2020 17:13:27 +0000 (09:13 -0800)
committerTomas Mraz <tmraz@fedoraproject.org>
Thu, 13 Feb 2020 16:14:00 +0000 (17:14 +0100)
commit51994e505dbb1cd0dd76869ec962e2948b77b585
tree50d0222e362bf1f16c8250e654beb419e178133c
parent0618b62ca2a9c5fb7bf8421deabaee240c709040
x86_64: Always generate .note.gnu.property section for ELF outputs

We should always generate .note.gnu.property section in x86_64 assembly
codes for ELF outputs to mark Intel CET support since all input files
must be marked with Intel CET support in order for linker to mark output
with Intel CET support.  Also .note.gnu.property section in x32 should
be aligned to 4 bytes, not 8 bytes and .p2align should be used
consistently.

Verified with

$ CC="gcc -Wl,-z,cet-report=error" ./Configure shared linux-x86_64 -fcf-protection
$ make
$ make test

and

$ CC="gcc -mx32 -Wl,-z,cet-report=error" ./Configure shared linux-x32 -fcf-protection
$ make
$ make test # <<< 90-test_sslapi.t failed because 8-byte pointer size.

Fix #10896

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10985)
crypto/perlasm/x86_64-xlate.pl