OvmfPkg: strip build paths in release builds

GenFw will embed a NB10 section which contains the path to the input file,
which means the output files have build paths embedded in them.  To reduce
information leakage and ensure reproducible builds, pass --zero in release
builds to remove this information.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3256
Signed-off-by: Ross Burton <ross.burton@arm.com>
Message-Id: <20210324115819.605436-1-ross.burton@arm.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Ross Burton 2021-03-24 11:58:19 +00:00 committed by mergify[bot]
parent 0ecdcb6142
commit f037af6ecb
6 changed files with 6 additions and 0 deletions

View File

@ -78,6 +78,7 @@
GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable
INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
!endif
RELEASE_*_*_GENFW_FLAGS = --zero
#
# Disable deprecated APIs.

View File

@ -76,6 +76,7 @@
GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable
INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
!endif
RELEASE_*_*_GENFW_FLAGS = --zero
#
# Disable deprecated APIs.

View File

@ -80,6 +80,7 @@
!if $(TOOL_CHAIN_TAG) != "XCODE5" && $(TOOL_CHAIN_TAG) != "CLANGPDB"
GCC:*_*_*_CC_FLAGS = -mno-mmx -mno-sse
!endif
RELEASE_*_*_GENFW_FLAGS = --zero
#
# Disable deprecated APIs.

View File

@ -84,6 +84,7 @@
GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable
INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
!endif
RELEASE_*_*_GENFW_FLAGS = --zero
#
# Disable deprecated APIs.

View File

@ -84,6 +84,7 @@
GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable
INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
!endif
RELEASE_*_*_GENFW_FLAGS = --zero
#
# Disable deprecated APIs.

View File

@ -74,6 +74,7 @@
GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable
INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
!endif
RELEASE_*_*_GENFW_FLAGS = --zero
#
# Disable deprecated APIs.