* [PATCH v2 0/7] Fix various issues regarding DebugImageInfoTable
@ 2021-08-09 9:51 Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain Marvin Häuser
` (9 more replies)
0 siblings, 10 replies; 42+ messages in thread
From: Marvin Häuser @ 2021-08-09 9:51 UTC (permalink / raw)
To: devel
There are various issues regarding DebugImageInfoTable:
1) Interrupting the table updates (e.g. an exception occured) may
leave the table in an inconsistent state.
2) Deleting an entry from the table may hide a different entry.
3) The type of image entries is not checked before accessing them as
NormalImage. This is practically safe now, because there is only one
type, but it adding more types would cause the accesses to
potentially invoke Undefined Behaviour.
4) The guarantees the table gives are not clear. For example, the
LoadedImage protocol instance can never be NULL (and wouldn't make
sense to be either), yet it is checked in some places, but not in
others.
This patch series addresses all of these issues.
Marvin Häuser (7):
MdeModulePkg/DxeCore: Consistent DebugImageInfoTable updates
MdeModulePkg/DxeCore: Fix DebugImageInfoTable size report
EmbeddedPkg/GdbStub: Check DebugImageInfoTable type safely
ArmPkg/DefaultExceptionHandlerLib: Check DebugImageInfoTable type
safely
MdeModulePkg/CoreDxe: Mandatory LoadedImage for DebugImageInfoTable
EmbeddedPkg/GdbStub: Mandatory LoadedImage for DebugImageInfoTable
ArmPkg/DefaultExceptionHandlerLib: Mandatory LoadedImage for
DebugImageInfoTable
ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c | 7 +-
EmbeddedPkg/GdbStub/GdbStub.c | 7 +-
MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c | 82 +++++++++++++-------
3 files changed, 60 insertions(+), 36 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 42+ messages in thread
* [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain
2021-08-09 9:51 [PATCH v2 0/7] Fix various issues regarding DebugImageInfoTable Marvin Häuser
@ 2021-08-09 9:51 ` Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 2/2] UefiCpuPkg/BaseUefiCpuLib: Use toolchain-specific rodata section name Marvin Häuser
2021-08-10 4:19 ` [edk2-devel] [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain Andrew Fish
2021-08-09 9:51 ` [PATCH v2 1/7] MdeModulePkg/DxeCore: Consistent DebugImageInfoTable updates Marvin Häuser
` (8 subsequent siblings)
9 siblings, 2 replies; 42+ messages in thread
From: Marvin Häuser @ 2021-08-09 9:51 UTC (permalink / raw)
To: devel; +Cc: Bob Feng, Liming Gao, Yuwei Chen, Vitaly Cheptsov
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3318
Different toolchains of the EDK II build system may generate ELF or
Mach-O files, which use the ".rodata" naming convention, or PE/COFF
files, which use the ".rdata" naming convention. Section permissions
are chosen based on this name per file format by NASM. To harden
image permission security, and to save space by avoiding both
".rdata" and ".rodata" sections being emitted, expose the appropriate
name as a preprocessor constant.
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
---
BaseTools/Conf/tools_def.template | 172 ++++++++++----------
1 file changed, 86 insertions(+), 86 deletions(-)
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 2e6b382ab623..84d464916c4d 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -463,9 +463,9 @@ NOOPT_VS2008_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
RELEASE_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
NOOPT_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
- DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g
-RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
-NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g
+ DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -495,9 +495,9 @@ NOOPT_VS2008_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
RELEASE_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
NOOPT_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
- DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g
-RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
-NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g
+ DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -574,9 +574,9 @@ NOOPT_VS2008x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
RELEASE_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
NOOPT_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
- DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g
-RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
-NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g
+ DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -605,9 +605,9 @@ NOOPT_VS2008x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
RELEASE_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
NOOPT_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
- DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g
-RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
-NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g
+ DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -688,9 +688,9 @@ NOOPT_VS2010_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
RELEASE_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
NOOPT_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
- DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g
-RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
-NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g
+ DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -720,9 +720,9 @@ NOOPT_VS2010_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
RELEASE_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
NOOPT_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
- DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g
-RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
-NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g
+ DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -799,9 +799,9 @@ NOOPT_VS2010x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
RELEASE_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
NOOPT_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
- DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g
-RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
-NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g
+ DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -831,9 +831,9 @@ NOOPT_VS2010x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
RELEASE_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
NOOPT_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
- DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g
-RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
-NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g
+ DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -913,9 +913,9 @@ NOOPT_VS2012_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
RELEASE_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
NOOPT_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
- DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g
-RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
-NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g
+ DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -945,9 +945,9 @@ NOOPT_VS2012_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
RELEASE_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
NOOPT_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
- DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g
-RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
-NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g
+ DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -1024,9 +1024,9 @@ NOOPT_VS2012x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
RELEASE_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
NOOPT_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
- DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g
-RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
-NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g
+ DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -1056,9 +1056,9 @@ NOOPT_VS2012x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
RELEASE_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
NOOPT_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
- DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g
-RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
-NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g
+ DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -1138,9 +1138,9 @@ NOOPT_VS2013_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
RELEASE_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
NOOPT_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
- DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g
-RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
-NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g
+ DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -1170,9 +1170,9 @@ NOOPT_VS2013_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
RELEASE_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
NOOPT_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
- DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g
-RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
-NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g
+ DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -1249,9 +1249,9 @@ NOOPT_VS2013x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
RELEASE_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
NOOPT_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
- DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g
-RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
-NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g
+ DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -1281,9 +1281,9 @@ NOOPT_VS2013x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
RELEASE_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
NOOPT_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
- DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g
-RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
-NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g
+ DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -1364,9 +1364,9 @@ NOOPT_VS2015_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
RELEASE_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
NOOPT_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
- DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g
-RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32
-NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g
+ DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -1396,9 +1396,9 @@ NOOPT_VS2015_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
RELEASE_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
NOOPT_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
- DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g
-RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64
-NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
+ DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -1476,9 +1476,9 @@ NOOPT_VS2015x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
RELEASE_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
NOOPT_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
- DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g
-RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32
-NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g
+ DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -1508,9 +1508,9 @@ NOOPT_VS2015x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
RELEASE_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
NOOPT_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
- DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g
-RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64
-NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g
+ DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -1586,9 +1586,9 @@ NOOPT_VS2017_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
RELEASE_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
NOOPT_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
- DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
-RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
-NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
+ DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -1616,9 +1616,9 @@ NOOPT_VS2017_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
RELEASE_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
NOOPT_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
- DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
-RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
-NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
+ DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -1744,9 +1744,9 @@ NOOPT_VS2019_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
RELEASE_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
NOOPT_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
- DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g
-RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32
-NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g
+ DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -1774,9 +1774,9 @@ NOOPT_VS2019_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
RELEASE_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
NOOPT_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
- DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g
-RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64
-NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g
+ DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
+RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
+NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
DEBUG_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
RELEASE_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
@@ -2030,7 +2030,7 @@ DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include A
*_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
*_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
*_GCC48_IA32_OBJCOPY_FLAGS =
-*_GCC48_IA32_NASM_FLAGS = -f elf32
+*_GCC48_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable
@@ -2058,7 +2058,7 @@ RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but
*_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
*_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
*_GCC48_X64_OBJCOPY_FLAGS =
-*_GCC48_X64_NASM_FLAGS = -f elf64
+*_GCC48_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable
@@ -2170,7 +2170,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
*_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
*_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
*_GCC49_IA32_OBJCOPY_FLAGS =
-*_GCC49_IA32_NASM_FLAGS = -f elf32
+*_GCC49_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
@@ -2198,7 +2198,7 @@ RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but
*_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
*_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
*_GCC49_X64_OBJCOPY_FLAGS =
-*_GCC49_X64_NASM_FLAGS = -f elf64
+*_GCC49_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
@@ -2316,7 +2316,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
*_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
*_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
*_GCC5_IA32_OBJCOPY_FLAGS =
-*_GCC5_IA32_NASM_FLAGS = -f elf32
+*_GCC5_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Os
DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
@@ -2348,7 +2348,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,
*_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
*_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
*_GCC5_X64_OBJCOPY_FLAGS =
-*_GCC5_X64_NASM_FLAGS = -f elf64
+*_GCC5_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO -Os
DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
@@ -2589,7 +2589,7 @@ DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNIN
*_CLANG38_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
*_CLANG38_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
*_CLANG38_IA32_OBJCOPY_FLAGS =
-*_CLANG38_IA32_NASM_FLAGS = -f elf32
+*_CLANG38_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
*_CLANG38_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
*_CLANG38_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
*_CLANG38_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
@@ -2626,7 +2626,7 @@ NOOPT_CLANG38_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -O0
*_CLANG38_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
*_CLANG38_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
*_CLANG38_X64_OBJCOPY_FLAGS =
-*_CLANG38_X64_NASM_FLAGS = -f elf64
+*_CLANG38_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
*_CLANG38_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
*_CLANG38_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
*_CLANG38_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
@@ -2777,7 +2777,7 @@ DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARN
*_CLANGPDB_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32 -fno-lto DEF(CLANGPDB_IA32_TARGET)
*_CLANGPDB_IA32_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m32 -march=i386 DEF(CLANGPDB_IA32_TARGET)
*_CLANGPDB_IA32_OBJCOPY_FLAGS =
-*_CLANGPDB_IA32_NASM_FLAGS = -f win32
+*_CLANGPDB_IA32_NASM_FLAGS = -f win32 -DRODATA_SECTION_NAME=.rdata
*_CLANGPDB_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
*_CLANGPDB_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
*_CLANGPDB_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
@@ -2811,7 +2811,7 @@ NOOPT_CLANGPDB_IA32_DLINK2_FLAGS =
*_CLANGPDB_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64 -fno-lto DEF(CLANGPDB_X64_TARGET)
*_CLANGPDB_X64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m64 DEF(CLANGPDB_X64_TARGET)
*_CLANGPDB_X64_OBJCOPY_FLAGS =
-*_CLANGPDB_X64_NASM_FLAGS = -f win64
+*_CLANGPDB_X64_NASM_FLAGS = -f win64 -DRODATA_SECTION_NAME=.rdata
*_CLANGPDB_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_X64_TARGET)
*_CLANGPDB_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
*_CLANGPDB_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
@@ -2878,7 +2878,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
*_CLANGDWARF_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
*_CLANGDWARF_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
*_CLANGDWARF_IA32_OBJCOPY_FLAGS =
-*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32
+*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
*_CLANGDWARF_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
*_CLANGDWARF_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
*_CLANGDWARF_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
@@ -2914,7 +2914,7 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -
*_CLANGDWARF_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
*_CLANGDWARF_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
*_CLANGDWARF_X64_OBJCOPY_FLAGS =
-*_CLANGDWARF_X64_NASM_FLAGS = -f elf64
+*_CLANGDWARF_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
*_CLANGDWARF_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
*_CLANGDWARF_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
*_CLANGDWARF_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
@@ -2985,7 +2985,7 @@ RELEASE_XCODE5_IA32_DLINK_FLAGS = -arch i386 -u _$(IMAGE_ENTRY_POINT) -e _$
DEBUG_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
NOOPT_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
RELEASE_XCODE5_IA32_ASM_FLAGS = -arch i386
- *_XCODE5_IA32_NASM_FLAGS = -f macho32
+ *_XCODE5_IA32_NASM_FLAGS = -f macho32 -DRODATA_SECTION_NAME=.rodata
DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
@@ -3003,7 +3003,7 @@ RELEASE_XCODE5_X64_DLINK_FLAGS = -arch x86_64 -u _$(IMAGE_ENTRY_POINT) -e _
DEBUG_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
NOOPT_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64
- *_XCODE5_X64_NASM_FLAGS = -f macho64
+ *_XCODE5_X64_NASM_FLAGS = -f macho64 -DRODATA_SECTION_NAME=.rodata
*_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h
*_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include $(MODULE_NAME)StrDefs.h
--
2.31.1
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH v2 1/7] MdeModulePkg/DxeCore: Consistent DebugImageInfoTable updates
2021-08-09 9:51 [PATCH v2 0/7] Fix various issues regarding DebugImageInfoTable Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain Marvin Häuser
@ 2021-08-09 9:51 ` Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 1/2] MdePkg/BaseLib: Fix unaligned API prototypes Marvin Häuser
` (7 subsequent siblings)
9 siblings, 0 replies; 42+ messages in thread
From: Marvin Häuser @ 2021-08-09 9:51 UTC (permalink / raw)
To: devel; +Cc: Jian J Wang, Hao A Wu, Dandan Bi, Liming Gao, Vitaly Cheptsov
In theory, modifications to the DebugImageInfoTable may cause
exceptions. If the exception handler parses the table, this can lead
to subsequent exceptions if the table state is inconsistent.
Ensure the DebugImageInfoTable remains consistent during
modifications. This includes:
1) Free the old table only only after the new table has been
published. Mitigates use-after-free of the old table.
2) Do not insert an image entry till it is fully initialised. Entries
may be inserted in the live range if an entry was deleted previously.
Mitigaes the usage of inconsistent entries.
3) Free the old image entry only after the table has been updated
with the NULL value. Mitigates use-after-free of the old entry.
4) Set the MODIFIED state before performing any modifications.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
---
MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c | 60 +++++++++++---------
1 file changed, 34 insertions(+), 26 deletions(-)
diff --git a/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c b/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c
index a75d4158280b..7bd970115111 100644
--- a/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c
+++ b/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c
@@ -165,10 +165,11 @@ CoreNewDebugImageInfoEntry (
IN EFI_HANDLE ImageHandle
)
{
- EFI_DEBUG_IMAGE_INFO *Table;
- EFI_DEBUG_IMAGE_INFO *NewTable;
- UINTN Index;
- UINTN TableSize;
+ EFI_DEBUG_IMAGE_INFO *Table;
+ EFI_DEBUG_IMAGE_INFO *NewTable;
+ UINTN Index;
+ UINTN TableSize;
+ EFI_DEBUG_IMAGE_INFO_NORMAL *NormalImage;
//
// Set the flag indicating that we're in the process of updating the table.
@@ -203,14 +204,6 @@ CoreNewDebugImageInfoEntry (
// Copy the old table into the new one
//
CopyMem (NewTable, Table, TableSize);
- //
- // Free the old table
- //
- CoreFreePool (Table);
- //
- // Update the table header
- //
- Table = NewTable;
mDebugInfoTableHeader.EfiDebugImageInfoTable = NewTable;
//
// Enlarge the max table entries and set the first empty entry index to
@@ -218,24 +211,34 @@ CoreNewDebugImageInfoEntry (
//
Index = mMaxTableEntries;
mMaxTableEntries += EFI_PAGE_SIZE / EFI_DEBUG_TABLE_ENTRY_SIZE;
+ //
+ // Free the old table
+ //
+ CoreFreePool (Table);
+ //
+ // Update the table header
+ //
+ Table = NewTable;
}
//
// Allocate data for new entry
//
- Table[Index].NormalImage = AllocateZeroPool (sizeof (EFI_DEBUG_IMAGE_INFO_NORMAL));
- if (Table[Index].NormalImage != NULL) {
+ NormalImage = AllocateZeroPool (sizeof (EFI_DEBUG_IMAGE_INFO_NORMAL));
+ if (NormalImage != NULL) {
//
// Update the entry
//
- Table[Index].NormalImage->ImageInfoType = (UINT32) ImageInfoType;
- Table[Index].NormalImage->LoadedImageProtocolInstance = LoadedImage;
- Table[Index].NormalImage->ImageHandle = ImageHandle;
+ NormalImage->ImageInfoType = (UINT32) ImageInfoType;
+ NormalImage->LoadedImageProtocolInstance = LoadedImage;
+ NormalImage->ImageHandle = ImageHandle;
//
- // Increase the number of EFI_DEBUG_IMAGE_INFO elements and set the mDebugInfoTable in modified status.
+ // Set the mDebugInfoTable in modified status, insert the entry, and
+ // increase the number of EFI_DEBUG_IMAGE_INFO elements.
//
- mDebugInfoTableHeader.TableSize++;
mDebugInfoTableHeader.UpdateStatus |= EFI_DEBUG_IMAGE_INFO_TABLE_MODIFIED;
+ Table[Index].NormalImage = NormalImage;
+ mDebugInfoTableHeader.TableSize++;
}
mDebugInfoTableHeader.UpdateStatus &= ~EFI_DEBUG_IMAGE_INFO_UPDATE_IN_PROGRESS;
}
@@ -253,8 +256,9 @@ CoreRemoveDebugImageInfoEntry (
EFI_HANDLE ImageHandle
)
{
- EFI_DEBUG_IMAGE_INFO *Table;
- UINTN Index;
+ EFI_DEBUG_IMAGE_INFO *Table;
+ UINTN Index;
+ EFI_DEBUG_IMAGE_INFO_NORMAL *NormalImage;
mDebugInfoTableHeader.UpdateStatus |= EFI_DEBUG_IMAGE_INFO_UPDATE_IN_PROGRESS;
@@ -263,16 +267,20 @@ CoreRemoveDebugImageInfoEntry (
for (Index = 0; Index < mMaxTableEntries; Index++) {
if (Table[Index].NormalImage != NULL && Table[Index].NormalImage->ImageHandle == ImageHandle) {
//
- // Found a match. Free up the record, then NULL the pointer to indicate the slot
- // is free.
+ // Found a match. Set the mDebugInfoTable in modified status and NULL the
+ // pointer to indicate the slot is free and.
//
- CoreFreePool (Table[Index].NormalImage);
+ NormalImage = Table[Index].NormalImage;
+ mDebugInfoTableHeader.UpdateStatus |= EFI_DEBUG_IMAGE_INFO_TABLE_MODIFIED;
Table[Index].NormalImage = NULL;
//
- // Decrease the number of EFI_DEBUG_IMAGE_INFO elements and set the mDebugInfoTable in modified status.
+ // Decrease the number of EFI_DEBUG_IMAGE_INFO elements.
//
mDebugInfoTableHeader.TableSize--;
- mDebugInfoTableHeader.UpdateStatus |= EFI_DEBUG_IMAGE_INFO_TABLE_MODIFIED;
+ //
+ // Free up the record.
+ //
+ CoreFreePool (NormalImage);
break;
}
}
--
2.31.1
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH v2 1/2] MdePkg/BaseLib: Fix unaligned API prototypes
2021-08-09 9:51 [PATCH v2 0/7] Fix various issues regarding DebugImageInfoTable Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 1/7] MdeModulePkg/DxeCore: Consistent DebugImageInfoTable updates Marvin Häuser
@ 2021-08-09 9:51 ` Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 2/2] BaseTools/CommonLib: " Marvin Häuser
2021-08-09 16:15 ` [PATCH v2 1/2] MdePkg/BaseLib: " Michael D Kinney
2021-08-09 9:51 ` [PATCH v2 1/2] SecurityPkg/DxeImageVerificationLib: Fix certificate lookup algorithm Marvin Häuser
` (6 subsequent siblings)
9 siblings, 2 replies; 42+ messages in thread
From: Marvin Häuser @ 2021-08-09 9:51 UTC (permalink / raw)
To: devel; +Cc: Michael D Kinney, Liming Gao, Zhiguang Liu, Vitaly Cheptsov
C prohibits not only dereferencing but also casting to unaligned
pointers. Thus, the current set of unaligned APIs cannot be called
safely. Update their prototypes to take VOID * pointers, which must
be able to represent any valid pointer.
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
---
MdePkg/Library/BaseLib/Arm/Unaligned.c | 14 ++++-----
MdePkg/Library/BaseLib/Unaligned.c | 32 ++++++++++----------
MdePkg/Include/Library/BaseLib.h | 16 +++++-----
3 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/MdePkg/Library/BaseLib/Arm/Unaligned.c b/MdePkg/Library/BaseLib/Arm/Unaligned.c
index e9934e7003cb..57f19fc44e0b 100644
--- a/MdePkg/Library/BaseLib/Arm/Unaligned.c
+++ b/MdePkg/Library/BaseLib/Arm/Unaligned.c
@@ -59,7 +59,7 @@ ReadUnaligned16 (
UINT16
EFIAPI
WriteUnaligned16 (
- OUT UINT16 *Buffer,
+ OUT VOID *Buffer,
IN UINT16 Value
)
{
@@ -87,7 +87,7 @@ WriteUnaligned16 (
UINT32
EFIAPI
ReadUnaligned24 (
- IN CONST UINT32 *Buffer
+ IN CONST VOID *Buffer
)
{
ASSERT (Buffer != NULL);
@@ -116,7 +116,7 @@ ReadUnaligned24 (
UINT32
EFIAPI
WriteUnaligned24 (
- OUT UINT32 *Buffer,
+ OUT VOID *Buffer,
IN UINT32 Value
)
{
@@ -143,7 +143,7 @@ WriteUnaligned24 (
UINT32
EFIAPI
ReadUnaligned32 (
- IN CONST UINT32 *Buffer
+ IN CONST VOID *Buffer
)
{
UINT16 LowerBytes;
@@ -175,7 +175,7 @@ ReadUnaligned32 (
UINT32
EFIAPI
WriteUnaligned32 (
- OUT UINT32 *Buffer,
+ OUT VOID *Buffer,
IN UINT32 Value
)
{
@@ -202,7 +202,7 @@ WriteUnaligned32 (
UINT64
EFIAPI
ReadUnaligned64 (
- IN CONST UINT64 *Buffer
+ IN CONST VOID *Buffer
)
{
UINT32 LowerBytes;
@@ -234,7 +234,7 @@ ReadUnaligned64 (
UINT64
EFIAPI
WriteUnaligned64 (
- OUT UINT64 *Buffer,
+ OUT VOID *Buffer,
IN UINT64 Value
)
{
diff --git a/MdePkg/Library/BaseLib/Unaligned.c b/MdePkg/Library/BaseLib/Unaligned.c
index a419cb85e53c..3041adcde606 100644
--- a/MdePkg/Library/BaseLib/Unaligned.c
+++ b/MdePkg/Library/BaseLib/Unaligned.c
@@ -26,12 +26,12 @@
UINT16
EFIAPI
ReadUnaligned16 (
- IN CONST UINT16 *Buffer
+ IN CONST VOID *Buffer
)
{
ASSERT (Buffer != NULL);
- return *Buffer;
+ return *(CONST UINT16 *) Buffer;
}
/**
@@ -52,13 +52,13 @@ ReadUnaligned16 (
UINT16
EFIAPI
WriteUnaligned16 (
- OUT UINT16 *Buffer,
+ OUT VOID *Buffer,
IN UINT16 Value
)
{
ASSERT (Buffer != NULL);
- return *Buffer = Value;
+ return *(UINT16 *) Buffer = Value;
}
/**
@@ -77,12 +77,12 @@ WriteUnaligned16 (
UINT32
EFIAPI
ReadUnaligned24 (
- IN CONST UINT32 *Buffer
+ IN CONST VOID *Buffer
)
{
ASSERT (Buffer != NULL);
- return *Buffer & 0xffffff;
+ return *(CONST UINT32 *) Buffer & 0xffffff;
}
/**
@@ -103,13 +103,13 @@ ReadUnaligned24 (
UINT32
EFIAPI
WriteUnaligned24 (
- OUT UINT32 *Buffer,
+ OUT VOID *Buffer,
IN UINT32 Value
)
{
ASSERT (Buffer != NULL);
- *Buffer = BitFieldWrite32 (*Buffer, 0, 23, Value);
+ *(UINT32 *) Buffer = BitFieldWrite32 (*(CONST UINT32 *) Buffer, 0, 23, Value);
return Value;
}
@@ -129,12 +129,12 @@ WriteUnaligned24 (
UINT32
EFIAPI
ReadUnaligned32 (
- IN CONST UINT32 *Buffer
+ IN CONST VOID *Buffer
)
{
ASSERT (Buffer != NULL);
- return *Buffer;
+ return *(CONST UINT32 *) Buffer;
}
/**
@@ -155,13 +155,13 @@ ReadUnaligned32 (
UINT32
EFIAPI
WriteUnaligned32 (
- OUT UINT32 *Buffer,
+ OUT VOID *Buffer,
IN UINT32 Value
)
{
ASSERT (Buffer != NULL);
- return *Buffer = Value;
+ return *(UINT32 *) Buffer = Value;
}
/**
@@ -180,12 +180,12 @@ WriteUnaligned32 (
UINT64
EFIAPI
ReadUnaligned64 (
- IN CONST UINT64 *Buffer
+ IN CONST VOID *Buffer
)
{
ASSERT (Buffer != NULL);
- return *Buffer;
+ return *(CONST UINT64 *) Buffer;
}
/**
@@ -206,11 +206,11 @@ ReadUnaligned64 (
UINT64
EFIAPI
WriteUnaligned64 (
- OUT UINT64 *Buffer,
+ OUT VOID *Buffer,
IN UINT64 Value
)
{
ASSERT (Buffer != NULL);
- return *Buffer = Value;
+ return *(UINT64 *) Buffer = Value;
}
diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h
index 2452c1d92e51..4d30f0539c6b 100644
--- a/MdePkg/Include/Library/BaseLib.h
+++ b/MdePkg/Include/Library/BaseLib.h
@@ -3420,7 +3420,7 @@ DivS64x64Remainder (
UINT16
EFIAPI
ReadUnaligned16 (
- IN CONST UINT16 *Buffer
+ IN CONST VOID *Buffer
);
@@ -3442,7 +3442,7 @@ ReadUnaligned16 (
UINT16
EFIAPI
WriteUnaligned16 (
- OUT UINT16 *Buffer,
+ OUT VOID *Buffer,
IN UINT16 Value
);
@@ -3463,7 +3463,7 @@ WriteUnaligned16 (
UINT32
EFIAPI
ReadUnaligned24 (
- IN CONST UINT32 *Buffer
+ IN CONST VOID *Buffer
);
@@ -3485,7 +3485,7 @@ ReadUnaligned24 (
UINT32
EFIAPI
WriteUnaligned24 (
- OUT UINT32 *Buffer,
+ OUT VOID *Buffer,
IN UINT32 Value
);
@@ -3506,7 +3506,7 @@ WriteUnaligned24 (
UINT32
EFIAPI
ReadUnaligned32 (
- IN CONST UINT32 *Buffer
+ IN CONST VOID *Buffer
);
@@ -3528,7 +3528,7 @@ ReadUnaligned32 (
UINT32
EFIAPI
WriteUnaligned32 (
- OUT UINT32 *Buffer,
+ OUT VOID *Buffer,
IN UINT32 Value
);
@@ -3549,7 +3549,7 @@ WriteUnaligned32 (
UINT64
EFIAPI
ReadUnaligned64 (
- IN CONST UINT64 *Buffer
+ IN CONST VOID *Buffer
);
@@ -3571,7 +3571,7 @@ ReadUnaligned64 (
UINT64
EFIAPI
WriteUnaligned64 (
- OUT UINT64 *Buffer,
+ OUT VOID *Buffer,
IN UINT64 Value
);
--
2.31.1
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH v2 1/2] SecurityPkg/DxeImageVerificationLib: Fix certificate lookup algorithm
2021-08-09 9:51 [PATCH v2 0/7] Fix various issues regarding DebugImageInfoTable Marvin Häuser
` (2 preceding siblings ...)
2021-08-09 9:51 ` [PATCH v2 1/2] MdePkg/BaseLib: Fix unaligned API prototypes Marvin Häuser
@ 2021-08-09 9:51 ` Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 2/2] SecurityPkg/SecureBootConfigDxe: " Marvin Häuser
2021-08-12 1:11 ` [edk2-devel] [PATCH v2 1/2] SecurityPkg/DxeImageVerificationLib: " Min Xu
2021-08-09 9:51 ` [PATCH v2 2/7] MdeModulePkg/DxeCore: Fix DebugImageInfoTable size report Marvin Häuser
` (5 subsequent siblings)
9 siblings, 2 replies; 42+ messages in thread
From: Marvin Häuser @ 2021-08-09 9:51 UTC (permalink / raw)
To: devel; +Cc: Jiewen Yao, Jian J Wang, Min Xu, Vitaly Cheptsov
The current certificate lookup code does not check the bounds of the
authentication data before accessing it. Abort if the header cannot
fit. Also, the lookup code aborts once the authetication data is
smaller than an algorithm's OID size. As OIDs are variably-sized,
this may cause unexpected authentication failure due to the early
error-exit.
Additionally move the two-byte encoding check out of the loop as the
data is invariant.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
---
SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c | 43 +++++++++++---------
1 file changed, 23 insertions(+), 20 deletions(-)
diff --git a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
index c48861cd6496..6615099baafb 100644
--- a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
+++ b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
@@ -624,30 +624,33 @@ HashPeImageByType (
{
UINT8 Index;
+ if (AuthDataSize < 32) {
+ return EFI_UNSUPPORTED;
+ }
+ //
+ // Check the Hash algorithm in PE/COFF Authenticode.
+ // According to PKCS#7 Definition:
+ // SignedData ::= SEQUENCE {
+ // version Version,
+ // digestAlgorithms DigestAlgorithmIdentifiers,
+ // contentInfo ContentInfo,
+ // .... }
+ // The DigestAlgorithmIdentifiers can be used to determine the hash algorithm in PE/COFF hashing
+ // This field has the fixed offset (+32) in final Authenticode ASN.1 data.
+ // Fixed offset (+32) is calculated based on two bytes of length encoding.
+ //
+ if ((*(AuthData + 1) & TWO_BYTE_ENCODE) != TWO_BYTE_ENCODE) {
+ //
+ // Only support two bytes of Long Form of Length Encoding.
+ //
+ return EFI_UNSUPPORTED;
+ }
+
for (Index = 0; Index < HASHALG_MAX; Index++) {
- //
- // Check the Hash algorithm in PE/COFF Authenticode.
- // According to PKCS#7 Definition:
- // SignedData ::= SEQUENCE {
- // version Version,
- // digestAlgorithms DigestAlgorithmIdentifiers,
- // contentInfo ContentInfo,
- // .... }
- // The DigestAlgorithmIdentifiers can be used to determine the hash algorithm in PE/COFF hashing
- // This field has the fixed offset (+32) in final Authenticode ASN.1 data.
- // Fixed offset (+32) is calculated based on two bytes of length encoding.
- //
- if ((*(AuthData + 1) & TWO_BYTE_ENCODE) != TWO_BYTE_ENCODE) {
- //
- // Only support two bytes of Long Form of Length Encoding.
- //
+ if (AuthDataSize - 32 < mHash[Index].OidLength) {
continue;
}
- if (AuthDataSize < 32 + mHash[Index].OidLength) {
- return EFI_UNSUPPORTED;
- }
-
if (CompareMem (AuthData + 32, mHash[Index].OidValue, mHash[Index].OidLength) == 0) {
break;
}
--
2.31.1
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH v2 2/2] BaseTools/CommonLib: Fix unaligned API prototypes
2021-08-09 9:51 ` [PATCH v2 1/2] MdePkg/BaseLib: Fix unaligned API prototypes Marvin Häuser
@ 2021-08-09 9:51 ` Marvin Häuser
2021-08-09 16:15 ` [PATCH v2 1/2] MdePkg/BaseLib: " Michael D Kinney
1 sibling, 0 replies; 42+ messages in thread
From: Marvin Häuser @ 2021-08-09 9:51 UTC (permalink / raw)
To: devel; +Cc: Bob Feng, Liming Gao, Yuwei Chen, Vitaly Cheptsov
C prohibits not only dereferencing but also casting to unaligned
pointers. Thus, the current set of unaligned APIs cannot be called
safely. Update their prototypes to take VOID * pointers, which must
be able to represent any valid pointer.
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
---
BaseTools/Source/C/Common/CommonLib.c | 16 ++++++++--------
BaseTools/Source/C/Common/CommonLib.h | 8 ++++----
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/BaseTools/Source/C/Common/CommonLib.c b/BaseTools/Source/C/Common/CommonLib.c
index 7fb4ab764fcd..f1223fb2ae0a 100644
--- a/BaseTools/Source/C/Common/CommonLib.c
+++ b/BaseTools/Source/C/Common/CommonLib.c
@@ -1154,23 +1154,23 @@ StrSize (
UINT64
ReadUnaligned64 (
- CONST UINT64 *Buffer
+ CONST VOID *Buffer
)
{
ASSERT (Buffer != NULL);
- return *Buffer;
+ return *(CONST UINT64 *) Buffer;
}
UINT64
WriteUnaligned64 (
- UINT64 *Buffer,
+ VOID *Buffer,
UINT64 Value
)
{
ASSERT (Buffer != NULL);
- return *Buffer = Value;
+ return *(UINT64 *) Buffer = Value;
}
@@ -2018,23 +2018,23 @@ AllocatePool (
UINT16
WriteUnaligned16 (
- UINT16 *Buffer,
+ VOID *Buffer,
UINT16 Value
)
{
ASSERT (Buffer != NULL);
- return *Buffer = Value;
+ return *(UINT16 *) Buffer = Value;
}
UINT16
ReadUnaligned16 (
- CONST UINT16 *Buffer
+ CONST VOID *Buffer
)
{
ASSERT (Buffer != NULL);
- return *Buffer;
+ return *(CONST UINT16 *) Buffer;
}
/**
Return whether the integer string is a hex string.
diff --git a/BaseTools/Source/C/Common/CommonLib.h b/BaseTools/Source/C/Common/CommonLib.h
index 0f05d88db206..67c42a91765d 100644
--- a/BaseTools/Source/C/Common/CommonLib.h
+++ b/BaseTools/Source/C/Common/CommonLib.h
@@ -238,13 +238,13 @@ CopyGuid (
UINT64
WriteUnaligned64 (
- UINT64 *Buffer,
+ VOID *Buffer,
UINT64 Value
);
UINT64
ReadUnaligned64 (
- CONST UINT64 *Buffer
+ CONST VOID *Buffer
);
UINTN
@@ -363,13 +363,13 @@ AllocatePool (
UINT16
WriteUnaligned16 (
- UINT16 *Buffer,
+ VOID *Buffer,
UINT16 Value
);
UINT16
ReadUnaligned16 (
- CONST UINT16 *Buffer
+ CONST VOID *Buffer
);
VOID *
--
2.31.1
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH v2 2/7] MdeModulePkg/DxeCore: Fix DebugImageInfoTable size report
2021-08-09 9:51 [PATCH v2 0/7] Fix various issues regarding DebugImageInfoTable Marvin Häuser
` (3 preceding siblings ...)
2021-08-09 9:51 ` [PATCH v2 1/2] SecurityPkg/DxeImageVerificationLib: Fix certificate lookup algorithm Marvin Häuser
@ 2021-08-09 9:51 ` Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 3/7] EmbeddedPkg/GdbStub: Check DebugImageInfoTable type safely Marvin Häuser
` (4 subsequent siblings)
9 siblings, 0 replies; 42+ messages in thread
From: Marvin Häuser @ 2021-08-09 9:51 UTC (permalink / raw)
To: devel; +Cc: Jian J Wang, Hao A Wu, Dandan Bi, Liming Gao, Vitaly Cheptsov
Separate tracking the used entries from the table's self-reported
size. Removing an entry from the table does not necessarily reduce
the size of the table as defragmentation is not performed.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
---
MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c b/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c
index 7bd970115111..cc22e23eb0b3 100644
--- a/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c
+++ b/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c
@@ -18,6 +18,8 @@ EFI_DEBUG_IMAGE_INFO_TABLE_HEADER mDebugInfoTableHeader = {
UINTN mMaxTableEntries = 0;
+UINTN mUsedTableEntries = 0;
+
EFI_SYSTEM_TABLE_POINTER *mDebugTable = NULL;
#define EFI_DEBUG_TABLE_ENTRY_SIZE (sizeof (VOID *))
@@ -178,7 +180,7 @@ CoreNewDebugImageInfoEntry (
Table = mDebugInfoTableHeader.EfiDebugImageInfoTable;
- if (mDebugInfoTableHeader.TableSize < mMaxTableEntries) {
+ if (mUsedTableEntries < mMaxTableEntries) {
//
// We still have empty entires in the Table, find the first empty entry.
//
@@ -237,8 +239,17 @@ CoreNewDebugImageInfoEntry (
// increase the number of EFI_DEBUG_IMAGE_INFO elements.
//
mDebugInfoTableHeader.UpdateStatus |= EFI_DEBUG_IMAGE_INFO_TABLE_MODIFIED;
+ mUsedTableEntries++;
Table[Index].NormalImage = NormalImage;
- mDebugInfoTableHeader.TableSize++;
+ //
+ // Only increase the amount of elements in the table if the new entry did
+ // not take the place of a previously removed entry.
+ //
+ if (Index == mDebugInfoTableHeader.TableSize) {
+ mDebugInfoTableHeader.TableSize++;
+ }
+
+ ASSERT (Index < mDebugInfoTableHeader.TableSize);
}
mDebugInfoTableHeader.UpdateStatus &= ~EFI_DEBUG_IMAGE_INFO_UPDATE_IN_PROGRESS;
}
@@ -274,9 +285,10 @@ CoreRemoveDebugImageInfoEntry (
mDebugInfoTableHeader.UpdateStatus |= EFI_DEBUG_IMAGE_INFO_TABLE_MODIFIED;
Table[Index].NormalImage = NULL;
//
- // Decrease the number of EFI_DEBUG_IMAGE_INFO elements.
+ // Do not reduce the amount of elements reported to be in the table as
+ // this would only work for the last element without defragmentation.
//
- mDebugInfoTableHeader.TableSize--;
+ mUsedTableEntries--;
//
// Free up the record.
//
--
2.31.1
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH v2 2/2] SecurityPkg/SecureBootConfigDxe: Fix certificate lookup algorithm
2021-08-09 9:51 ` [PATCH v2 1/2] SecurityPkg/DxeImageVerificationLib: Fix certificate lookup algorithm Marvin Häuser
@ 2021-08-09 9:51 ` Marvin Häuser
2021-08-12 1:12 ` [edk2-devel] " Min Xu
2021-08-12 1:11 ` [edk2-devel] [PATCH v2 1/2] SecurityPkg/DxeImageVerificationLib: " Min Xu
1 sibling, 1 reply; 42+ messages in thread
From: Marvin Häuser @ 2021-08-09 9:51 UTC (permalink / raw)
To: devel; +Cc: Jiewen Yao, Jian J Wang, Min Xu, Vitaly Cheptsov
The current certificate lookup code does not check the bounds of the
authentication data before accessing it. Abort if the header cannot
fit, and proceed to the next hashing algortihm if the OID of the
current one exceeds the authentication data bounds.
Additionally move the two-byte encoding check out of the loop as the
data is invariant.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
---
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c | 45 ++++++++++++--------
1 file changed, 28 insertions(+), 17 deletions(-)
diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c
index 65a8188d6d03..fd7629f61862 100644
--- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c
+++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c
@@ -1969,30 +1969,41 @@ HashPeImageByType (
{
UINT8 Index;
WIN_CERTIFICATE_EFI_PKCS *PkcsCertData;
+ UINT32 AuthDataSize;
PkcsCertData = (WIN_CERTIFICATE_EFI_PKCS *) (mImageBase + mSecDataDir->Offset);
+ if (PkcsCertData->Hdr.dwLength <= sizeof (PkcsCertData->Hdr)) {
+ return EFI_UNSUPPORTED;
+ }
+
+ AuthDataSize = PkcsCertData->Hdr.dwLength - sizeof (PkcsCertData->Hdr);
+ if (AuthDataSize < 32) {
+ return EFI_UNSUPPORTED;
+ }
+ //
+ // Check the Hash algorithm in PE/COFF Authenticode.
+ // According to PKCS#7 Definition:
+ // SignedData ::= SEQUENCE {
+ // version Version,
+ // digestAlgorithms DigestAlgorithmIdentifiers,
+ // contentInfo ContentInfo,
+ // .... }
+ // The DigestAlgorithmIdentifiers can be used to determine the hash algorithm in PE/COFF hashing
+ // This field has the fixed offset (+32) in final Authenticode ASN.1 data.
+ // Fixed offset (+32) is calculated based on two bytes of length encoding.
+ //
+ if ((*(PkcsCertData->CertData + 1) & TWO_BYTE_ENCODE) != TWO_BYTE_ENCODE) {
+ //
+ // Only support two bytes of Long Form of Length Encoding.
+ //
+ return EFI_UNSUPPORTED;
+ }
for (Index = 0; Index < HASHALG_MAX; Index++) {
- //
- // Check the Hash algorithm in PE/COFF Authenticode.
- // According to PKCS#7 Definition:
- // SignedData ::= SEQUENCE {
- // version Version,
- // digestAlgorithms DigestAlgorithmIdentifiers,
- // contentInfo ContentInfo,
- // .... }
- // The DigestAlgorithmIdentifiers can be used to determine the hash algorithm in PE/COFF hashing
- // This field has the fixed offset (+32) in final Authenticode ASN.1 data.
- // Fixed offset (+32) is calculated based on two bytes of length encoding.
- //
- if ((*(PkcsCertData->CertData + 1) & TWO_BYTE_ENCODE) != TWO_BYTE_ENCODE) {
- //
- // Only support two bytes of Long Form of Length Encoding.
- //
+ if (AuthDataSize - 32 < mHash[Index].OidLength) {
continue;
}
- //
if (CompareMem (PkcsCertData->CertData + 32, mHash[Index].OidValue, mHash[Index].OidLength) == 0) {
break;
}
--
2.31.1
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH v2 2/2] UefiCpuPkg/BaseUefiCpuLib: Use toolchain-specific rodata section name
2021-08-09 9:51 ` [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain Marvin Häuser
@ 2021-08-09 9:51 ` Marvin Häuser
2021-08-10 2:43 ` Ni, Ray
2021-08-10 4:19 ` [edk2-devel] [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain Andrew Fish
1 sibling, 1 reply; 42+ messages in thread
From: Marvin Häuser @ 2021-08-09 9:51 UTC (permalink / raw)
To: devel; +Cc: Eric Dong, Ray Ni, Rahul Kumar, Vitaly Cheptsov
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3318
Correctly define the read-only data sections with the
toolchain-specific section name. This hardens image permission
security and may save image space.
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
---
UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm | 2 +-
UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm b/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
index 5e27cc325012..cfb8bf4a5ae0 100644
--- a/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
+++ b/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
@@ -6,7 +6,7 @@
;*
;------------------------------------------------------------------------------
- SECTION .rodata
+ SECTION RODATA_SECTION_NAME
;
; Float control word initial value:
diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm b/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
index 8485b4713548..3c976a21e391 100644
--- a/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
+++ b/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
@@ -6,7 +6,7 @@
;*
;------------------------------------------------------------------------------
- SECTION .rodata
+ SECTION RODATA_SECTION_NAME
;
; Float control word initial value:
; all exceptions masked, double-extended-precision, round-to-nearest
--
2.31.1
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH v2 3/7] EmbeddedPkg/GdbStub: Check DebugImageInfoTable type safely
2021-08-09 9:51 [PATCH v2 0/7] Fix various issues regarding DebugImageInfoTable Marvin Häuser
` (4 preceding siblings ...)
2021-08-09 9:51 ` [PATCH v2 2/7] MdeModulePkg/DxeCore: Fix DebugImageInfoTable size report Marvin Häuser
@ 2021-08-09 9:51 ` Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 4/7] ArmPkg/DefaultExceptionHandlerLib: " Marvin Häuser
` (3 subsequent siblings)
9 siblings, 0 replies; 42+ messages in thread
From: Marvin Häuser @ 2021-08-09 9:51 UTC (permalink / raw)
To: devel
Cc: Leif Lindholm, Ard Biesheuvel, Abner Chang, Daniel Schaefer,
Vitaly Cheptsov
C does not allow casting to or dereferencing incompatible pointer
types. Use the ImageInfoType member of the union first to determine
the data type before dereferencing NormalImage.
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Abner Chang <abner.chang@hpe.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
---
EmbeddedPkg/GdbStub/GdbStub.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/EmbeddedPkg/GdbStub/GdbStub.c b/EmbeddedPkg/GdbStub/GdbStub.c
index 7f2a5ed20011..09167fdafb4d 100644
--- a/EmbeddedPkg/GdbStub/GdbStub.c
+++ b/EmbeddedPkg/GdbStub/GdbStub.c
@@ -1043,8 +1043,8 @@ QxferLibrary (
if (gDebugTable != NULL) {
for (; gEfiDebugImageTableEntry < gDebugImageTableHeader->TableSize; gEfiDebugImageTableEntry++, gDebugTable++) {
- if (gDebugTable->NormalImage != NULL) {
- if ((gDebugTable->NormalImage->ImageInfoType == EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL) &&
+ if (gDebugTable->ImageInfoType != NULL) {
+ if ((*gDebugTable->ImageInfoType == EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL) &&
(gDebugTable->NormalImage->LoadedImageProtocolInstance != NULL)) {
Pdb = PeCoffLoaderGetDebuggerInfo (
gDebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase,
--
2.31.1
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH v2 4/7] ArmPkg/DefaultExceptionHandlerLib: Check DebugImageInfoTable type safely
2021-08-09 9:51 [PATCH v2 0/7] Fix various issues regarding DebugImageInfoTable Marvin Häuser
` (5 preceding siblings ...)
2021-08-09 9:51 ` [PATCH v2 3/7] EmbeddedPkg/GdbStub: Check DebugImageInfoTable type safely Marvin Häuser
@ 2021-08-09 9:51 ` Marvin Häuser
2021-08-09 11:55 ` Ard Biesheuvel
2021-08-09 9:51 ` [PATCH v2 5/7] MdeModulePkg/CoreDxe: Mandatory LoadedImage for DebugImageInfoTable Marvin Häuser
` (2 subsequent siblings)
9 siblings, 1 reply; 42+ messages in thread
From: Marvin Häuser @ 2021-08-09 9:51 UTC (permalink / raw)
To: devel; +Cc: Leif Lindholm, Ard Biesheuvel, Vitaly Cheptsov
C does not allow casting to or dereferencing incompatible pointer
types. Use the ImageInfoType member of the union first to determine
the data type before dereferencing NormalImage.
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
---
ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c
index e9fea4038252..9befb6d4db9b 100644
--- a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c
+++ b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c
@@ -51,8 +51,8 @@ GetImageName (
Address = (CHAR8 *)(UINTN)FaultAddress;
for (Entry = 0; Entry < DebugTableHeader->TableSize; Entry++, DebugTable++) {
- if (DebugTable->NormalImage != NULL) {
- if ((DebugTable->NormalImage->ImageInfoType == EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL) &&
+ if (DebugTable->ImageInfoType != NULL) {
+ if ((*DebugTable->ImageInfoType == EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL) &&
(DebugTable->NormalImage->LoadedImageProtocolInstance != NULL)) {
if ((Address >= (CHAR8 *)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase) &&
(Address <= ((CHAR8 *)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase + DebugTable->NormalImage->LoadedImageProtocolInstance->ImageSize))) {
--
2.31.1
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH v2 5/7] MdeModulePkg/CoreDxe: Mandatory LoadedImage for DebugImageInfoTable
2021-08-09 9:51 [PATCH v2 0/7] Fix various issues regarding DebugImageInfoTable Marvin Häuser
` (6 preceding siblings ...)
2021-08-09 9:51 ` [PATCH v2 4/7] ArmPkg/DefaultExceptionHandlerLib: " Marvin Häuser
@ 2021-08-09 9:51 ` Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 6/7] EmbeddedPkg/GdbStub: " Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 7/7] ArmPkg/DefaultExceptionHandlerLib: " Marvin Häuser
9 siblings, 0 replies; 42+ messages in thread
From: Marvin Häuser @ 2021-08-09 9:51 UTC (permalink / raw)
To: devel; +Cc: Jian J Wang, Hao A Wu, Dandan Bi, Liming Gao, Vitaly Cheptsov
To make parsing DebugImageInfoTable easier and safer, require the
LoadedImage protocol instance to be valid for every NormalImage
entry.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
---
MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c b/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c
index cc22e23eb0b3..afc54965bc33 100644
--- a/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c
+++ b/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c
@@ -173,6 +173,8 @@ CoreNewDebugImageInfoEntry (
UINTN TableSize;
EFI_DEBUG_IMAGE_INFO_NORMAL *NormalImage;
+ ASSERT (LoadedImage != NULL);
+
//
// Set the flag indicating that we're in the process of updating the table.
//
--
2.31.1
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH v2 6/7] EmbeddedPkg/GdbStub: Mandatory LoadedImage for DebugImageInfoTable
2021-08-09 9:51 [PATCH v2 0/7] Fix various issues regarding DebugImageInfoTable Marvin Häuser
` (7 preceding siblings ...)
2021-08-09 9:51 ` [PATCH v2 5/7] MdeModulePkg/CoreDxe: Mandatory LoadedImage for DebugImageInfoTable Marvin Häuser
@ 2021-08-09 9:51 ` Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 7/7] ArmPkg/DefaultExceptionHandlerLib: " Marvin Häuser
9 siblings, 0 replies; 42+ messages in thread
From: Marvin Häuser @ 2021-08-09 9:51 UTC (permalink / raw)
To: devel
Cc: Leif Lindholm, Ard Biesheuvel, Abner Chang, Daniel Schaefer,
Vitaly Cheptsov
To make parsing DebugImageInfoTable easier and safer, require the
LoadedImage protocol instance to be valid for every NormalImage
entry.
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Abner Chang <abner.chang@hpe.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
---
EmbeddedPkg/GdbStub/GdbStub.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/EmbeddedPkg/GdbStub/GdbStub.c b/EmbeddedPkg/GdbStub/GdbStub.c
index 09167fdafb4d..29aa63237304 100644
--- a/EmbeddedPkg/GdbStub/GdbStub.c
+++ b/EmbeddedPkg/GdbStub/GdbStub.c
@@ -1044,8 +1044,9 @@ QxferLibrary (
if (gDebugTable != NULL) {
for (; gEfiDebugImageTableEntry < gDebugImageTableHeader->TableSize; gEfiDebugImageTableEntry++, gDebugTable++) {
if (gDebugTable->ImageInfoType != NULL) {
- if ((*gDebugTable->ImageInfoType == EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL) &&
- (gDebugTable->NormalImage->LoadedImageProtocolInstance != NULL)) {
+ if (*gDebugTable->ImageInfoType == EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL) {
+ ASSERT (gDebugTable->NormalImage->LoadedImageProtocolInstance != NULL);
+
Pdb = PeCoffLoaderGetDebuggerInfo (
gDebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase,
&LoadAddress
--
2.31.1
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH v2 7/7] ArmPkg/DefaultExceptionHandlerLib: Mandatory LoadedImage for DebugImageInfoTable
2021-08-09 9:51 [PATCH v2 0/7] Fix various issues regarding DebugImageInfoTable Marvin Häuser
` (8 preceding siblings ...)
2021-08-09 9:51 ` [PATCH v2 6/7] EmbeddedPkg/GdbStub: " Marvin Häuser
@ 2021-08-09 9:51 ` Marvin Häuser
9 siblings, 0 replies; 42+ messages in thread
From: Marvin Häuser @ 2021-08-09 9:51 UTC (permalink / raw)
To: devel; +Cc: Leif Lindholm, Ard Biesheuvel, Vitaly Cheptsov
To make parsing DebugImageInfoTable easier and safer, require the
LoadedImage protocol instance to be valid for every NormalImage
entry.
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
---
ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c
index 9befb6d4db9b..d442b5d358b2 100644
--- a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c
+++ b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c
@@ -52,8 +52,9 @@ GetImageName (
Address = (CHAR8 *)(UINTN)FaultAddress;
for (Entry = 0; Entry < DebugTableHeader->TableSize; Entry++, DebugTable++) {
if (DebugTable->ImageInfoType != NULL) {
- if ((*DebugTable->ImageInfoType == EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL) &&
- (DebugTable->NormalImage->LoadedImageProtocolInstance != NULL)) {
+ if (*DebugTable->ImageInfoType == EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL) {
+ ASSERT (gDebugTable->NormalImage->LoadedImageProtocolInstance != NULL);
+
if ((Address >= (CHAR8 *)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase) &&
(Address <= ((CHAR8 *)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase + DebugTable->NormalImage->LoadedImageProtocolInstance->ImageSize))) {
*ImageBase = (UINTN)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase;
--
2.31.1
^ permalink raw reply related [flat|nested] 42+ messages in thread
* Re: [PATCH v2 4/7] ArmPkg/DefaultExceptionHandlerLib: Check DebugImageInfoTable type safely
2021-08-09 9:51 ` [PATCH v2 4/7] ArmPkg/DefaultExceptionHandlerLib: " Marvin Häuser
@ 2021-08-09 11:55 ` Ard Biesheuvel
2021-08-09 12:40 ` [edk2-devel] " Marvin Häuser
0 siblings, 1 reply; 42+ messages in thread
From: Ard Biesheuvel @ 2021-08-09 11:55 UTC (permalink / raw)
To: Marvin Häuser
Cc: edk2-devel-groups-io, Leif Lindholm, Ard Biesheuvel,
Vitaly Cheptsov
On Mon, 9 Aug 2021 at 11:51, Marvin Häuser <mhaeuser@posteo.de> wrote:
>
> C does not allow casting to or dereferencing incompatible pointer
> types. Use the ImageInfoType member of the union first to determine
> the data type before dereferencing NormalImage.
>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Vitaly Cheptsov <vit9696@protonmail.com>
> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
Hi Marvin,
Could you please organize your patches into a consistent series,
include a cover letter and cc me on everything?
I am going to disregard anything you sent yesterday and today, as it
is a bit of a jumble.
Thanks,
Ard.
> ---
> ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c
> index e9fea4038252..9befb6d4db9b 100644
> --- a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c
> +++ b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c
> @@ -51,8 +51,8 @@ GetImageName (
>
> Address = (CHAR8 *)(UINTN)FaultAddress;
> for (Entry = 0; Entry < DebugTableHeader->TableSize; Entry++, DebugTable++) {
> - if (DebugTable->NormalImage != NULL) {
> - if ((DebugTable->NormalImage->ImageInfoType == EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL) &&
> + if (DebugTable->ImageInfoType != NULL) {
> + if ((*DebugTable->ImageInfoType == EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL) &&
> (DebugTable->NormalImage->LoadedImageProtocolInstance != NULL)) {
> if ((Address >= (CHAR8 *)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase) &&
> (Address <= ((CHAR8 *)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase + DebugTable->NormalImage->LoadedImageProtocolInstance->ImageSize))) {
> --
> 2.31.1
>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 4/7] ArmPkg/DefaultExceptionHandlerLib: Check DebugImageInfoTable type safely
2021-08-09 11:55 ` Ard Biesheuvel
@ 2021-08-09 12:40 ` Marvin Häuser
2021-08-09 21:19 ` Marvin Häuser
0 siblings, 1 reply; 42+ messages in thread
From: Marvin Häuser @ 2021-08-09 12:40 UTC (permalink / raw)
To: devel, ardb; +Cc: Leif Lindholm, Ard Biesheuvel, Vitaly Cheptsov
On 09/08/2021 13:55, Ard Biesheuvel wrote:
> On Mon, 9 Aug 2021 at 11:51, Marvin Häuser <mhaeuser@posteo.de> wrote:
>> C does not allow casting to or dereferencing incompatible pointer
>> types. Use the ImageInfoType member of the union first to determine
>> the data type before dereferencing NormalImage.
>>
>> Cc: Leif Lindholm <leif@nuviainc.com>
>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
>> Cc: Vitaly Cheptsov <vit9696@protonmail.com>
>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
> Hi Marvin,
>
> Could you please organize your patches into a consistent series,
> include a cover letter and cc me on everything?
Hey Ard,
It's a series and there is a cover letter at:
https://edk2.groups.io/g/devel/topic/patch_v2_0_7_fix_various/84764899?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,84764899
The mails from yesterday can certainly be discarded, for some reason
format-patch did not number the patches without the argument.
The mails from today are numbered and there is a cover letter, but for
some reason the threading is all wrong in Thunderbird for me. All
subsequent patches have the "In-Reply-To" header in the patch files, I
think it is supposed to work off of that? Is threading broken for you as
well? Any idea what could have gone wrong?
I will create a V3 with you CC'd on all patches once I understand
everything that went wrong. Is it normal to CC all people from each
patch on all patches of a series?
Thanks and so sorry for the hassle!
Best regards,
Marvin
> I am going to disregard anything you sent yesterday and today, as it
> is a bit of a jumble.
>
> Thanks,
> Ard.
>
>
>> ---
>> ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c
>> index e9fea4038252..9befb6d4db9b 100644
>> --- a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c
>> +++ b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c
>> @@ -51,8 +51,8 @@ GetImageName (
>>
>> Address = (CHAR8 *)(UINTN)FaultAddress;
>> for (Entry = 0; Entry < DebugTableHeader->TableSize; Entry++, DebugTable++) {
>> - if (DebugTable->NormalImage != NULL) {
>> - if ((DebugTable->NormalImage->ImageInfoType == EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL) &&
>> + if (DebugTable->ImageInfoType != NULL) {
>> + if ((*DebugTable->ImageInfoType == EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL) &&
>> (DebugTable->NormalImage->LoadedImageProtocolInstance != NULL)) {
>> if ((Address >= (CHAR8 *)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase) &&
>> (Address <= ((CHAR8 *)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase + DebugTable->NormalImage->LoadedImageProtocolInstance->ImageSize))) {
>> --
>> 2.31.1
>>
>
>
>
>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 1/2] MdePkg/BaseLib: Fix unaligned API prototypes
2021-08-09 9:51 ` [PATCH v2 1/2] MdePkg/BaseLib: Fix unaligned API prototypes Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 2/2] BaseTools/CommonLib: " Marvin Häuser
@ 2021-08-09 16:15 ` Michael D Kinney
2021-08-09 21:32 ` [edk2-devel] " Andrew Fish
1 sibling, 1 reply; 42+ messages in thread
From: Michael D Kinney @ 2021-08-09 16:15 UTC (permalink / raw)
To: Marvin Häuser, devel@edk2.groups.io, Kinney, Michael D
Cc: Liming Gao, Liu, Zhiguang, Vitaly Cheptsov
Hi Marvin,
Can you provide an example of which C compiler is flagging this as
an error and what error message is generated.
Please enter a BZ with this background information and add link to the
BZ in the commit message.
This is a change to the BaseLib class, so we need to make sure there
are no impacts to any existing code. I looks like a safe change
because changing from a pointer to a fixed size type to VOID *
should be compatible. Please add that analysis to the background
in the BZ as well.
Thanks,
Mike
> -----Original Message-----
> From: Marvin Häuser <mhaeuser@posteo.de>
> Sent: Monday, August 9, 2021 2:51 AM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> <zhiguang.liu@intel.com>; Vitaly Cheptsov <vit9696@protonmail.com>
> Subject: [PATCH v2 1/2] MdePkg/BaseLib: Fix unaligned API prototypes
>
> C prohibits not only dereferencing but also casting to unaligned
> pointers. Thus, the current set of unaligned APIs cannot be called
> safely. Update their prototypes to take VOID * pointers, which must
> be able to represent any valid pointer.
>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Vitaly Cheptsov <vit9696@protonmail.com>
> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
> ---
> MdePkg/Library/BaseLib/Arm/Unaligned.c | 14 ++++-----
> MdePkg/Library/BaseLib/Unaligned.c | 32 ++++++++++----------
> MdePkg/Include/Library/BaseLib.h | 16 +++++-----
> 3 files changed, 31 insertions(+), 31 deletions(-)
>
> diff --git a/MdePkg/Library/BaseLib/Arm/Unaligned.c b/MdePkg/Library/BaseLib/Arm/Unaligned.c
> index e9934e7003cb..57f19fc44e0b 100644
> --- a/MdePkg/Library/BaseLib/Arm/Unaligned.c
> +++ b/MdePkg/Library/BaseLib/Arm/Unaligned.c
> @@ -59,7 +59,7 @@ ReadUnaligned16 (
> UINT16
>
> EFIAPI
>
> WriteUnaligned16 (
>
> - OUT UINT16 *Buffer,
>
> + OUT VOID *Buffer,
>
> IN UINT16 Value
>
> )
>
> {
>
> @@ -87,7 +87,7 @@ WriteUnaligned16 (
> UINT32
>
> EFIAPI
>
> ReadUnaligned24 (
>
> - IN CONST UINT32 *Buffer
>
> + IN CONST VOID *Buffer
>
> )
>
> {
>
> ASSERT (Buffer != NULL);
>
> @@ -116,7 +116,7 @@ ReadUnaligned24 (
> UINT32
>
> EFIAPI
>
> WriteUnaligned24 (
>
> - OUT UINT32 *Buffer,
>
> + OUT VOID *Buffer,
>
> IN UINT32 Value
>
> )
>
> {
>
> @@ -143,7 +143,7 @@ WriteUnaligned24 (
> UINT32
>
> EFIAPI
>
> ReadUnaligned32 (
>
> - IN CONST UINT32 *Buffer
>
> + IN CONST VOID *Buffer
>
> )
>
> {
>
> UINT16 LowerBytes;
>
> @@ -175,7 +175,7 @@ ReadUnaligned32 (
> UINT32
>
> EFIAPI
>
> WriteUnaligned32 (
>
> - OUT UINT32 *Buffer,
>
> + OUT VOID *Buffer,
>
> IN UINT32 Value
>
> )
>
> {
>
> @@ -202,7 +202,7 @@ WriteUnaligned32 (
> UINT64
>
> EFIAPI
>
> ReadUnaligned64 (
>
> - IN CONST UINT64 *Buffer
>
> + IN CONST VOID *Buffer
>
> )
>
> {
>
> UINT32 LowerBytes;
>
> @@ -234,7 +234,7 @@ ReadUnaligned64 (
> UINT64
>
> EFIAPI
>
> WriteUnaligned64 (
>
> - OUT UINT64 *Buffer,
>
> + OUT VOID *Buffer,
>
> IN UINT64 Value
>
> )
>
> {
>
> diff --git a/MdePkg/Library/BaseLib/Unaligned.c b/MdePkg/Library/BaseLib/Unaligned.c
> index a419cb85e53c..3041adcde606 100644
> --- a/MdePkg/Library/BaseLib/Unaligned.c
> +++ b/MdePkg/Library/BaseLib/Unaligned.c
> @@ -26,12 +26,12 @@
> UINT16
>
> EFIAPI
>
> ReadUnaligned16 (
>
> - IN CONST UINT16 *Buffer
>
> + IN CONST VOID *Buffer
>
> )
>
> {
>
> ASSERT (Buffer != NULL);
>
>
>
> - return *Buffer;
>
> + return *(CONST UINT16 *) Buffer;
>
> }
>
>
>
> /**
>
> @@ -52,13 +52,13 @@ ReadUnaligned16 (
> UINT16
>
> EFIAPI
>
> WriteUnaligned16 (
>
> - OUT UINT16 *Buffer,
>
> + OUT VOID *Buffer,
>
> IN UINT16 Value
>
> )
>
> {
>
> ASSERT (Buffer != NULL);
>
>
>
> - return *Buffer = Value;
>
> + return *(UINT16 *) Buffer = Value;
>
> }
>
>
>
> /**
>
> @@ -77,12 +77,12 @@ WriteUnaligned16 (
> UINT32
>
> EFIAPI
>
> ReadUnaligned24 (
>
> - IN CONST UINT32 *Buffer
>
> + IN CONST VOID *Buffer
>
> )
>
> {
>
> ASSERT (Buffer != NULL);
>
>
>
> - return *Buffer & 0xffffff;
>
> + return *(CONST UINT32 *) Buffer & 0xffffff;
>
> }
>
>
>
> /**
>
> @@ -103,13 +103,13 @@ ReadUnaligned24 (
> UINT32
>
> EFIAPI
>
> WriteUnaligned24 (
>
> - OUT UINT32 *Buffer,
>
> + OUT VOID *Buffer,
>
> IN UINT32 Value
>
> )
>
> {
>
> ASSERT (Buffer != NULL);
>
>
>
> - *Buffer = BitFieldWrite32 (*Buffer, 0, 23, Value);
>
> + *(UINT32 *) Buffer = BitFieldWrite32 (*(CONST UINT32 *) Buffer, 0, 23, Value);
>
> return Value;
>
> }
>
>
>
> @@ -129,12 +129,12 @@ WriteUnaligned24 (
> UINT32
>
> EFIAPI
>
> ReadUnaligned32 (
>
> - IN CONST UINT32 *Buffer
>
> + IN CONST VOID *Buffer
>
> )
>
> {
>
> ASSERT (Buffer != NULL);
>
>
>
> - return *Buffer;
>
> + return *(CONST UINT32 *) Buffer;
>
> }
>
>
>
> /**
>
> @@ -155,13 +155,13 @@ ReadUnaligned32 (
> UINT32
>
> EFIAPI
>
> WriteUnaligned32 (
>
> - OUT UINT32 *Buffer,
>
> + OUT VOID *Buffer,
>
> IN UINT32 Value
>
> )
>
> {
>
> ASSERT (Buffer != NULL);
>
>
>
> - return *Buffer = Value;
>
> + return *(UINT32 *) Buffer = Value;
>
> }
>
>
>
> /**
>
> @@ -180,12 +180,12 @@ WriteUnaligned32 (
> UINT64
>
> EFIAPI
>
> ReadUnaligned64 (
>
> - IN CONST UINT64 *Buffer
>
> + IN CONST VOID *Buffer
>
> )
>
> {
>
> ASSERT (Buffer != NULL);
>
>
>
> - return *Buffer;
>
> + return *(CONST UINT64 *) Buffer;
>
> }
>
>
>
> /**
>
> @@ -206,11 +206,11 @@ ReadUnaligned64 (
> UINT64
>
> EFIAPI
>
> WriteUnaligned64 (
>
> - OUT UINT64 *Buffer,
>
> + OUT VOID *Buffer,
>
> IN UINT64 Value
>
> )
>
> {
>
> ASSERT (Buffer != NULL);
>
>
>
> - return *Buffer = Value;
>
> + return *(UINT64 *) Buffer = Value;
>
> }
>
> diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h
> index 2452c1d92e51..4d30f0539c6b 100644
> --- a/MdePkg/Include/Library/BaseLib.h
> +++ b/MdePkg/Include/Library/BaseLib.h
> @@ -3420,7 +3420,7 @@ DivS64x64Remainder (
> UINT16
>
> EFIAPI
>
> ReadUnaligned16 (
>
> - IN CONST UINT16 *Buffer
>
> + IN CONST VOID *Buffer
>
> );
>
>
>
>
>
> @@ -3442,7 +3442,7 @@ ReadUnaligned16 (
> UINT16
>
> EFIAPI
>
> WriteUnaligned16 (
>
> - OUT UINT16 *Buffer,
>
> + OUT VOID *Buffer,
>
> IN UINT16 Value
>
> );
>
>
>
> @@ -3463,7 +3463,7 @@ WriteUnaligned16 (
> UINT32
>
> EFIAPI
>
> ReadUnaligned24 (
>
> - IN CONST UINT32 *Buffer
>
> + IN CONST VOID *Buffer
>
> );
>
>
>
>
>
> @@ -3485,7 +3485,7 @@ ReadUnaligned24 (
> UINT32
>
> EFIAPI
>
> WriteUnaligned24 (
>
> - OUT UINT32 *Buffer,
>
> + OUT VOID *Buffer,
>
> IN UINT32 Value
>
> );
>
>
>
> @@ -3506,7 +3506,7 @@ WriteUnaligned24 (
> UINT32
>
> EFIAPI
>
> ReadUnaligned32 (
>
> - IN CONST UINT32 *Buffer
>
> + IN CONST VOID *Buffer
>
> );
>
>
>
>
>
> @@ -3528,7 +3528,7 @@ ReadUnaligned32 (
> UINT32
>
> EFIAPI
>
> WriteUnaligned32 (
>
> - OUT UINT32 *Buffer,
>
> + OUT VOID *Buffer,
>
> IN UINT32 Value
>
> );
>
>
>
> @@ -3549,7 +3549,7 @@ WriteUnaligned32 (
> UINT64
>
> EFIAPI
>
> ReadUnaligned64 (
>
> - IN CONST UINT64 *Buffer
>
> + IN CONST VOID *Buffer
>
> );
>
>
>
>
>
> @@ -3571,7 +3571,7 @@ ReadUnaligned64 (
> UINT64
>
> EFIAPI
>
> WriteUnaligned64 (
>
> - OUT UINT64 *Buffer,
>
> + OUT VOID *Buffer,
>
> IN UINT64 Value
>
> );
>
>
>
> --
> 2.31.1
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 4/7] ArmPkg/DefaultExceptionHandlerLib: Check DebugImageInfoTable type safely
2021-08-09 12:40 ` [edk2-devel] " Marvin Häuser
@ 2021-08-09 21:19 ` Marvin Häuser
2021-08-16 9:50 ` Ard Biesheuvel
0 siblings, 1 reply; 42+ messages in thread
From: Marvin Häuser @ 2021-08-09 21:19 UTC (permalink / raw)
To: devel, ardb; +Cc: Leif Lindholm, Ard Biesheuvel, Vitaly Cheptsov
On 09/08/2021 14:40, Marvin Häuser wrote:
> On 09/08/2021 13:55, Ard Biesheuvel wrote:
>> On Mon, 9 Aug 2021 at 11:51, Marvin Häuser <mhaeuser@posteo.de> wrote:
>>> C does not allow casting to or dereferencing incompatible pointer
>>> types. Use the ImageInfoType member of the union first to determine
>>> the data type before dereferencing NormalImage.
>>>
>>> Cc: Leif Lindholm <leif@nuviainc.com>
>>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
>>> Cc: Vitaly Cheptsov <vit9696@protonmail.com>
>>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
>> Hi Marvin,
>>
>> Could you please organize your patches into a consistent series,
>> include a cover letter and cc me on everything?
>
> Hey Ard,
>
> It's a series and there is a cover letter at:
> https://edk2.groups.io/g/devel/topic/patch_v2_0_7_fix_various/84764899?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,84764899
> The mails from yesterday can certainly be discarded, for some reason
> format-patch did not number the patches without the argument.
> The mails from today are numbered and there is a cover letter, but for
> some reason the threading is all wrong in Thunderbird for me. All
> subsequent patches have the "In-Reply-To" header in the patch files, I
> think it is supposed to work off of that? Is threading broken for you
> as well? Any idea what could have gone wrong?
Today I learned two things.
1) Both format-patch and send-email support threading individually, and
they don't cooperate [1].
2) Groups.io does not like patch sets [2].
*Sigh*. Sorry.
Best regards,
Marvin
[1] "It is up to the user to ensure that no In-Reply-To header already
exists when git send-email is asked to add it (especially note that git
format-patch can be configured to do the threading itself). Failure to
do so may not produce the expected result in the recipient’s MUA.",
https://git-scm.com/docs/git-send-email
[2] "Note: This checkbox is selected by default in new Groups.io
accounts. If you do not want to see copies of your own messages, clear
this checkbox. [...] (For those interested in the technical details:
When this checkbox is selected, Groups.io replaces the Message-Id header
with a new, system-generated one and renames the original Message-Id
header to X-Orig-Message-Id.)",
https://groups.io/helpcenter/membersmanual?single=true
>
> I will create a V3 with you CC'd on all patches once I understand
> everything that went wrong. Is it normal to CC all people from each
> patch on all patches of a series?
>
> Thanks and so sorry for the hassle!
>
> Best regards,
> Marvin
>
>> I am going to disregard anything you sent yesterday and today, as it
>> is a bit of a jumble.
>>
>> Thanks,
>> Ard.
>>
>>
>>> ---
>>> ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c
>>> | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git
>>> a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c
>>> b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c
>>>
>>> index e9fea4038252..9befb6d4db9b 100644
>>> ---
>>> a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c
>>> +++
>>> b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c
>>> @@ -51,8 +51,8 @@ GetImageName (
>>>
>>> Address = (CHAR8 *)(UINTN)FaultAddress;
>>> for (Entry = 0; Entry < DebugTableHeader->TableSize; Entry++,
>>> DebugTable++) {
>>> - if (DebugTable->NormalImage != NULL) {
>>> - if ((DebugTable->NormalImage->ImageInfoType ==
>>> EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL) &&
>>> + if (DebugTable->ImageInfoType != NULL) {
>>> + if ((*DebugTable->ImageInfoType ==
>>> EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL) &&
>>> (DebugTable->NormalImage->LoadedImageProtocolInstance != NULL)) {
>>> if ((Address >= (CHAR8
>>> *)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase) &&
>>> (Address <= ((CHAR8
>>> *)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase +
>>> DebugTable->NormalImage->LoadedImageProtocolInstance->ImageSize))) {
>>> --
>>> 2.31.1
>>>
>>
>>
>>
>>
>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/2] MdePkg/BaseLib: Fix unaligned API prototypes
2021-08-09 16:15 ` [PATCH v2 1/2] MdePkg/BaseLib: " Michael D Kinney
@ 2021-08-09 21:32 ` Andrew Fish
2021-08-10 8:53 ` Marvin Häuser
0 siblings, 1 reply; 42+ messages in thread
From: Andrew Fish @ 2021-08-09 21:32 UTC (permalink / raw)
To: edk2-devel-groups-io, Mike Kinney
Cc: Marvin Häuser, Liming Gao, Liu, Zhiguang, Vitaly Cheptsov
[-- Attachment #1: Type: text/plain, Size: 12177 bytes --]
> On Aug 9, 2021, at 9:15 AM, Michael D Kinney <michael.d.kinney@intel.com> wrote:
>
> Hi Marvin,
>
> Can you provide an example of which C compiler is flagging this as
> an error and what error message is generated.
>
> Please enter a BZ with this background information and add link to the
> BZ in the commit message.
>
> This is a change to the BaseLib class, so we need to make sure there
> are no impacts to any existing code. I looks like a safe change
> because changing from a pointer to a fixed size type to VOID *
> should be compatible. Please add that analysis to the background
> in the BZ as well.
>
MIke,
I want to say we had a discussion about this years ago? I don’t remember the outcome.
Dereferencing a misaligned pointer is UB (Undefined Behavior) in C [1], but historically x86 compilers have let it slide.
I think the situation we are in is the BaseLib functions don’t contain UB, but it is UB for the caller to use the returned pointer directly.
Here is a simple example with clang UndefinedBehaviorSanitizer (UBSan) .
~/work/Compiler>cat ub.c
#include <stdlib.h>
#define EFIAPI
#define IN
#define OUT
typedef unsigned char UINT8;
typedef unsigned short UINT16;
UINT16
EFIAPI
WriteUnaligned16 (
OUT UINT16 *Buffer,
IN UINT16 Value
)
{
// ASSERT (Buffer != NULL);
((volatile UINT8*)Buffer)[0] = (UINT8)Value;
((volatile UINT8*)Buffer)[1] = (UINT8)(Value >> 8);
return Value;
}
int main()
{
UINT8 *buffer = malloc(64);
UINT16 *pointer = (UINT16 *)(buffer + 1);
WriteUnaligned16 (pointer, 42);
// *pointer = 42; // Error: misaligned integer pointer assignment
return *pointer;
}
~/work/Compiler>clang -fsanitize=undefined ub.c
~/work/Compiler>./a.out
ub.c:34:9: runtime error: load of misaligned address 0x7feac6405aa1 for type 'UINT16' (aka 'unsigned short'), which requires 2 byte alignment
0x7feac6405aa1: note: pointer points here
00 00 00 64 2a 00 79 6d 28 52 54 4c 44 5f 44 45 46 41 55 4c 54 2c 20 73 77 69 66 74 5f 64 65 6d
^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ub.c:34:9 in
FYI line 39 is `return *pointer`and 42 is 0x2A. So reading an writing to *pointer is UB.
As you can see in [1] the general advice is to take code that looks like:
int8_t *buffer = malloc(64);
int32_t *pointer = (int32_t *)(buffer + 1);
*pointer = 42; // Error: misaligned integer pointer assignment
And replace it with;
int8_t *buffer = malloc(64);
int32_t value = 42;
memcpy(buffer + 1, &value, sizeof(int32_t)); // Correct
But in these cases the result is in a byte aligned buffer….
[1] https://developer.apple.com/documentation/xcode/misaligned-pointer
Thanks,
Andrew Fish
> Thanks,
>
> Mike
>
>
>> -----Original Message-----
>> From: Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>
>> Sent: Monday, August 9, 2021 2:51 AM
>> To: devel@edk2.groups.io <mailto:devel@edk2.groups.io>
>> Cc: Kinney, Michael D <michael.d.kinney@intel.com <mailto:michael.d.kinney@intel.com>>; Liming Gao <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>>; Liu, Zhiguang
>> <zhiguang.liu@intel.com <mailto:zhiguang.liu@intel.com>>; Vitaly Cheptsov <vit9696@protonmail.com <mailto:vit9696@protonmail.com>>
>> Subject: [PATCH v2 1/2] MdePkg/BaseLib: Fix unaligned API prototypes
>>
>> C prohibits not only dereferencing but also casting to unaligned
>> pointers. Thus, the current set of unaligned APIs cannot be called
>> safely. Update their prototypes to take VOID * pointers, which must
>> be able to represent any valid pointer.
>>
>> Cc: Michael D Kinney <michael.d.kinney@intel.com>
>> Cc: Liming Gao <gaoliming@byosoft.com.cn>
>> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
>> Cc: Vitaly Cheptsov <vit9696@protonmail.com>
>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
>> ---
>> MdePkg/Library/BaseLib/Arm/Unaligned.c | 14 ++++-----
>> MdePkg/Library/BaseLib/Unaligned.c | 32 ++++++++++----------
>> MdePkg/Include/Library/BaseLib.h | 16 +++++-----
>> 3 files changed, 31 insertions(+), 31 deletions(-)
>>
>> diff --git a/MdePkg/Library/BaseLib/Arm/Unaligned.c b/MdePkg/Library/BaseLib/Arm/Unaligned.c
>> index e9934e7003cb..57f19fc44e0b 100644
>> --- a/MdePkg/Library/BaseLib/Arm/Unaligned.c
>> +++ b/MdePkg/Library/BaseLib/Arm/Unaligned.c
>> @@ -59,7 +59,7 @@ ReadUnaligned16 (
>> UINT16
>>
>> EFIAPI
>>
>> WriteUnaligned16 (
>>
>> - OUT UINT16 *Buffer,
>>
>> + OUT VOID *Buffer,
>>
>> IN UINT16 Value
>>
>> )
>>
>> {
>>
>> @@ -87,7 +87,7 @@ WriteUnaligned16 (
>> UINT32
>>
>> EFIAPI
>>
>> ReadUnaligned24 (
>>
>> - IN CONST UINT32 *Buffer
>>
>> + IN CONST VOID *Buffer
>>
>> )
>>
>> {
>>
>> ASSERT (Buffer != NULL);
>>
>> @@ -116,7 +116,7 @@ ReadUnaligned24 (
>> UINT32
>>
>> EFIAPI
>>
>> WriteUnaligned24 (
>>
>> - OUT UINT32 *Buffer,
>>
>> + OUT VOID *Buffer,
>>
>> IN UINT32 Value
>>
>> )
>>
>> {
>>
>> @@ -143,7 +143,7 @@ WriteUnaligned24 (
>> UINT32
>>
>> EFIAPI
>>
>> ReadUnaligned32 (
>>
>> - IN CONST UINT32 *Buffer
>>
>> + IN CONST VOID *Buffer
>>
>> )
>>
>> {
>>
>> UINT16 LowerBytes;
>>
>> @@ -175,7 +175,7 @@ ReadUnaligned32 (
>> UINT32
>>
>> EFIAPI
>>
>> WriteUnaligned32 (
>>
>> - OUT UINT32 *Buffer,
>>
>> + OUT VOID *Buffer,
>>
>> IN UINT32 Value
>>
>> )
>>
>> {
>>
>> @@ -202,7 +202,7 @@ WriteUnaligned32 (
>> UINT64
>>
>> EFIAPI
>>
>> ReadUnaligned64 (
>>
>> - IN CONST UINT64 *Buffer
>>
>> + IN CONST VOID *Buffer
>>
>> )
>>
>> {
>>
>> UINT32 LowerBytes;
>>
>> @@ -234,7 +234,7 @@ ReadUnaligned64 (
>> UINT64
>>
>> EFIAPI
>>
>> WriteUnaligned64 (
>>
>> - OUT UINT64 *Buffer,
>>
>> + OUT VOID *Buffer,
>>
>> IN UINT64 Value
>>
>> )
>>
>> {
>>
>> diff --git a/MdePkg/Library/BaseLib/Unaligned.c b/MdePkg/Library/BaseLib/Unaligned.c
>> index a419cb85e53c..3041adcde606 100644
>> --- a/MdePkg/Library/BaseLib/Unaligned.c
>> +++ b/MdePkg/Library/BaseLib/Unaligned.c
>> @@ -26,12 +26,12 @@
>> UINT16
>>
>> EFIAPI
>>
>> ReadUnaligned16 (
>>
>> - IN CONST UINT16 *Buffer
>>
>> + IN CONST VOID *Buffer
>>
>> )
>>
>> {
>>
>> ASSERT (Buffer != NULL);
>>
>>
>>
>> - return *Buffer;
>>
>> + return *(CONST UINT16 *) Buffer;
>>
>> }
>>
>>
>>
>> /**
>>
>> @@ -52,13 +52,13 @@ ReadUnaligned16 (
>> UINT16
>>
>> EFIAPI
>>
>> WriteUnaligned16 (
>>
>> - OUT UINT16 *Buffer,
>>
>> + OUT VOID *Buffer,
>>
>> IN UINT16 Value
>>
>> )
>>
>> {
>>
>> ASSERT (Buffer != NULL);
>>
>>
>>
>> - return *Buffer = Value;
>>
>> + return *(UINT16 *) Buffer = Value;
>>
>> }
>>
>>
>>
>> /**
>>
>> @@ -77,12 +77,12 @@ WriteUnaligned16 (
>> UINT32
>>
>> EFIAPI
>>
>> ReadUnaligned24 (
>>
>> - IN CONST UINT32 *Buffer
>>
>> + IN CONST VOID *Buffer
>>
>> )
>>
>> {
>>
>> ASSERT (Buffer != NULL);
>>
>>
>>
>> - return *Buffer & 0xffffff;
>>
>> + return *(CONST UINT32 *) Buffer & 0xffffff;
>>
>> }
>>
>>
>>
>> /**
>>
>> @@ -103,13 +103,13 @@ ReadUnaligned24 (
>> UINT32
>>
>> EFIAPI
>>
>> WriteUnaligned24 (
>>
>> - OUT UINT32 *Buffer,
>>
>> + OUT VOID *Buffer,
>>
>> IN UINT32 Value
>>
>> )
>>
>> {
>>
>> ASSERT (Buffer != NULL);
>>
>>
>>
>> - *Buffer = BitFieldWrite32 (*Buffer, 0, 23, Value);
>>
>> + *(UINT32 *) Buffer = BitFieldWrite32 (*(CONST UINT32 *) Buffer, 0, 23, Value);
>>
>> return Value;
>>
>> }
>>
>>
>>
>> @@ -129,12 +129,12 @@ WriteUnaligned24 (
>> UINT32
>>
>> EFIAPI
>>
>> ReadUnaligned32 (
>>
>> - IN CONST UINT32 *Buffer
>>
>> + IN CONST VOID *Buffer
>>
>> )
>>
>> {
>>
>> ASSERT (Buffer != NULL);
>>
>>
>>
>> - return *Buffer;
>>
>> + return *(CONST UINT32 *) Buffer;
>>
>> }
>>
>>
>>
>> /**
>>
>> @@ -155,13 +155,13 @@ ReadUnaligned32 (
>> UINT32
>>
>> EFIAPI
>>
>> WriteUnaligned32 (
>>
>> - OUT UINT32 *Buffer,
>>
>> + OUT VOID *Buffer,
>>
>> IN UINT32 Value
>>
>> )
>>
>> {
>>
>> ASSERT (Buffer != NULL);
>>
>>
>>
>> - return *Buffer = Value;
>>
>> + return *(UINT32 *) Buffer = Value;
>>
>> }
>>
>>
>>
>> /**
>>
>> @@ -180,12 +180,12 @@ WriteUnaligned32 (
>> UINT64
>>
>> EFIAPI
>>
>> ReadUnaligned64 (
>>
>> - IN CONST UINT64 *Buffer
>>
>> + IN CONST VOID *Buffer
>>
>> )
>>
>> {
>>
>> ASSERT (Buffer != NULL);
>>
>>
>>
>> - return *Buffer;
>>
>> + return *(CONST UINT64 *) Buffer;
>>
>> }
>>
>>
>>
>> /**
>>
>> @@ -206,11 +206,11 @@ ReadUnaligned64 (
>> UINT64
>>
>> EFIAPI
>>
>> WriteUnaligned64 (
>>
>> - OUT UINT64 *Buffer,
>>
>> + OUT VOID *Buffer,
>>
>> IN UINT64 Value
>>
>> )
>>
>> {
>>
>> ASSERT (Buffer != NULL);
>>
>>
>>
>> - return *Buffer = Value;
>>
>> + return *(UINT64 *) Buffer = Value;
>>
>> }
>>
>> diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h
>> index 2452c1d92e51..4d30f0539c6b 100644
>> --- a/MdePkg/Include/Library/BaseLib.h
>> +++ b/MdePkg/Include/Library/BaseLib.h
>> @@ -3420,7 +3420,7 @@ DivS64x64Remainder (
>> UINT16
>>
>> EFIAPI
>>
>> ReadUnaligned16 (
>>
>> - IN CONST UINT16 *Buffer
>>
>> + IN CONST VOID *Buffer
>>
>> );
>>
>>
>>
>>
>>
>> @@ -3442,7 +3442,7 @@ ReadUnaligned16 (
>> UINT16
>>
>> EFIAPI
>>
>> WriteUnaligned16 (
>>
>> - OUT UINT16 *Buffer,
>>
>> + OUT VOID *Buffer,
>>
>> IN UINT16 Value
>>
>> );
>>
>>
>>
>> @@ -3463,7 +3463,7 @@ WriteUnaligned16 (
>> UINT32
>>
>> EFIAPI
>>
>> ReadUnaligned24 (
>>
>> - IN CONST UINT32 *Buffer
>>
>> + IN CONST VOID *Buffer
>>
>> );
>>
>>
>>
>>
>>
>> @@ -3485,7 +3485,7 @@ ReadUnaligned24 (
>> UINT32
>>
>> EFIAPI
>>
>> WriteUnaligned24 (
>>
>> - OUT UINT32 *Buffer,
>>
>> + OUT VOID *Buffer,
>>
>> IN UINT32 Value
>>
>> );
>>
>>
>>
>> @@ -3506,7 +3506,7 @@ WriteUnaligned24 (
>> UINT32
>>
>> EFIAPI
>>
>> ReadUnaligned32 (
>>
>> - IN CONST UINT32 *Buffer
>>
>> + IN CONST VOID *Buffer
>>
>> );
>>
>>
>>
>>
>>
>> @@ -3528,7 +3528,7 @@ ReadUnaligned32 (
>> UINT32
>>
>> EFIAPI
>>
>> WriteUnaligned32 (
>>
>> - OUT UINT32 *Buffer,
>>
>> + OUT VOID *Buffer,
>>
>> IN UINT32 Value
>>
>> );
>>
>>
>>
>> @@ -3549,7 +3549,7 @@ WriteUnaligned32 (
>> UINT64
>>
>> EFIAPI
>>
>> ReadUnaligned64 (
>>
>> - IN CONST UINT64 *Buffer
>>
>> + IN CONST VOID *Buffer
>>
>> );
>>
>>
>>
>>
>>
>> @@ -3571,7 +3571,7 @@ ReadUnaligned64 (
>> UINT64
>>
>> EFIAPI
>>
>> WriteUnaligned64 (
>>
>> - OUT UINT64 *Buffer,
>>
>> + OUT VOID *Buffer,
>>
>> IN UINT64 Value
>>
>> );
>>
>>
>>
>> --
>> 2.31.1
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 49911 bytes --]
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 2/2] UefiCpuPkg/BaseUefiCpuLib: Use toolchain-specific rodata section name
2021-08-09 9:51 ` [PATCH v2 2/2] UefiCpuPkg/BaseUefiCpuLib: Use toolchain-specific rodata section name Marvin Häuser
@ 2021-08-10 2:43 ` Ni, Ray
2021-08-10 4:40 ` [edk2-devel] " Andrew Fish
0 siblings, 1 reply; 42+ messages in thread
From: Ni, Ray @ 2021-08-10 2:43 UTC (permalink / raw)
To: Marvin Häuser, devel@edk2.groups.io
Cc: Dong, Eric, Kumar, Rahul1, Vitaly Cheptsov
Acked-by: Ray Ni <ray.ni@intel.com>
I will depend on tool owner to review the tool configuration change making sure that the correct section name is chosen for different C compilers.
Thanks,
Ray
> -----Original Message-----
> From: Marvin Häuser <mhaeuser@posteo.de>
> Sent: Monday, August 9, 2021 5:51 PM
> To: devel@edk2.groups.io
> Cc: Dong, Eric <eric.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Kumar, Rahul1 <rahul1.kumar@intel.com>; Vitaly Cheptsov
> <vit9696@protonmail.com>
> Subject: [PATCH v2 2/2] UefiCpuPkg/BaseUefiCpuLib: Use toolchain-specific rodata section name
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3318
>
> Correctly define the read-only data sections with the
> toolchain-specific section name. This hardens image permission
> security and may save image space.
>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Rahul Kumar <rahul1.kumar@intel.com>
> Cc: Vitaly Cheptsov <vit9696@protonmail.com>
> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
> ---
> UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm | 2 +-
> UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
> b/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
> index 5e27cc325012..cfb8bf4a5ae0 100644
> --- a/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
> +++ b/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
> @@ -6,7 +6,7 @@
> ;*
>
> ;------------------------------------------------------------------------------
>
>
>
> - SECTION .rodata
>
> + SECTION RODATA_SECTION_NAME
>
>
>
> ;
>
> ; Float control word initial value:
>
> diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
> b/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
> index 8485b4713548..3c976a21e391 100644
> --- a/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
> +++ b/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
> @@ -6,7 +6,7 @@
> ;*
>
> ;------------------------------------------------------------------------------
>
>
>
> - SECTION .rodata
>
> + SECTION RODATA_SECTION_NAME
>
> ;
>
> ; Float control word initial value:
>
> ; all exceptions masked, double-extended-precision, round-to-nearest
>
> --
> 2.31.1
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain
2021-08-09 9:51 ` [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 2/2] UefiCpuPkg/BaseUefiCpuLib: Use toolchain-specific rodata section name Marvin Häuser
@ 2021-08-10 4:19 ` Andrew Fish
2021-08-10 8:27 ` Marvin Häuser
1 sibling, 1 reply; 42+ messages in thread
From: Andrew Fish @ 2021-08-10 4:19 UTC (permalink / raw)
To: edk2-devel-groups-io, Marvin Häuser
Cc: Bob Feng, Liming Gao, Yuwei Chen, Vitaly Cheptsov
[-- Attachment #1: Type: text/plain, Size: 44365 bytes --]
> On Aug 9, 2021, at 2:51 AM, Marvin Häuser <mhaeuser@posteo.de> wrote:
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3318
>
> Different toolchains of the EDK II build system may generate ELF or
> Mach-O files, which use the ".rodata" naming convention, or PE/COFF
> files, which use the ".rdata" naming convention. Section permissions
> are chosen based on this name per file format by NASM. To harden
> image permission security, and to save space by avoiding both
> ".rdata" and ".rodata" sections being emitted, expose the appropriate
> name as a preprocessor constant.
>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> Cc: Vitaly Cheptsov <vit9696@protonmail.com>
> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
> ---
> BaseTools/Conf/tools_def.template | 172 ++++++++++----------
> 1 file changed, 86 insertions(+), 86 deletions(-)
>
> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
> index 2e6b382ab623..84d464916c4d 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -463,9 +463,9 @@ NOOPT_VS2008_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
> RELEASE_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>
> NOOPT_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>
>
>
> - DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g
>
> -RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
>
> -NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g
>
> + DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -495,9 +495,9 @@ NOOPT_VS2008_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
> RELEASE_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>
> NOOPT_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>
>
>
> - DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g
>
> -RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
>
> -NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g
>
> + DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -574,9 +574,9 @@ NOOPT_VS2008x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
> RELEASE_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>
> NOOPT_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>
>
>
> - DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>
> -RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
>
> -NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>
> + DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -605,9 +605,9 @@ NOOPT_VS2008x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
> RELEASE_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>
> NOOPT_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>
>
>
> - DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g
>
> -RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
>
> -NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g
>
> + DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -688,9 +688,9 @@ NOOPT_VS2010_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
> RELEASE_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>
> NOOPT_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>
>
>
> - DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g
>
> -RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
>
> -NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g
>
> + DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -720,9 +720,9 @@ NOOPT_VS2010_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
> RELEASE_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>
> NOOPT_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>
>
>
> - DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g
>
> -RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
>
> -NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g
>
> + DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -799,9 +799,9 @@ NOOPT_VS2010x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
> RELEASE_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>
> NOOPT_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>
>
>
> - DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>
> -RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
>
> -NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>
> + DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -831,9 +831,9 @@ NOOPT_VS2010x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
> RELEASE_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>
> NOOPT_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>
>
>
> - DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g
>
> -RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
>
> -NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g
>
> + DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -913,9 +913,9 @@ NOOPT_VS2012_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
> RELEASE_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>
> NOOPT_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>
>
>
> - DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g
>
> -RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
>
> -NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g
>
> + DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -945,9 +945,9 @@ NOOPT_VS2012_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
> RELEASE_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>
> NOOPT_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>
>
>
> - DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g
>
> -RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
>
> -NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g
>
> + DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -1024,9 +1024,9 @@ NOOPT_VS2012x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
> RELEASE_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>
> NOOPT_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>
>
>
> - DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>
> -RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
>
> -NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>
> + DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -1056,9 +1056,9 @@ NOOPT_VS2012x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
> RELEASE_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>
> NOOPT_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>
>
>
> - DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g
>
> -RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
>
> -NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g
>
> + DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -1138,9 +1138,9 @@ NOOPT_VS2013_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
> RELEASE_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>
> NOOPT_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>
>
>
> - DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g
>
> -RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
>
> -NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g
>
> + DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -1170,9 +1170,9 @@ NOOPT_VS2013_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
> RELEASE_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>
> NOOPT_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>
>
>
> - DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g
>
> -RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
>
> -NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g
>
> + DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -1249,9 +1249,9 @@ NOOPT_VS2013x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
> RELEASE_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>
> NOOPT_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>
>
>
> - DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>
> -RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
>
> -NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>
> + DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -1281,9 +1281,9 @@ NOOPT_VS2013x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
> RELEASE_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>
> NOOPT_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>
>
>
> - DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g
>
> -RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
>
> -NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g
>
> + DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -1364,9 +1364,9 @@ NOOPT_VS2015_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
> RELEASE_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>
> NOOPT_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>
>
>
> - DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g
>
> -RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32
>
> -NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g
>
> + DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -1396,9 +1396,9 @@ NOOPT_VS2015_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
> RELEASE_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>
> NOOPT_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>
>
>
> - DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g
>
> -RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64
>
> -NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
>
> + DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -1476,9 +1476,9 @@ NOOPT_VS2015x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
> RELEASE_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>
> NOOPT_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>
>
>
> - DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>
> -RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32
>
> -NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>
> + DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -1508,9 +1508,9 @@ NOOPT_VS2015x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
> RELEASE_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>
> NOOPT_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>
>
>
> - DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g
>
> -RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64
>
> -NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g
>
> + DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -1586,9 +1586,9 @@ NOOPT_VS2017_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
> RELEASE_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>
> NOOPT_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>
>
>
> - DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
>
> -RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
>
> -NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
>
> + DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -1616,9 +1616,9 @@ NOOPT_VS2017_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
> RELEASE_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>
> NOOPT_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>
>
>
> - DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
>
> -RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
>
> -NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
>
> + DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -1744,9 +1744,9 @@ NOOPT_VS2019_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
> RELEASE_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>
> NOOPT_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>
>
>
> - DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g
>
> -RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32
>
> -NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g
>
> + DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -1774,9 +1774,9 @@ NOOPT_VS2019_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
> RELEASE_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>
> NOOPT_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>
>
>
> - DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g
>
> -RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64
>
> -NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g
>
> + DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
> +RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>
> +NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>
>
>
> DEBUG_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>
> RELEASE_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>
> @@ -2030,7 +2030,7 @@ DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include A
> *_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
>
> *_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>
> *_GCC48_IA32_OBJCOPY_FLAGS =
>
> -*_GCC48_IA32_NASM_FLAGS = -f elf32
>
> +*_GCC48_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>
>
>
> DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
>
> RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable
>
> @@ -2058,7 +2058,7 @@ RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but
> *_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
>
> *_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>
> *_GCC48_X64_OBJCOPY_FLAGS =
>
> -*_GCC48_X64_NASM_FLAGS = -f elf64
>
> +*_GCC48_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>
>
>
> DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
>
> RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable
>
> @@ -2170,7 +2170,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
> *_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
>
> *_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>
> *_GCC49_IA32_OBJCOPY_FLAGS =
>
> -*_GCC49_IA32_NASM_FLAGS = -f elf32
>
> +*_GCC49_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>
>
>
> DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
>
> RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
>
> @@ -2198,7 +2198,7 @@ RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but
> *_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
>
> *_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>
> *_GCC49_X64_OBJCOPY_FLAGS =
>
> -*_GCC49_X64_NASM_FLAGS = -f elf64
>
> +*_GCC49_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>
>
>
> DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
>
> RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
>
> @@ -2316,7 +2316,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
> *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
>
> *_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>
> *_GCC5_IA32_OBJCOPY_FLAGS =
>
> -*_GCC5_IA32_NASM_FLAGS = -f elf32
>
> +*_GCC5_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>
>
>
> DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Os
>
> DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
>
> @@ -2348,7 +2348,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,
> *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
>
> *_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>
> *_GCC5_X64_OBJCOPY_FLAGS =
>
> -*_GCC5_X64_NASM_FLAGS = -f elf64
>
> +*_GCC5_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>
>
>
> DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO -Os
>
> DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
>
> @@ -2589,7 +2589,7 @@ DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNIN
> *_CLANG38_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
>
> *_CLANG38_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>
> *_CLANG38_IA32_OBJCOPY_FLAGS =
>
> -*_CLANG38_IA32_NASM_FLAGS = -f elf32
>
> +*_CLANG38_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>
> *_CLANG38_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
>
> *_CLANG38_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>
> *_CLANG38_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>
> @@ -2626,7 +2626,7 @@ NOOPT_CLANG38_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -O0
> *_CLANG38_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
>
> *_CLANG38_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>
> *_CLANG38_X64_OBJCOPY_FLAGS =
>
> -*_CLANG38_X64_NASM_FLAGS = -f elf64
>
> +*_CLANG38_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>
> *_CLANG38_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
>
> *_CLANG38_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
>
> *_CLANG38_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
>
> @@ -2777,7 +2777,7 @@ DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARN
> *_CLANGPDB_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32 -fno-lto DEF(CLANGPDB_IA32_TARGET)
>
> *_CLANGPDB_IA32_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m32 -march=i386 DEF(CLANGPDB_IA32_TARGET)
>
> *_CLANGPDB_IA32_OBJCOPY_FLAGS =
>
> -*_CLANGPDB_IA32_NASM_FLAGS = -f win32
>
> +*_CLANGPDB_IA32_NASM_FLAGS = -f win32 -DRODATA_SECTION_NAME=.rdata
>
> *_CLANGPDB_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>
> *_CLANGPDB_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>
> *_CLANGPDB_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>
> @@ -2811,7 +2811,7 @@ NOOPT_CLANGPDB_IA32_DLINK2_FLAGS =
> *_CLANGPDB_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64 -fno-lto DEF(CLANGPDB_X64_TARGET)
>
> *_CLANGPDB_X64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m64 DEF(CLANGPDB_X64_TARGET)
>
> *_CLANGPDB_X64_OBJCOPY_FLAGS =
>
> -*_CLANGPDB_X64_NASM_FLAGS = -f win64
>
> +*_CLANGPDB_X64_NASM_FLAGS = -f win64 -DRODATA_SECTION_NAME=.rdata
>
> *_CLANGPDB_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>
> *_CLANGPDB_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>
> *_CLANGPDB_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>
> @@ -2878,7 +2878,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
> *_CLANGDWARF_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
>
> *_CLANGDWARF_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>
> *_CLANGDWARF_IA32_OBJCOPY_FLAGS =
>
> -*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32
>
> +*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>
> *_CLANGDWARF_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
>
> *_CLANGDWARF_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>
> *_CLANGDWARF_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>
> @@ -2914,7 +2914,7 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -
> *_CLANGDWARF_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
>
> *_CLANGDWARF_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>
> *_CLANGDWARF_X64_OBJCOPY_FLAGS =
>
> -*_CLANGDWARF_X64_NASM_FLAGS = -f elf64
>
> +*_CLANGDWARF_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>
> *_CLANGDWARF_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
>
> *_CLANGDWARF_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
>
> *_CLANGDWARF_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
>
> @@ -2985,7 +2985,7 @@ RELEASE_XCODE5_IA32_DLINK_FLAGS = -arch i386 -u _$(IMAGE_ENTRY_POINT) -e _$
> DEBUG_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>
> NOOPT_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>
> RELEASE_XCODE5_IA32_ASM_FLAGS = -arch i386
>
> - *_XCODE5_IA32_NASM_FLAGS = -f macho32
>
> + *_XCODE5_IA32_NASM_FLAGS = -f macho32 -DRODATA_SECTION_NAME=.rodata
>
>
>
An EFI Mach-O file does not contain a .rodata section. A Mach-O contains a __DATA segment that is broken up into sections. For a typical EFI image there are __const, __data, __bss sections in the __DATA segment [1].
The mtoc [2] tool used to convert mach-O to PE/COFF converts the entire __DATA segment (__const, __data, and __bss) into the .data section. Thus adding any kind of new data section is a no-op at best.
If you want something to be read only for Xcode/clang you are better off putting it in the __TEXT section [3]. The __TEXT section is read only and for X64 can not even contain relocations.
[1] otool -lh DxeCore.dll
...
Load command 1
cmd LC_SEGMENT_64
cmdsize 312
segname __DATA
vmaddr 0x000000000002b000
vmsize 0x0000000000147000
fileoff 180224
filesize 8192
maxprot 0x00000003
initprot 0x00000003
nsects 3
flags 0x0
Section
sectname __const
segname __DATA
addr 0x000000000002b000
size 0x0000000000000718
offset 180224
align 2^4 (16)
reloff 0
nreloc 0
flags 0x00000000
reserved1 0
reserved2 0
Section
sectname __data
segname __DATA
addr 0x000000000002b720
size 0x00000000000014f0
offset 182048
align 2^4 (16)
reloff 0
nreloc 0
flags 0x00000000
reserved1 0
reserved2 0
Section
sectname __bss
segname __DATA
addr 0x000000000002cc10
size 0x0000000000144e11
offset 0
align 2^4 (16)
reloff 0
nreloc 0
flags 0x00000001
reserved1 0
reserved2 0
…
[2] https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html
[3] otool more output…
Load command 0
cmd LC_SEGMENT_64
cmdsize 392
segname __TEXT
vmaddr 0x0000000000000240
vmsize 0x00000000000296c0
fileoff 1184
filesize 169664
maxprot 0x00000005
initprot 0x00000005
nsects 4
flags 0x0
Section
sectname __text
segname __TEXT
addr 0x0000000000000240
size 0x000000000002489f
offset 1184
align 2^3 (8)
reloff 0
nreloc 0
flags 0x80000400
reserved1 0
reserved2 0
Section
sectname __cstring
segname __TEXT
addr 0x0000000000024ae0
size 0x000000000000496d
offset 150848
align 2^4 (16)
reloff 0
nreloc 0
flags 0x00000002
reserved1 0
reserved2 0
Section
sectname __ustring
segname __TEXT
addr 0x000000000002944e
size 0x0000000000000048
offset 169646
align 2^1 (2)
reloff 0
nreloc 0
flags 0x00000000
reserved1 0
reserved2 0
Section
sectname __const
segname __TEXT
addr 0x00000000000294a0
size 0x0000000000000448
offset 169728
align 2^4 (16)
reloff 0
nreloc 0
flags 0x00000000
reserved1 0
reserved2 0
Thanks,
Andrew Fish
>
>
> DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
>
> @@ -3003,7 +3003,7 @@ RELEASE_XCODE5_X64_DLINK_FLAGS = -arch x86_64 -u _$(IMAGE_ENTRY_POINT) -e _
> DEBUG_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>
> NOOPT_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>
> RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64
>
> - *_XCODE5_X64_NASM_FLAGS = -f macho64
>
> + *_XCODE5_X64_NASM_FLAGS = -f macho64 -DRODATA_SECTION_NAME=.rodata
>
> *_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h
>
> *_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include $(MODULE_NAME)StrDefs.h
>
>
>
> --
> 2.31.1
>
>
>
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 84762 bytes --]
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 2/2] UefiCpuPkg/BaseUefiCpuLib: Use toolchain-specific rodata section name
2021-08-10 2:43 ` Ni, Ray
@ 2021-08-10 4:40 ` Andrew Fish
2021-08-10 8:43 ` Marvin Häuser
0 siblings, 1 reply; 42+ messages in thread
From: Andrew Fish @ 2021-08-10 4:40 UTC (permalink / raw)
To: edk2-devel-groups-io, Ray Ni
Cc: Marvin Häuser, Dong, Eric, Kumar, Rahul1, Vitaly Cheptsov
[-- Attachment #1: Type: text/plain, Size: 5180 bytes --]
> On Aug 9, 2021, at 7:43 PM, Ni, Ray <ray.ni@intel.com> wrote:
>
> Acked-by: Ray Ni <ray.ni@intel.com <mailto:ray.ni@intel.com>>
>
> I will depend on tool owner to review the tool configuration change making sure that the correct section name is chosen for different C compilers.
>
Ray,
I made a detailed response about Mach-O with Xcode/clang and I don’t think patch works. Not sure if it breaks anything, but it puts things in the .data PE/COFF section.
I’m also worried it is broken for any toolchain that generates ELF and use GenFw. I don’t think the GenFw tool creates a PE/COFF .rodata section [1] so if things work they will end up in the .data section, or things might break? Some one who knows that tool better than me should take a detailed look.
I’m guessing it likely does the correct thing for toolchains that generate PE/COFF directly?
My vote is to not add this feature until we can prove it works properly on all the toolchains. For Xcode it may be easier to just dump this stuff in the .text section (see my other mail for more background). It looks like we might have to modify GenFw if we want to create a .rodata section?
It might be possible to cheat and use this concept to force code into the text section for ELF and Mach-O, but I’m not sure if that hits the correct security bar. But the last thing we want is to claim something is in a read only section when it is in a read write section.
[1] git grep CreateSectionHeader
BaseTools/Source/C/GenFw/Elf32Convert.c:602: CreateSectionHeader (".text", mTextOffset, mDataOffset - mTextOffset,
BaseTools/Source/C/GenFw/Elf32Convert.c:612: CreateSectionHeader (".data", mDataOffset, mHiiRsrcOffset - mDataOffset,
BaseTools/Source/C/GenFw/Elf32Convert.c:622: CreateSectionHeader (".rsrc", mHiiRsrcOffset, mRelocOffset - mHiiRsrcOffset,
BaseTools/Source/C/GenFw/Elf32Convert.c:1107: CreateSectionHeader (".reloc", mRelocOffset, mCoffOffset - mRelocOffset,
BaseTools/Source/C/GenFw/Elf64Convert.c:929: CreateSectionHeader (".text", mTextOffset, mDataOffset - mTextOffset,
BaseTools/Source/C/GenFw/Elf64Convert.c:939: CreateSectionHeader (".data", mDataOffset, mHiiRsrcOffset - mDataOffset,
BaseTools/Source/C/GenFw/Elf64Convert.c:949: CreateSectionHeader (".rsrc", mHiiRsrcOffset, mRelocOffset - mHiiRsrcOffset,
BaseTools/Source/C/GenFw/Elf64Convert.c:1641: CreateSectionHeader (".reloc", mRelocOffset, mCoffOffset - mRelocOffset,
BaseTools/Source/C/GenFw/ElfConvert.c:125:CreateSectionHeader (
BaseTools/Source/C/GenFw/ElfConvert.h:74:CreateSectionHeader (
Thanks,
Andrew Fish
> Thanks,
> Ray
>
>> -----Original Message-----
>> From: Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>
>> Sent: Monday, August 9, 2021 5:51 PM
>> To: devel@edk2.groups.io <mailto:devel@edk2.groups.io>
>> Cc: Dong, Eric <eric.dong@intel.com <mailto:eric.dong@intel.com>>; Ni, Ray <ray.ni@intel.com <mailto:ray.ni@intel.com>>; Kumar, Rahul1 <rahul1.kumar@intel.com <mailto:rahul1.kumar@intel.com>>; Vitaly Cheptsov
>> <vit9696@protonmail.com <mailto:vit9696@protonmail.com>>
>> Subject: [PATCH v2 2/2] UefiCpuPkg/BaseUefiCpuLib: Use toolchain-specific rodata section name
>>
>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3318
>>
>> Correctly define the read-only data sections with the
>> toolchain-specific section name. This hardens image permission
>> security and may save image space.
>>
>> Cc: Eric Dong <eric.dong@intel.com>
>> Cc: Ray Ni <ray.ni@intel.com>
>> Cc: Rahul Kumar <rahul1.kumar@intel.com>
>> Cc: Vitaly Cheptsov <vit9696@protonmail.com>
>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
>> ---
>> UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm | 2 +-
>> UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm | 2 +-
>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
>> b/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
>> index 5e27cc325012..cfb8bf4a5ae0 100644
>> --- a/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
>> +++ b/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
>> @@ -6,7 +6,7 @@
>> ;*
>>
>> ;------------------------------------------------------------------------------
>>
>>
>>
>> - SECTION .rodata
>>
>> + SECTION RODATA_SECTION_NAME
>>
>>
>>
>> ;
>>
>> ; Float control word initial value:
>>
>> diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
>> b/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
>> index 8485b4713548..3c976a21e391 100644
>> --- a/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
>> +++ b/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
>> @@ -6,7 +6,7 @@
>> ;*
>>
>> ;------------------------------------------------------------------------------
>>
>>
>>
>> - SECTION .rodata
>>
>> + SECTION RODATA_SECTION_NAME
>>
>> ;
>>
>> ; Float control word initial value:
>>
>> ; all exceptions masked, double-extended-precision, round-to-nearest
>>
>> --
>> 2.31.1
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 20742 bytes --]
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain
2021-08-10 4:19 ` [edk2-devel] [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain Andrew Fish
@ 2021-08-10 8:27 ` Marvin Häuser
2021-08-10 19:35 ` Andrew Fish
[not found] ` <169A090BBBBE12C1.15606@groups.io>
0 siblings, 2 replies; 42+ messages in thread
From: Marvin Häuser @ 2021-08-10 8:27 UTC (permalink / raw)
To: devel, afish; +Cc: Bob Feng, Liming Gao, Yuwei Chen, Vitaly Cheptsov
On 10/08/2021 06:19, Andrew Fish via groups.io wrote:
>
>
>> On Aug 9, 2021, at 2:51 AM, Marvin Häuser <mhaeuser@posteo.de
>> <mailto:mhaeuser@posteo.de>> wrote:
>>
>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3318
>> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>
>>
>> Different toolchains of the EDK II build system may generate ELF or
>> Mach-O files, which use the ".rodata" naming convention, or PE/COFF
>> files, which use the ".rdata" naming convention. Section permissions
>> are chosen based on this name per file format by NASM. To harden
>> image permission security, and to save space by avoiding both
>> ".rdata" and ".rodata" sections being emitted, expose the appropriate
>> name as a preprocessor constant.
>>
>> Cc: Bob Feng <bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>>
>> Cc: Liming Gao <gaoliming@byosoft.com.cn
>> <mailto:gaoliming@byosoft.com.cn>>
>> Cc: Yuwei Chen <yuwei.chen@intel.com <mailto:yuwei.chen@intel.com>>
>> Cc: Vitaly Cheptsov <vit9696@protonmail.com
>> <mailto:vit9696@protonmail.com>>
>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de
>> <mailto:mhaeuser@posteo.de>>
>> ---
>> BaseTools/Conf/tools_def.template | 172 ++++++++++----------
>> 1 file changed, 86 insertions(+), 86 deletions(-)
>>
>> diff --git a/BaseTools/Conf/tools_def.template
>> b/BaseTools/Conf/tools_def.template
>> index 2e6b382ab623..84d464916c4d 100755
>> --- a/BaseTools/Conf/tools_def.template
>> +++ b/BaseTools/Conf/tools_def.template
>> @@ -463,9 +463,9 @@ NOOPT_VS2008_IA32_CC_FLAGS = /nologo /c
>> /WX /GS- /W4 /Gs32768 /D UNICODE
>> RELEASE_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>
>> NOOPT_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g
>>
>> -RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
>>
>> -NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g
>>
>> + DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>
>> @@ -495,9 +495,9 @@ NOOPT_VS2008_X64_CC_FLAGS = /nologo /c /WX
>> /GS- /W4 /Gs32768 /D UNICODE /G
>> RELEASE_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>
>> NOOPT_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g
>>
>> -RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
>>
>> -NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g
>>
>> + DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001
>> /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001
>> /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER
>> /MERGE:.rdata=.data
>>
>> @@ -574,9 +574,9 @@ NOOPT_VS2008x86_IA32_CC_FLAGS = /nologo /c
>> /WX /GS- /W4 /Gs32768 /D UNICODE
>> RELEASE_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>
>> NOOPT_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>
>> -RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
>>
>> -NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>
>> + DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>
>> @@ -605,9 +605,9 @@ NOOPT_VS2008x86_X64_CC_FLAGS = /nologo /c
>> /WX /GS- /W4 /Gs32768 /D UNICODE
>> RELEASE_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>
>> NOOPT_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>
>> -RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
>>
>> -NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>
>> + DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>
>> @@ -688,9 +688,9 @@ NOOPT_VS2010_IA32_CC_FLAGS = /nologo /c
>> /WX /GS- /W4 /Gs32768 /D UNICODE
>> RELEASE_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>
>> NOOPT_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g
>>
>> -RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
>>
>> -NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g
>>
>> + DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>
>> @@ -720,9 +720,9 @@ NOOPT_VS2010_X64_CC_FLAGS = /nologo /c /WX
>> /GS- /W4 /Gs32768 /D UNICODE /G
>> RELEASE_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>
>> NOOPT_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g
>>
>> -RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
>>
>> -NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g
>>
>> + DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001
>> /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001
>> /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER
>> /MERGE:.rdata=.data
>>
>> @@ -799,9 +799,9 @@ NOOPT_VS2010x86_IA32_CC_FLAGS = /nologo /c
>> /WX /GS- /W4 /Gs32768 /D UNICODE
>> RELEASE_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>
>> NOOPT_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>
>> -RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
>>
>> -NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>
>> + DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>
>> @@ -831,9 +831,9 @@ NOOPT_VS2010x86_X64_CC_FLAGS = /nologo /c
>> /WX /GS- /W4 /Gs32768 /D UNICODE
>> RELEASE_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>
>> NOOPT_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>
>> -RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
>>
>> -NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>
>> + DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>
>> @@ -913,9 +913,9 @@ NOOPT_VS2012_IA32_CC_FLAGS = /nologo
>> /arch:IA32 /c /WX /GS- /W4 /Gs32768
>> RELEASE_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>
>> NOOPT_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g
>>
>> -RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
>>
>> -NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g
>>
>> + DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>
>> @@ -945,9 +945,9 @@ NOOPT_VS2012_X64_CC_FLAGS = /nologo /c /WX
>> /GS- /W4 /Gs32768 /D UNICODE /G
>> RELEASE_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>
>> NOOPT_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g
>>
>> -RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
>>
>> -NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g
>>
>> + DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001
>> /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001
>> /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER
>> /MERGE:.rdata=.data
>>
>> @@ -1024,9 +1024,9 @@ NOOPT_VS2012x86_IA32_CC_FLAGS = /nologo
>> /arch:IA32 /c /WX /GS- /W4 /Gs32768
>> RELEASE_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>
>> NOOPT_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>
>> -RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
>>
>> -NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>
>> + DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>
>> @@ -1056,9 +1056,9 @@ NOOPT_VS2012x86_X64_CC_FLAGS = /nologo /c
>> /WX /GS- /W4 /Gs32768 /D UNICODE
>> RELEASE_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>
>> NOOPT_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>
>> -RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
>>
>> -NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>
>> + DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>
>> @@ -1138,9 +1138,9 @@ NOOPT_VS2013_IA32_CC_FLAGS = /nologo
>> /arch:IA32 /c /WX /GS- /W4 /Gs32768
>> RELEASE_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>
>> NOOPT_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g
>>
>> -RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
>>
>> -NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g
>>
>> + DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>
>> @@ -1170,9 +1170,9 @@ NOOPT_VS2013_X64_CC_FLAGS = /nologo /c
>> /WX /GS- /W4 /Gs32768 /D UNICODE /G
>> RELEASE_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>
>> NOOPT_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g
>>
>> -RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
>>
>> -NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g
>>
>> + DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001
>> /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001
>> /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER
>> /MERGE:.rdata=.data
>>
>> @@ -1249,9 +1249,9 @@ NOOPT_VS2013x86_IA32_CC_FLAGS = /nologo
>> /arch:IA32 /c /WX /GS- /W4 /Gs32768
>> RELEASE_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>
>> NOOPT_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>
>> -RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
>>
>> -NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>
>> + DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>
>> @@ -1281,9 +1281,9 @@ NOOPT_VS2013x86_X64_CC_FLAGS = /nologo /c
>> /WX /GS- /W4 /Gs32768 /D UNICODE
>> RELEASE_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>
>> NOOPT_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>
>> -RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
>>
>> -NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>
>> + DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>
>> @@ -1364,9 +1364,9 @@ NOOPT_VS2015_IA32_CC_FLAGS = /nologo
>> /arch:IA32 /c /WX /GS- /W4 /Gs32768
>> RELEASE_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>
>> NOOPT_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g
>>
>> -RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32
>>
>> -NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g
>>
>> + DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>
>> @@ -1396,9 +1396,9 @@ NOOPT_VS2015_X64_CC_FLAGS = /nologo /c
>> /WX /GS- /W4 /Gs32768 /D UNICODE /G
>> RELEASE_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>
>> NOOPT_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g
>>
>> -RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64
>>
>> -NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
>>
>> + DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001
>> /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001
>> /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER
>> /MERGE:.rdata=.data
>>
>> @@ -1476,9 +1476,9 @@ NOOPT_VS2015x86_IA32_CC_FLAGS = /nologo
>> /arch:IA32 /c /WX /GS- /W4 /Gs32768
>> RELEASE_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>
>> NOOPT_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>
>> -RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32
>>
>> -NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>
>> + DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>
>> @@ -1508,9 +1508,9 @@ NOOPT_VS2015x86_X64_CC_FLAGS = /nologo /c
>> /WX /GS- /W4 /Gs32768 /D UNICODE
>> RELEASE_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>
>> NOOPT_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>
>> -RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64
>>
>> -NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>
>> + DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>
>> @@ -1586,9 +1586,9 @@ NOOPT_VS2017_IA32_CC_FLAGS = /nologo
>> /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>> RELEASE_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>
>> NOOPT_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
>>
>> -RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
>>
>> -NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
>>
>> + DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001
>> /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001
>> /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER
>> /MERGE:.rdata=.data
>>
>> @@ -1616,9 +1616,9 @@ NOOPT_VS2017_X64_CC_FLAGS = /nologo /c
>> /WX /GS- /W4 /Gs32768 /D UNICODE /G
>> RELEASE_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>
>> NOOPT_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
>>
>> -RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
>>
>> -NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
>>
>> + DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001
>> /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001
>> /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>
>> @@ -1744,9 +1744,9 @@ NOOPT_VS2019_IA32_CC_FLAGS = /nologo
>> /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>> RELEASE_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>
>> NOOPT_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g
>>
>> -RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32
>>
>> -NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g
>>
>> + DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001
>> /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001
>> /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER
>> /MERGE:.rdata=.data
>>
>> @@ -1774,9 +1774,9 @@ NOOPT_VS2019_X64_CC_FLAGS = /nologo /c
>> /WX /GS- /W4 /Gs32768 /D UNICODE /G
>> RELEASE_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>
>> NOOPT_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>
>>
>>
>> - DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g
>>
>> -RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64
>>
>> -NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g
>>
>> + DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64
>> -DRODATA_SECTION_NAME=.rdata
>>
>> +NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g
>> -DRODATA_SECTION_NAME=.rdata
>>
>>
>>
>> DEBUG_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001
>> /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>
>> RELEASE_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001
>> /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>
>> @@ -2030,7 +2030,7 @@ DEFINE GCC_PP_FLAGS = -E
>> -x assembler-with-cpp -include A
>> *_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
>>
>> *_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>
>> *_GCC48_IA32_OBJCOPY_FLAGS =
>>
>> -*_GCC48_IA32_NASM_FLAGS = -f elf32
>>
>> +*_GCC48_IA32_NASM_FLAGS = -f elf32
>> -DRODATA_SECTION_NAME=.rodata
>>
>>
>>
>> DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
>>
>> RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
>> -Wno-unused-but-set-variable
>>
>> @@ -2058,7 +2058,7 @@ RELEASE_GCC48_IA32_CC_FLAGS =
>> DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but
>> *_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
>>
>> *_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>
>> *_GCC48_X64_OBJCOPY_FLAGS =
>>
>> -*_GCC48_X64_NASM_FLAGS = -f elf64
>>
>> +*_GCC48_X64_NASM_FLAGS = -f elf64
>> -DRODATA_SECTION_NAME=.rodata
>>
>>
>>
>> DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
>>
>> RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
>> -Wno-unused-but-set-variable
>>
>> @@ -2170,7 +2170,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS =
>> DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
>> *_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
>>
>> *_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>
>> *_GCC49_IA32_OBJCOPY_FLAGS =
>>
>> -*_GCC49_IA32_NASM_FLAGS = -f elf32
>>
>> +*_GCC49_IA32_NASM_FLAGS = -f elf32
>> -DRODATA_SECTION_NAME=.rodata
>>
>>
>>
>> DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
>>
>> RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
>> -Wno-unused-but-set-variable -Wno-unused-const-variable
>>
>> @@ -2198,7 +2198,7 @@ RELEASE_GCC49_IA32_CC_FLAGS =
>> DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but
>> *_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
>>
>> *_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>
>> *_GCC49_X64_OBJCOPY_FLAGS =
>>
>> -*_GCC49_X64_NASM_FLAGS = -f elf64
>>
>> +*_GCC49_X64_NASM_FLAGS = -f elf64
>> -DRODATA_SECTION_NAME=.rodata
>>
>>
>>
>> DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
>>
>> RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
>> -Wno-unused-but-set-variable -Wno-unused-const-variable
>>
>> @@ -2316,7 +2316,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z
>> common-page-size=0x20
>> *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
>>
>> *_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>
>> *_GCC5_IA32_OBJCOPY_FLAGS =
>>
>> -*_GCC5_IA32_NASM_FLAGS = -f elf32
>>
>> +*_GCC5_IA32_NASM_FLAGS = -f elf32
>> -DRODATA_SECTION_NAME=.rodata
>>
>>
>>
>> DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Os
>>
>> DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS)
>> -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
>>
>> @@ -2348,7 +2348,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS =
>> DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,
>> *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
>>
>> *_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>
>> *_GCC5_X64_OBJCOPY_FLAGS =
>>
>> -*_GCC5_X64_NASM_FLAGS = -f elf64
>>
>> +*_GCC5_X64_NASM_FLAGS = -f elf64
>> -DRODATA_SECTION_NAME=.rodata
>>
>>
>>
>> DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto
>> -DUSING_LTO -Os
>>
>> DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
>>
>> @@ -2589,7 +2589,7 @@ DEFINE CLANG38_ALL_CC_FLAGS =
>> DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNIN
>> *_CLANG38_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32
>> -march=i386 DEF(CLANG38_IA32_TARGET)
>>
>> *_CLANG38_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>
>> *_CLANG38_IA32_OBJCOPY_FLAGS =
>>
>> -*_CLANG38_IA32_NASM_FLAGS = -f elf32
>>
>> +*_CLANG38_IA32_NASM_FLAGS = -f elf32
>> -DRODATA_SECTION_NAME=.rodata
>>
>> *_CLANG38_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS)
>> DEF(CLANG38_IA32_TARGET)
>>
>> *_CLANG38_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>> DEF(CLANG38_IA32_TARGET)
>>
>> *_CLANG38_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>> DEF(CLANG38_IA32_TARGET)
>>
>> @@ -2626,7 +2626,7 @@ NOOPT_CLANG38_IA32_DLINK2_FLAGS =
>> DEF(GCC5_IA32_DLINK2_FLAGS) -O0
>> *_CLANG38_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64
>> DEF(CLANG38_X64_TARGET)
>>
>> *_CLANG38_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>
>> *_CLANG38_X64_OBJCOPY_FLAGS =
>>
>> -*_CLANG38_X64_NASM_FLAGS = -f elf64
>>
>> +*_CLANG38_X64_NASM_FLAGS = -f elf64
>> -DRODATA_SECTION_NAME=.rodata
>>
>> *_CLANG38_X64_PP_FLAGS = DEF(GCC_PP_FLAGS)
>> DEF(CLANG38_X64_TARGET)
>>
>> *_CLANG38_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>> DEF(CLANG38_X64_TARGET)
>>
>> *_CLANG38_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>> DEF(CLANG38_X64_TARGET)
>>
>> @@ -2777,7 +2777,7 @@ DEFINE CLANGPDB_ALL_CC_FLAGS =
>> DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARN
>> *_CLANGPDB_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32
>> -fno-lto DEF(CLANGPDB_IA32_TARGET)
>>
>> *_CLANGPDB_IA32_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m32
>> -march=i386 DEF(CLANGPDB_IA32_TARGET)
>>
>> *_CLANGPDB_IA32_OBJCOPY_FLAGS =
>>
>> -*_CLANGPDB_IA32_NASM_FLAGS = -f win32
>>
>> +*_CLANGPDB_IA32_NASM_FLAGS = -f win32
>> -DRODATA_SECTION_NAME=.rdata
>>
>> *_CLANGPDB_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS)
>> DEF(CLANGPDB_IA32_TARGET)
>>
>> *_CLANGPDB_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>> DEF(CLANGPDB_IA32_TARGET)
>>
>> *_CLANGPDB_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>> DEF(CLANGPDB_IA32_TARGET)
>>
>> @@ -2811,7 +2811,7 @@ NOOPT_CLANGPDB_IA32_DLINK2_FLAGS =
>> *_CLANGPDB_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64
>> -fno-lto DEF(CLANGPDB_X64_TARGET)
>>
>> *_CLANGPDB_X64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m64
>> DEF(CLANGPDB_X64_TARGET)
>>
>> *_CLANGPDB_X64_OBJCOPY_FLAGS =
>>
>> -*_CLANGPDB_X64_NASM_FLAGS = -f win64
>>
>> +*_CLANGPDB_X64_NASM_FLAGS = -f win64
>> -DRODATA_SECTION_NAME=.rdata
>>
>> *_CLANGPDB_X64_PP_FLAGS = DEF(GCC_PP_FLAGS)
>> DEF(CLANGPDB_X64_TARGET)
>>
>> *_CLANGPDB_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>> DEF(CLANGPDB_X64_TARGET)
>>
>> *_CLANGPDB_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>> DEF(CLANGPDB_X64_TARGET)
>>
>> @@ -2878,7 +2878,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS =
>> -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
>> *_CLANGDWARF_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32
>> -march=i386 DEF(CLANG38_IA32_TARGET)
>>
>> *_CLANGDWARF_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>
>> *_CLANGDWARF_IA32_OBJCOPY_FLAGS =
>>
>> -*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32
>>
>> +*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32
>> -DRODATA_SECTION_NAME=.rodata
>>
>> *_CLANGDWARF_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS)
>> DEF(CLANG38_IA32_TARGET)
>>
>> *_CLANGDWARF_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>> DEF(CLANG38_IA32_TARGET)
>>
>> *_CLANGDWARF_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>> DEF(CLANG38_IA32_TARGET)
>>
>> @@ -2914,7 +2914,7 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS =
>> DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -
>> *_CLANGDWARF_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64
>> DEF(CLANG38_X64_TARGET)
>>
>> *_CLANGDWARF_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>
>> *_CLANGDWARF_X64_OBJCOPY_FLAGS =
>>
>> -*_CLANGDWARF_X64_NASM_FLAGS = -f elf64
>>
>> +*_CLANGDWARF_X64_NASM_FLAGS = -f elf64
>> -DRODATA_SECTION_NAME=.rodata
>>
>> *_CLANGDWARF_X64_PP_FLAGS = DEF(GCC_PP_FLAGS)
>> DEF(CLANG38_X64_TARGET)
>>
>> *_CLANGDWARF_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>> DEF(CLANG38_X64_TARGET)
>>
>> *_CLANGDWARF_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>> DEF(CLANG38_X64_TARGET)
>>
>> @@ -2985,7 +2985,7 @@ RELEASE_XCODE5_IA32_DLINK_FLAGS = -arch
>> i386 -u _$(IMAGE_ENTRY_POINT) -e _$
>> DEBUG_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>
>> NOOPT_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>
>> RELEASE_XCODE5_IA32_ASM_FLAGS = -arch i386
>>
>> - *_XCODE5_IA32_NASM_FLAGS = -f macho32
>>
>> + *_XCODE5_IA32_NASM_FLAGS = -f macho32
>> -DRODATA_SECTION_NAME=.rodata
>>
>>
>>
>
> An EFI Mach-O file does not contain a .rodata section. A Mach-O
> contains a __DATA segment that is broken up into sections. For a
> typical EFI image there are __const, __data, __bss sections in the
> __DATA segment [1].
Yes, and ".rodata" is almost a synonym for "__DATA,__const", with a
small exception [1]. Maybe it'd be clearer if the macro was renamed to
"NASM_RODATA_SECTION_NAME", to indicate this is not just a "raw" name,
but NASM gives it a semantic meaning?
>
> The mtoc [2] tool used to convert mach-O to PE/COFF converts the
> entire __DATA segment (__const, __data, and __bss) into the .data
> section. Thus adding any kind of new data section is a no-op at best.
This is a part I missed, because I do not have an Xcode toolchain at
hand, so thanks for investigating. However this, in my opinion, is a
flaw with Mach-O/mtoc and not with my patch. It seems like the only
difference between __TEXT,__const and __DATA,__const is whether the data
is targeted by a relocation or not. Such a concept does not exist for
PE/COFF (and I think not even for ELF, but I'm not too familiar with
it), thus the logical PE/COFF section __DATA,__const should be merged
into is .rdata (and .rdata may or may not be merged into .text in an
earlier step, I assume transitivity). I could change the macro
definition to explicitly declare __TEXT,__const, but that would still
put the compiler-emitted data in the wrong section. Does Xcode provide
anything remotely similar to GNU linker scripts which we can use to move
the section?
Please also note that .rodata is used for Xcode-based toolchains already
(in fact, all toolchains, and this is the issue), I'm not regressing
anything. I just expected it to work fine as-is. This patch mainly fixed
PE/COFF-based toolchains, which get both .rdata from the compiler and
.rodata with RX permissions from NASM, because ".rodata" only has a
semantic meaning for ELF and Mach-O outputs, but not for PE/COFF.
>
> If you want something to be read only for Xcode/clang you are better
> off putting it in the __TEXT section [3]. The __TEXT section is read
> only and for X64 can not even contain relocations.
Well, this kind of is an issue. We would need to introduce an arbitrary
constraint on the relocation part that holds only for Xcode-based
toolchains. Does the compiler emit an error when data in __TEXT,__const
is targeted by a relocation? Also see above regarding compiler-emitted
__DATA,__const.
Thanks for your notes and insight!
Best regards,
Marvin
[1]
"For compatibility with other Unix platforms, the following standard
names are also supported:
[...]
.rodata = __DATA,__const data
[...]
If the .rodata section contains no relocations, it is instead put into
the __TEXT,__const section unless this section has already been
specified explicitly."
https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html
>
> [1] otool -lh DxeCore.dll
> ...
> Load command 1
> cmd LC_SEGMENT_64
> cmdsize 312
> segname __DATA
> vmaddr 0x000000000002b000
> vmsize 0x0000000000147000
> fileoff 180224
> filesize 8192
> maxprot 0x00000003
> initprot 0x00000003
> nsects 3
> flags 0x0
> Section
> sectname __const
> segname __DATA
> addr 0x000000000002b000
> size 0x0000000000000718
> offset 180224
> align 2^4 (16)
> reloff 0
> nreloc 0
> flags 0x00000000
> reserved1 0
> reserved2 0
> Section
> sectname __data
> segname __DATA
> addr 0x000000000002b720
> size 0x00000000000014f0
> offset 182048
> align 2^4 (16)
> reloff 0
> nreloc 0
> flags 0x00000000
> reserved1 0
> reserved2 0
> Section
> sectname __bss
> segname __DATA
> addr 0x000000000002cc10
> size 0x0000000000144e11
> offset 0
> align 2^4 (16)
> reloff 0
> nreloc 0
> flags 0x00000001
> reserved1 0
> reserved2 0
> …
>
> [2]
> https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html
> <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html>
>
>
> [3] otool more output…
> Load command 0
> cmd LC_SEGMENT_64
> cmdsize 392
> segname __TEXT
> vmaddr 0x0000000000000240
> vmsize 0x00000000000296c0
> fileoff 1184
> filesize 169664
> maxprot 0x00000005
> initprot 0x00000005
> nsects 4
> flags 0x0
> Section
> sectname __text
> segname __TEXT
> addr 0x0000000000000240
> size 0x000000000002489f
> offset 1184
> align 2^3 (8)
> reloff 0
> nreloc 0
> flags 0x80000400
> reserved1 0
> reserved2 0
> Section
> sectname __cstring
> segname __TEXT
> addr 0x0000000000024ae0
> size 0x000000000000496d
> offset 150848
> align 2^4 (16)
> reloff 0
> nreloc 0
> flags 0x00000002
> reserved1 0
> reserved2 0
> Section
> sectname __ustring
> segname __TEXT
> addr 0x000000000002944e
> size 0x0000000000000048
> offset 169646
> align 2^1 (2)
> reloff 0
> nreloc 0
> flags 0x00000000
> reserved1 0
> reserved2 0
> Section
> sectname __const
> segname __TEXT
> addr 0x00000000000294a0
> size 0x0000000000000448
> offset 169728
> align 2^4 (16)
> reloff 0
> nreloc 0
> flags 0x00000000
> reserved1 0
> reserved2 0
>
> Thanks,
>
> Andrew Fish
>
>>
>>
>> DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os -Wall
>> -Werror -include AutoGen.h -funsigned-char -fno-stack-protector
>> -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic
>> -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter
>> -Wno-missing-braces -Wno-missing-field-initializers
>> -Wno-tautological-compare -Wno-sign-compare -Wno-varargs
>> -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang
>> $(PLATFORM_FLAGS)
>>
>> @@ -3003,7 +3003,7 @@ RELEASE_XCODE5_X64_DLINK_FLAGS = -arch
>> x86_64 -u _$(IMAGE_ENTRY_POINT) -e _
>> DEBUG_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>
>> NOOPT_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>
>> RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64
>>
>> - *_XCODE5_X64_NASM_FLAGS = -f macho64
>>
>> + *_XCODE5_X64_NASM_FLAGS = -f macho64 -DRODATA_SECTION_NAME=.rodata
>>
>> *_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h
>>
>> *_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include
>> $(MODULE_NAME)StrDefs.h
>>
>>
>>
>> --
>> 2.31.1
>>
>>
>>
>>
>>
>>
>>
>
>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 2/2] UefiCpuPkg/BaseUefiCpuLib: Use toolchain-specific rodata section name
2021-08-10 4:40 ` [edk2-devel] " Andrew Fish
@ 2021-08-10 8:43 ` Marvin Häuser
0 siblings, 0 replies; 42+ messages in thread
From: Marvin Häuser @ 2021-08-10 8:43 UTC (permalink / raw)
To: devel, afish, Ray Ni; +Cc: Dong, Eric, Kumar, Rahul1, Vitaly Cheptsov
On 10/08/2021 06:40, Andrew Fish via groups.io wrote:
>
>
>> On Aug 9, 2021, at 7:43 PM, Ni, Ray <ray.ni@intel.com
>> <mailto:ray.ni@intel.com>> wrote:
>>
>> Acked-by: Ray Ni <ray.ni@intel.com <mailto:ray.ni@intel.com>>
>>
>> I will depend on tool owner to review the tool configuration change
>> making sure that the correct section name is chosen for different C
>> compilers.
>>
>
> Ray,
>
> I made a detailed response about Mach-O with Xcode/clang and I don’t
> think patch works. Not sure if it breaks anything, but it puts things
> in the .data PE/COFF section.
The latter part is true only for Xcode-based toolchains, as far as I am
aware now, and this is in fact the way it works right now.
>
> I’m also worried it is broken for any toolchain that generates ELF and
> use GenFw. I don’t think the GenFw tool creates a PE/COFF .rodata
> section [1] so if things work they will end up in the .data section,
> or things might break? Some one who knows that tool better than me
> should take a detailed look.
You are correct, but the NASM section name semantically translates to an
*ELF* .rodata section for usage during linking. The GNU linker scripts
merge it into .text later [1], yielding no PE/COFF .rodata section as
observed.
>
> I’m guessing it likely does the correct thing for toolchains that
> generate PE/COFF directly?
Behaviour should be fixed for PE-based toolchains, preserved correct for
ELF-based toolchains (but inconsistent with PE-based, as we merge
.rodata into .text here), and as correct or broken for Xcode-based
toolchains as it was before.
>
> My vote is to not add this feature until we can prove it works
> properly on all the toolchains. For Xcode it may be easier to just
> dump this stuff in the .text section (see my other mail for more
> background).
If you can help with designing a solution, I'm more than happy to to
submit a V2. Just I don't know Xcode, and I don't run macOS. :)
> It looks like we might have to modify GenFw if we want to create a
> .rodata section?
For now, this patch un-breaks PE-based toolchains. They are broken in
the way described in the BZ, but not in a security-critical fashion.
Rather we have the worst of both worlds, the additional size of another
aligned section, and the downgraded permission as we would observe with
a merge into e.g. .text. I have no strong opinion on which route to
pick, i.e. dedicated .r(o)data or merging into .text, but I would like
it to be consistent in the end, especially across toolchains. Ideally,
in my opinion, the platform maintainer can choose whether they want the
extra protection (NX .rodata), or the extra space (.text merge).
>
> It might be possible to cheat and use this concept to force code into
> the text section for ELF and Mach-O, but I’m not sure if that hits the
> correct security bar. But the last thing we want is to claim something
> is in a read only section when it is in a read write section.
I can check again later, but ELF should be fine, really.
Best regards,
Marvin
[1]
https://github.com/tianocore/edk2/blob/d02dbb53cd78de799e6afaa237e98771fb5148db/BaseTools/Scripts/GccBase.lds#L25
>
> [1] git grep CreateSectionHeader
> BaseTools/Source/C/GenFw/Elf32Convert.c:602:*CreateSectionHeader*(".text",
> mTextOffset, mDataOffset - mTextOffset,
> BaseTools/Source/C/GenFw/Elf32Convert.c:612:*CreateSectionHeader*(".data",
> mDataOffset, mHiiRsrcOffset - mDataOffset,
> BaseTools/Source/C/GenFw/Elf32Convert.c:622:*CreateSectionHeader*(".rsrc",
> mHiiRsrcOffset, mRelocOffset - mHiiRsrcOffset,
> BaseTools/Source/C/GenFw/Elf32Convert.c:1107:*CreateSectionHeader*(".reloc",
> mRelocOffset, mCoffOffset - mRelocOffset,
> BaseTools/Source/C/GenFw/Elf64Convert.c:929:*CreateSectionHeader*(".text",
> mTextOffset, mDataOffset - mTextOffset,
> BaseTools/Source/C/GenFw/Elf64Convert.c:939:*CreateSectionHeader*(".data",
> mDataOffset, mHiiRsrcOffset - mDataOffset,
> BaseTools/Source/C/GenFw/Elf64Convert.c:949:*CreateSectionHeader*(".rsrc",
> mHiiRsrcOffset, mRelocOffset - mHiiRsrcOffset,
> BaseTools/Source/C/GenFw/Elf64Convert.c:1641:*CreateSectionHeader*(".reloc",
> mRelocOffset, mCoffOffset - mRelocOffset,
> BaseTools/Source/C/GenFw/ElfConvert.c:125:*CreateSectionHeader*(
> BaseTools/Source/C/GenFw/ElfConvert.h:74:*CreateSectionHeader*(
>
> Thanks,
>
> Andrew Fish
>
>> Thanks,
>> Ray
>>
>>> -----Original Message-----
>>> From: Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>
>>> Sent: Monday, August 9, 2021 5:51 PM
>>> To:devel@edk2.groups.io <mailto:devel@edk2.groups.io>
>>> Cc: Dong, Eric <eric.dong@intel.com <mailto:eric.dong@intel.com>>;
>>> Ni, Ray <ray.ni@intel.com <mailto:ray.ni@intel.com>>; Kumar, Rahul1
>>> <rahul1.kumar@intel.com <mailto:rahul1.kumar@intel.com>>; Vitaly
>>> Cheptsov
>>> <vit9696@protonmail.com <mailto:vit9696@protonmail.com>>
>>> Subject: [PATCH v2 2/2] UefiCpuPkg/BaseUefiCpuLib: Use
>>> toolchain-specific rodata section name
>>>
>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3318
>>> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>
>>>
>>> Correctly define the read-only data sections with the
>>> toolchain-specific section name. This hardens image permission
>>> security and may save image space.
>>>
>>> Cc: Eric Dong <eric.dong@intel.com <mailto:eric.dong@intel.com>>
>>> Cc: Ray Ni <ray.ni@intel.com <mailto:ray.ni@intel.com>>
>>> Cc: Rahul Kumar <rahul1.kumar@intel.com <mailto:rahul1.kumar@intel.com>>
>>> Cc: Vitaly Cheptsov <vit9696@protonmail.com
>>> <mailto:vit9696@protonmail.com>>
>>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de
>>> <mailto:mhaeuser@posteo.de>>
>>> ---
>>> UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm | 2 +-
>>> UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm | 2 +-
>>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
>>> b/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
>>> index 5e27cc325012..cfb8bf4a5ae0 100644
>>> --- a/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
>>> +++ b/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
>>> @@ -6,7 +6,7 @@
>>> ;*
>>>
>>> ;------------------------------------------------------------------------------
>>>
>>>
>>>
>>> - SECTION .rodata
>>>
>>> + SECTION RODATA_SECTION_NAME
>>>
>>>
>>>
>>> ;
>>>
>>> ; Float control word initial value:
>>>
>>> diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
>>> b/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
>>> index 8485b4713548..3c976a21e391 100644
>>> --- a/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
>>> +++ b/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
>>> @@ -6,7 +6,7 @@
>>> ;*
>>>
>>> ;------------------------------------------------------------------------------
>>>
>>>
>>>
>>> - SECTION .rodata
>>>
>>> + SECTION RODATA_SECTION_NAME
>>>
>>> ;
>>>
>>> ; Float control word initial value:
>>>
>>> ; all exceptions masked, double-extended-precision, round-to-nearest
>>>
>>> --
>>> 2.31.1
>>
>>
>>
>
>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/2] MdePkg/BaseLib: Fix unaligned API prototypes
2021-08-09 21:32 ` [edk2-devel] " Andrew Fish
@ 2021-08-10 8:53 ` Marvin Häuser
2021-08-10 17:36 ` Andrew Fish
0 siblings, 1 reply; 42+ messages in thread
From: Marvin Häuser @ 2021-08-10 8:53 UTC (permalink / raw)
To: devel, afish, Mike Kinney; +Cc: Liming Gao, Liu, Zhiguang, Vitaly Cheptsov
On 09/08/2021 23:32, Andrew Fish via groups.io wrote:
>
>
>> On Aug 9, 2021, at 9:15 AM, Michael D Kinney
>> <michael.d.kinney@intel.com <mailto:michael.d.kinney@intel.com>> wrote:
>>
>> Hi Marvin,
>>
>> Can you provide an example of which C compiler is flagging this as
>> an error and what error message is generated.
>>
>> Please enter a BZ with this background information and add link to the
>> BZ in the commit message.
>>
>> This is a change to the BaseLib class, so we need to make sure there
>> are no impacts to any existing code. I looks like a safe change
>> because changing from a pointer to a fixed size type to VOID *
>> should be compatible. Please add that analysis to the background
>> in the BZ as well.
>>
>
> MIke,
>
> I want to say we had a discussion about this years ago? I don’t
> remember the outcome.
>
> Dereferencing a misaligned pointer is UB (Undefined Behavior) in C
> [1], but historically x86 compilers have let it slide.
>
> I think the situation we are in is the BaseLib functions don’t contain
> UB, but it is UB for the caller to use the returned pointer directly.
They do contain UB, inherently from the combination of their prototype
and their usage.
Please refer to the new BZ added for V2:
https://bugzilla.tianocore.org/show_bug.cgi?id=3542
I could only speculate why UBsan does not check cast safety...
To be fair, I don't know a real-world platform that has issues with this
UB, but the fix is simple enough in my opinion.
Actually, enabling "-Wcast-align" some day would be great either way. :)
Best regards,
Marvin
>
> Here is a simple example with clang UndefinedBehaviorSanitizer (UBSan) .
>
> ~/work/Compiler>cat ub.c
> #include <stdlib.h>
>
> #define EFIAPI
> #define IN
> #define OUT
>
> typedef unsigned char UINT8;
> typedef unsigned short UINT16;
>
> UINT16
> EFIAPI
> WriteUnaligned16 (
> OUT UINT16 *Buffer,
> IN UINT16 Value
> )
> {
> // ASSERT (Buffer != NULL);
>
> ((volatile UINT8*)Buffer)[0] = (UINT8)Value;
> ((volatile UINT8*)Buffer)[1] = (UINT8)(Value >> 8);
>
> return Value;
> }
>
>
> int main()
> {
> UINT8 *buffer = malloc(64);
> UINT16 *pointer = (UINT16 *)(buffer + 1);
>
>
> WriteUnaligned16 (pointer, 42);
>
>
> // *pointer = 42; // Error: misaligned integer pointer assignment
> return *pointer;
> }
> ~/work/Compiler>clang -fsanitize=undefined ub.c
> ~/work/Compiler>./a.out
> *ub.c:34:9:**runtime error: **load of misaligned address
> 0x7feac6405aa1 for type 'UINT16' (aka 'unsigned short'), which
> requires 2 byte alignment*
> *0x7feac6405aa1: note: *pointer points here
> 00 00 00 64 2a 00 79 6d 28 52 54 4c 44 5f 44 45 46 41 55 4c 54 2c
> 20 73 77 69 66 74 5f 64 65 6d
> * ^ *
> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ub.c:34:9 in
>
> FYI line 39 is `return *pointer`and 42 is 0x2A. So reading an writing
> to *pointer is UB.
>
>
> As you can see in [1] the general advice is to take code that looks like:
> int8_t *buffer = malloc(64);int32_t *pointer = (int32_t *)(buffer +
> 1);*pointer = 42; // Error: misaligned integer pointer assignment
> And replace it with;
> int8_t *buffer = malloc(64);int32_t value = 42;memcpy(buffer + 1,
> &value, sizeof(int32_t)); // Correct
>
> But in these cases the result is in a byte aligned buffer….
>
> [1] https://developer.apple.com/documentation/xcode/misaligned-pointer
> <https://developer.apple.com/documentation/xcode/misaligned-pointer>
>
> Thanks,
>
> Andrew Fish
>
>> Thanks,
>>
>> Mike
>>
>>
>>> -----Original Message-----
>>> From: Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>
>>> Sent: Monday, August 9, 2021 2:51 AM
>>> To:devel@edk2.groups.io <mailto:devel@edk2.groups.io>
>>> Cc: Kinney, Michael D <michael.d.kinney@intel.com
>>> <mailto:michael.d.kinney@intel.com>>; Liming Gao
>>> <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>>; Liu,
>>> Zhiguang
>>> <zhiguang.liu@intel.com <mailto:zhiguang.liu@intel.com>>; Vitaly
>>> Cheptsov <vit9696@protonmail.com <mailto:vit9696@protonmail.com>>
>>> Subject: [PATCH v2 1/2] MdePkg/BaseLib: Fix unaligned API prototypes
>>>
>>> C prohibits not only dereferencing but also casting to unaligned
>>> pointers. Thus, the current set of unaligned APIs cannot be called
>>> safely. Update their prototypes to take VOID * pointers, which must
>>> be able to represent any valid pointer.
>>>
>>> Cc: Michael D Kinney <michael.d.kinney@intel.com
>>> <mailto:michael.d.kinney@intel.com>>
>>> Cc: Liming Gao <gaoliming@byosoft.com.cn
>>> <mailto:gaoliming@byosoft.com.cn>>
>>> Cc: Zhiguang Liu <zhiguang.liu@intel.com
>>> <mailto:zhiguang.liu@intel.com>>
>>> Cc: Vitaly Cheptsov <vit9696@protonmail.com
>>> <mailto:vit9696@protonmail.com>>
>>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de
>>> <mailto:mhaeuser@posteo.de>>
>>> ---
>>> MdePkg/Library/BaseLib/Arm/Unaligned.c | 14 ++++-----
>>> MdePkg/Library/BaseLib/Unaligned.c | 32 ++++++++++----------
>>> MdePkg/Include/Library/BaseLib.h | 16 +++++-----
>>> 3 files changed, 31 insertions(+), 31 deletions(-)
>>>
>>> diff --git a/MdePkg/Library/BaseLib/Arm/Unaligned.c
>>> b/MdePkg/Library/BaseLib/Arm/Unaligned.c
>>> index e9934e7003cb..57f19fc44e0b 100644
>>> --- a/MdePkg/Library/BaseLib/Arm/Unaligned.c
>>> +++ b/MdePkg/Library/BaseLib/Arm/Unaligned.c
>>> @@ -59,7 +59,7 @@ ReadUnaligned16 (
>>> UINT16
>>>
>>> EFIAPI
>>>
>>> WriteUnaligned16 (
>>>
>>> - OUT UINT16 *Buffer,
>>>
>>> + OUT VOID *Buffer,
>>>
>>> IN UINT16 Value
>>>
>>> )
>>>
>>> {
>>>
>>> @@ -87,7 +87,7 @@ WriteUnaligned16 (
>>> UINT32
>>>
>>> EFIAPI
>>>
>>> ReadUnaligned24 (
>>>
>>> - IN CONST UINT32 *Buffer
>>>
>>> + IN CONST VOID *Buffer
>>>
>>> )
>>>
>>> {
>>>
>>> ASSERT (Buffer != NULL);
>>>
>>> @@ -116,7 +116,7 @@ ReadUnaligned24 (
>>> UINT32
>>>
>>> EFIAPI
>>>
>>> WriteUnaligned24 (
>>>
>>> - OUT UINT32 *Buffer,
>>>
>>> + OUT VOID *Buffer,
>>>
>>> IN UINT32 Value
>>>
>>> )
>>>
>>> {
>>>
>>> @@ -143,7 +143,7 @@ WriteUnaligned24 (
>>> UINT32
>>>
>>> EFIAPI
>>>
>>> ReadUnaligned32 (
>>>
>>> - IN CONST UINT32 *Buffer
>>>
>>> + IN CONST VOID *Buffer
>>>
>>> )
>>>
>>> {
>>>
>>> UINT16 LowerBytes;
>>>
>>> @@ -175,7 +175,7 @@ ReadUnaligned32 (
>>> UINT32
>>>
>>> EFIAPI
>>>
>>> WriteUnaligned32 (
>>>
>>> - OUT UINT32 *Buffer,
>>>
>>> + OUT VOID *Buffer,
>>>
>>> IN UINT32 Value
>>>
>>> )
>>>
>>> {
>>>
>>> @@ -202,7 +202,7 @@ WriteUnaligned32 (
>>> UINT64
>>>
>>> EFIAPI
>>>
>>> ReadUnaligned64 (
>>>
>>> - IN CONST UINT64 *Buffer
>>>
>>> + IN CONST VOID *Buffer
>>>
>>> )
>>>
>>> {
>>>
>>> UINT32 LowerBytes;
>>>
>>> @@ -234,7 +234,7 @@ ReadUnaligned64 (
>>> UINT64
>>>
>>> EFIAPI
>>>
>>> WriteUnaligned64 (
>>>
>>> - OUT UINT64 *Buffer,
>>>
>>> + OUT VOID *Buffer,
>>>
>>> IN UINT64 Value
>>>
>>> )
>>>
>>> {
>>>
>>> diff --git a/MdePkg/Library/BaseLib/Unaligned.c
>>> b/MdePkg/Library/BaseLib/Unaligned.c
>>> index a419cb85e53c..3041adcde606 100644
>>> --- a/MdePkg/Library/BaseLib/Unaligned.c
>>> +++ b/MdePkg/Library/BaseLib/Unaligned.c
>>> @@ -26,12 +26,12 @@
>>> UINT16
>>>
>>> EFIAPI
>>>
>>> ReadUnaligned16 (
>>>
>>> - IN CONST UINT16 *Buffer
>>>
>>> + IN CONST VOID *Buffer
>>>
>>> )
>>>
>>> {
>>>
>>> ASSERT (Buffer != NULL);
>>>
>>>
>>>
>>> - return *Buffer;
>>>
>>> + return *(CONST UINT16 *) Buffer;
>>>
>>> }
>>>
>>>
>>>
>>> /**
>>>
>>> @@ -52,13 +52,13 @@ ReadUnaligned16 (
>>> UINT16
>>>
>>> EFIAPI
>>>
>>> WriteUnaligned16 (
>>>
>>> - OUT UINT16 *Buffer,
>>>
>>> + OUT VOID *Buffer,
>>>
>>> IN UINT16 Value
>>>
>>> )
>>>
>>> {
>>>
>>> ASSERT (Buffer != NULL);
>>>
>>>
>>>
>>> - return *Buffer = Value;
>>>
>>> + return *(UINT16 *) Buffer = Value;
>>>
>>> }
>>>
>>>
>>>
>>> /**
>>>
>>> @@ -77,12 +77,12 @@ WriteUnaligned16 (
>>> UINT32
>>>
>>> EFIAPI
>>>
>>> ReadUnaligned24 (
>>>
>>> - IN CONST UINT32 *Buffer
>>>
>>> + IN CONST VOID *Buffer
>>>
>>> )
>>>
>>> {
>>>
>>> ASSERT (Buffer != NULL);
>>>
>>>
>>>
>>> - return *Buffer & 0xffffff;
>>>
>>> + return *(CONST UINT32 *) Buffer & 0xffffff;
>>>
>>> }
>>>
>>>
>>>
>>> /**
>>>
>>> @@ -103,13 +103,13 @@ ReadUnaligned24 (
>>> UINT32
>>>
>>> EFIAPI
>>>
>>> WriteUnaligned24 (
>>>
>>> - OUT UINT32 *Buffer,
>>>
>>> + OUT VOID *Buffer,
>>>
>>> IN UINT32 Value
>>>
>>> )
>>>
>>> {
>>>
>>> ASSERT (Buffer != NULL);
>>>
>>>
>>>
>>> - *Buffer = BitFieldWrite32 (*Buffer, 0, 23, Value);
>>>
>>> + *(UINT32 *) Buffer = BitFieldWrite32 (*(CONST UINT32 *) Buffer,
>>> 0, 23, Value);
>>>
>>> return Value;
>>>
>>> }
>>>
>>>
>>>
>>> @@ -129,12 +129,12 @@ WriteUnaligned24 (
>>> UINT32
>>>
>>> EFIAPI
>>>
>>> ReadUnaligned32 (
>>>
>>> - IN CONST UINT32 *Buffer
>>>
>>> + IN CONST VOID *Buffer
>>>
>>> )
>>>
>>> {
>>>
>>> ASSERT (Buffer != NULL);
>>>
>>>
>>>
>>> - return *Buffer;
>>>
>>> + return *(CONST UINT32 *) Buffer;
>>>
>>> }
>>>
>>>
>>>
>>> /**
>>>
>>> @@ -155,13 +155,13 @@ ReadUnaligned32 (
>>> UINT32
>>>
>>> EFIAPI
>>>
>>> WriteUnaligned32 (
>>>
>>> - OUT UINT32 *Buffer,
>>>
>>> + OUT VOID *Buffer,
>>>
>>> IN UINT32 Value
>>>
>>> )
>>>
>>> {
>>>
>>> ASSERT (Buffer != NULL);
>>>
>>>
>>>
>>> - return *Buffer = Value;
>>>
>>> + return *(UINT32 *) Buffer = Value;
>>>
>>> }
>>>
>>>
>>>
>>> /**
>>>
>>> @@ -180,12 +180,12 @@ WriteUnaligned32 (
>>> UINT64
>>>
>>> EFIAPI
>>>
>>> ReadUnaligned64 (
>>>
>>> - IN CONST UINT64 *Buffer
>>>
>>> + IN CONST VOID *Buffer
>>>
>>> )
>>>
>>> {
>>>
>>> ASSERT (Buffer != NULL);
>>>
>>>
>>>
>>> - return *Buffer;
>>>
>>> + return *(CONST UINT64 *) Buffer;
>>>
>>> }
>>>
>>>
>>>
>>> /**
>>>
>>> @@ -206,11 +206,11 @@ ReadUnaligned64 (
>>> UINT64
>>>
>>> EFIAPI
>>>
>>> WriteUnaligned64 (
>>>
>>> - OUT UINT64 *Buffer,
>>>
>>> + OUT VOID *Buffer,
>>>
>>> IN UINT64 Value
>>>
>>> )
>>>
>>> {
>>>
>>> ASSERT (Buffer != NULL);
>>>
>>>
>>>
>>> - return *Buffer = Value;
>>>
>>> + return *(UINT64 *) Buffer = Value;
>>>
>>> }
>>>
>>> diff --git a/MdePkg/Include/Library/BaseLib.h
>>> b/MdePkg/Include/Library/BaseLib.h
>>> index 2452c1d92e51..4d30f0539c6b 100644
>>> --- a/MdePkg/Include/Library/BaseLib.h
>>> +++ b/MdePkg/Include/Library/BaseLib.h
>>> @@ -3420,7 +3420,7 @@ DivS64x64Remainder (
>>> UINT16
>>>
>>> EFIAPI
>>>
>>> ReadUnaligned16 (
>>>
>>> - IN CONST UINT16 *Buffer
>>>
>>> + IN CONST VOID *Buffer
>>>
>>> );
>>>
>>>
>>>
>>>
>>>
>>> @@ -3442,7 +3442,7 @@ ReadUnaligned16 (
>>> UINT16
>>>
>>> EFIAPI
>>>
>>> WriteUnaligned16 (
>>>
>>> - OUT UINT16 *Buffer,
>>>
>>> + OUT VOID *Buffer,
>>>
>>> IN UINT16 Value
>>>
>>> );
>>>
>>>
>>>
>>> @@ -3463,7 +3463,7 @@ WriteUnaligned16 (
>>> UINT32
>>>
>>> EFIAPI
>>>
>>> ReadUnaligned24 (
>>>
>>> - IN CONST UINT32 *Buffer
>>>
>>> + IN CONST VOID *Buffer
>>>
>>> );
>>>
>>>
>>>
>>>
>>>
>>> @@ -3485,7 +3485,7 @@ ReadUnaligned24 (
>>> UINT32
>>>
>>> EFIAPI
>>>
>>> WriteUnaligned24 (
>>>
>>> - OUT UINT32 *Buffer,
>>>
>>> + OUT VOID *Buffer,
>>>
>>> IN UINT32 Value
>>>
>>> );
>>>
>>>
>>>
>>> @@ -3506,7 +3506,7 @@ WriteUnaligned24 (
>>> UINT32
>>>
>>> EFIAPI
>>>
>>> ReadUnaligned32 (
>>>
>>> - IN CONST UINT32 *Buffer
>>>
>>> + IN CONST VOID *Buffer
>>>
>>> );
>>>
>>>
>>>
>>>
>>>
>>> @@ -3528,7 +3528,7 @@ ReadUnaligned32 (
>>> UINT32
>>>
>>> EFIAPI
>>>
>>> WriteUnaligned32 (
>>>
>>> - OUT UINT32 *Buffer,
>>>
>>> + OUT VOID *Buffer,
>>>
>>> IN UINT32 Value
>>>
>>> );
>>>
>>>
>>>
>>> @@ -3549,7 +3549,7 @@ WriteUnaligned32 (
>>> UINT64
>>>
>>> EFIAPI
>>>
>>> ReadUnaligned64 (
>>>
>>> - IN CONST UINT64 *Buffer
>>>
>>> + IN CONST VOID *Buffer
>>>
>>> );
>>>
>>>
>>>
>>>
>>>
>>> @@ -3571,7 +3571,7 @@ ReadUnaligned64 (
>>> UINT64
>>>
>>> EFIAPI
>>>
>>> WriteUnaligned64 (
>>>
>>> - OUT UINT64 *Buffer,
>>>
>>> + OUT VOID *Buffer,
>>>
>>> IN UINT64 Value
>>>
>>> );
>>>
>>>
>>>
>>> --
>>> 2.31.1
>>
>>
>>
>
>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/2] MdePkg/BaseLib: Fix unaligned API prototypes
2021-08-10 8:53 ` Marvin Häuser
@ 2021-08-10 17:36 ` Andrew Fish
2021-08-10 21:14 ` Marvin Häuser
0 siblings, 1 reply; 42+ messages in thread
From: Andrew Fish @ 2021-08-10 17:36 UTC (permalink / raw)
To: Marvin Häuser
Cc: devel, Mike Kinney, Liming Gao, Liu, Zhiguang, Vitaly Cheptsov
[-- Attachment #1: Type: text/plain, Size: 19828 bytes --]
> On Aug 10, 2021, at 1:53 AM, Marvin Häuser <mhaeuser@posteo.de> wrote:
>
> On 09/08/2021 23:32, Andrew Fish via groups.io <http://groups.io/> wrote:
>>
>>
>>> On Aug 9, 2021, at 9:15 AM, Michael D Kinney <michael.d.kinney@intel.com <mailto:michael.d.kinney@intel.com> <mailto:michael.d.kinney@intel.com <mailto:michael.d.kinney@intel.com>>> wrote:
>>>
>>> Hi Marvin,
>>>
>>> Can you provide an example of which C compiler is flagging this as
>>> an error and what error message is generated.
>>>
>>> Please enter a BZ with this background information and add link to the
>>> BZ in the commit message.
>>>
>>> This is a change to the BaseLib class, so we need to make sure there
>>> are no impacts to any existing code. I looks like a safe change
>>> because changing from a pointer to a fixed size type to VOID *
>>> should be compatible. Please add that analysis to the background
>>> in the BZ as well.
>>>
>>
>> MIke,
>>
>> I want to say we had a discussion about this years ago? I don’t remember the outcome.
>>
>> Dereferencing a misaligned pointer is UB (Undefined Behavior) in C [1], but historically x86 compilers have let it slide.
>>
>> I think the situation we are in is the BaseLib functions don’t contain UB, but it is UB for the caller to use the returned pointer directly.
>
> They do contain UB, inherently from the combination of their prototype and their usage.
> Please refer to the new BZ added for V2: https://bugzilla.tianocore.org/show_bug.cgi?id=3542 <https://bugzilla.tianocore.org/show_bug.cgi?id=3542>
>
I think we are saying the same thing. My point is it is possible to use the library API correctly, but likely no one does. Changing the API to a VOID also does not fix every issue, actually it is a drop in to existing code so it does not really force any fixes...
> I could only speculate why UBsan does not check cast safety...
> To be fair, I don't know a real-world platform that has issues with this UB, but the fix is simple enough in my opinion.
>
Cast is compile time UB, not runtime. UBSan is doing runtime checks. You can catch compile time UB with warnings. I've have had way too many talks with the clang folks about UB and firmware :).
> Actually, enabling "-Wcast-align" some day would be great either way. :)
>
In my example this gets you past the -Wcast-align. We have the same type of casts for the size of pointers and casting through UINTN.
UINT16 *pointer = (UINT16 *)(void *)(buffer+1);
Actually I’m starting to remember why we chose not to fix this before. It does not really help…. Notice if we change the API to use `VOID *` vs. `UINT16 *` nothing really changed [1] ? It is still up to the caller to do the right thing. The real issue is the functions are not really useful given strict UB in C….
A better solution is to just tell the compiler this pointer is not aligned, and at that point you DON'T need the lib functions….
This code passes -Wcast-align and -fsanitize=undefined runtime checks:
typedef UINT16 UUINT16 __attribute__ ((aligned (1)));
int main()
{
UINT8 *buffer = malloc(64);
UUINT16 *pointer = (UUINT16 *)(buffer+1);
*pointer = 42;
return *pointer;
}
So a better solution maybe to defined unaligned basic types? I’m not sure if __declspec(align(1)) does the right thing for VC++, __attribute__ ((aligned (1))); does the right thing for GCC and clang. Assuming this works we could defined unaligned version of our basic types, and over time obsolete the current alignment lib functions. We could start with a warning comment to use the unaligned types vs. current library functions.
I’m thinking for the types in ProcessorBind.h[2] and Base.h[3] we could have a byte aligned versions. For example given UINT16 we add UUINT16 to Base.h. I guess we could also look into a #define abstraction for ` __attribute__ ((aligned (1)))` so new could could use that in a portable way?
Just to be clear if we define UUINT16 then the compiler will do the the work of WriteUnaligned16() in the code generation, if it is needed by the CPU arch. Given that it is much harder for the coder to “mess it up”.
Actually I changed my mind I think we will want to keep the Unaligned library functions, but update them to use the unaligned pointers. The reason we need the function is the compiler is generating code that follow the rules of the CPU, so we need the library functions to talk to hardware devices that have stricter alignment rules than the CPU. For example on x86 UUINT16 will end up being a word operation in assembler. This is the reason the current lib functions use volatile. Sorry figuring this out as I type. So looks like we need to add unaligned types and update the libs to use those types? For memory operations you can use the new unaligned types, and for hardware access use the lib functions.
[1] ~/work/Compiler>cat ub.c
#include <stdlib.h>
#define EFIAPI
#define IN
#define OUT
#define VOID void
typedef unsigned char UINT8;
typedef unsigned short UINT16;
UINT16
EFIAPI
WriteUnaligned16 (
OUT VOID *Buffer,
IN UINT16 Value
)
{
// ASSERT (Buffer != NULL);
((volatile UINT8*)Buffer)[0] = (UINT8)Value;
((volatile UINT8*)Buffer)[1] = (UINT8)(Value >> 8);
return Value;
}
int main()
{
UINT8 *buffer = malloc(64);
UINT16 *pointer = (UINT16 *)(void *)(buffer+1);
WriteUnaligned16 (pointer, 42);
// *pointer = 42; // Error: misaligned integer pointer assignment
return *pointer;
}
~/work/Compiler>clang -fsanitize=undefined -Wcast-align ub.c
~/work/Compiler>./a.out
ub.c:35:9: runtime error: load of misaligned address 0x7fdd9d405aa1 for type 'UINT16' (aka 'unsigned short'), which requires 2 byte alignment
0x7fdd9d405aa1: note: pointer points here
00 00 00 64 2a 00 79 6d 28 52 54 4c 44 5f 44 45 46 41 55 4c 54 2c 20 73 77 69 66 74 5f 64 65 6d
^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ub.c:35:9 in
~/work/Compiler>
[2] https://github.com/tianocore/edk2/blob/master/MdePkg/Include/X64/ProcessorBind.h#L127
[3] https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Base.h
Thanks,
Andrew Fish
> Best regards,
> Marvin
>
>>
>> Here is a simple example with clang UndefinedBehaviorSanitizer (UBSan) .
>>
>> ~/work/Compiler>cat ub.c
>> #include <stdlib.h>
>>
>> #define EFIAPI
>> #define IN
>> #define OUT
>>
>> typedef unsigned char UINT8;
>> typedef unsigned short UINT16;
>>
>> UINT16
>> EFIAPI
>> WriteUnaligned16 (
>> OUT UINT16 *Buffer,
>> IN UINT16 Value
>> )
>> {
>> // ASSERT (Buffer != NULL);
>>
>> ((volatile UINT8*)Buffer)[0] = (UINT8)Value;
>> ((volatile UINT8*)Buffer)[1] = (UINT8)(Value >> 8);
>>
>> return Value;
>> }
>>
>>
>> int main()
>> {
>> UINT8 *buffer = malloc(64);
>> UINT16 *pointer = (UINT16 *)(buffer + 1);
>>
>>
>> WriteUnaligned16 (pointer, 42);
>>
>>
>> // *pointer = 42; // Error: misaligned integer pointer assignment
>> return *pointer;
>> }
>> ~/work/Compiler>clang -fsanitize=undefined ub.c
>> ~/work/Compiler>./a.out
>> *ub.c:34:9:**runtime error: **load of misaligned address 0x7feac6405aa1 for type 'UINT16' (aka 'unsigned short'), which requires 2 byte alignment*
>> *0x7feac6405aa1: note: *pointer points here
>> 00 00 00 64 2a 00 79 6d 28 52 54 4c 44 5f 44 45 46 41 55 4c 54 2c 20 73 77 69 66 74 5f 64 65 6d
>> * ^ *
>> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ub.c:34:9 in
>>
>> FYI line 39 is `return *pointer`and 42 is 0x2A. So reading an writing to *pointer is UB.
>>
>>
>> As you can see in [1] the general advice is to take code that looks like:
>> int8_t *buffer = malloc(64);int32_t *pointer = (int32_t *)(buffer + 1);*pointer = 42; // Error: misaligned integer pointer assignment
>> And replace it with;
>> int8_t *buffer = malloc(64);int32_t value = 42;memcpy(buffer + 1, &value, sizeof(int32_t)); // Correct
>>
>> But in these cases the result is in a byte aligned buffer….
>>
>> [1] https://developer.apple.com/documentation/xcode/misaligned-pointer <https://developer.apple.com/documentation/xcode/misaligned-pointer> <https://developer.apple.com/documentation/xcode/misaligned-pointer <https://developer.apple.com/documentation/xcode/misaligned-pointer>>
>>
>> Thanks,
>>
>> Andrew Fish
>>
>>> Thanks,
>>>
>>> Mike
>>>
>>>
>>>> -----Original Message-----
>>>> From: Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>>
>>>> Sent: Monday, August 9, 2021 2:51 AM
>>>> To:devel@edk2.groups.io <mailto:devel@edk2.groups.io> <mailto:devel@edk2.groups.io <mailto:devel@edk2.groups.io>>
>>>> Cc: Kinney, Michael D <michael.d.kinney@intel.com <mailto:michael.d.kinney@intel.com> <mailto:michael.d.kinney@intel.com <mailto:michael.d.kinney@intel.com>>>; Liming Gao <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> <mailto:gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>>>; Liu, Zhiguang
>>>> <zhiguang.liu@intel.com <mailto:zhiguang.liu@intel.com> <mailto:zhiguang.liu@intel.com <mailto:zhiguang.liu@intel.com>>>; Vitaly Cheptsov <vit9696@protonmail.com <mailto:vit9696@protonmail.com> <mailto:vit9696@protonmail.com <mailto:vit9696@protonmail.com>>>
>>>> Subject: [PATCH v2 1/2] MdePkg/BaseLib: Fix unaligned API prototypes
>>>>
>>>> C prohibits not only dereferencing but also casting to unaligned
>>>> pointers. Thus, the current set of unaligned APIs cannot be called
>>>> safely. Update their prototypes to take VOID * pointers, which must
>>>> be able to represent any valid pointer.
>>>>
>>>> Cc: Michael D Kinney <michael.d.kinney@intel.com <mailto:michael.d.kinney@intel.com> <mailto:michael.d.kinney@intel.com <mailto:michael.d.kinney@intel.com>>>
>>>> Cc: Liming Gao <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> <mailto:gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>>>
>>>> Cc: Zhiguang Liu <zhiguang.liu@intel.com <mailto:zhiguang.liu@intel.com> <mailto:zhiguang.liu@intel.com <mailto:zhiguang.liu@intel.com>>>
>>>> Cc: Vitaly Cheptsov <vit9696@protonmail.com <mailto:vit9696@protonmail.com> <mailto:vit9696@protonmail.com <mailto:vit9696@protonmail.com>>>
>>>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>>
>>>> ---
>>>> MdePkg/Library/BaseLib/Arm/Unaligned.c | 14 ++++-----
>>>> MdePkg/Library/BaseLib/Unaligned.c | 32 ++++++++++----------
>>>> MdePkg/Include/Library/BaseLib.h | 16 +++++-----
>>>> 3 files changed, 31 insertions(+), 31 deletions(-)
>>>>
>>>> diff --git a/MdePkg/Library/BaseLib/Arm/Unaligned.c b/MdePkg/Library/BaseLib/Arm/Unaligned.c
>>>> index e9934e7003cb..57f19fc44e0b 100644
>>>> --- a/MdePkg/Library/BaseLib/Arm/Unaligned.c
>>>> +++ b/MdePkg/Library/BaseLib/Arm/Unaligned.c
>>>> @@ -59,7 +59,7 @@ ReadUnaligned16 (
>>>> UINT16
>>>>
>>>> EFIAPI
>>>>
>>>> WriteUnaligned16 (
>>>>
>>>> - OUT UINT16 *Buffer,
>>>>
>>>> + OUT VOID *Buffer,
>>>>
>>>> IN UINT16 Value
>>>>
>>>> )
>>>>
>>>> {
>>>>
>>>> @@ -87,7 +87,7 @@ WriteUnaligned16 (
>>>> UINT32
>>>>
>>>> EFIAPI
>>>>
>>>> ReadUnaligned24 (
>>>>
>>>> - IN CONST UINT32 *Buffer
>>>>
>>>> + IN CONST VOID *Buffer
>>>>
>>>> )
>>>>
>>>> {
>>>>
>>>> ASSERT (Buffer != NULL);
>>>>
>>>> @@ -116,7 +116,7 @@ ReadUnaligned24 (
>>>> UINT32
>>>>
>>>> EFIAPI
>>>>
>>>> WriteUnaligned24 (
>>>>
>>>> - OUT UINT32 *Buffer,
>>>>
>>>> + OUT VOID *Buffer,
>>>>
>>>> IN UINT32 Value
>>>>
>>>> )
>>>>
>>>> {
>>>>
>>>> @@ -143,7 +143,7 @@ WriteUnaligned24 (
>>>> UINT32
>>>>
>>>> EFIAPI
>>>>
>>>> ReadUnaligned32 (
>>>>
>>>> - IN CONST UINT32 *Buffer
>>>>
>>>> + IN CONST VOID *Buffer
>>>>
>>>> )
>>>>
>>>> {
>>>>
>>>> UINT16 LowerBytes;
>>>>
>>>> @@ -175,7 +175,7 @@ ReadUnaligned32 (
>>>> UINT32
>>>>
>>>> EFIAPI
>>>>
>>>> WriteUnaligned32 (
>>>>
>>>> - OUT UINT32 *Buffer,
>>>>
>>>> + OUT VOID *Buffer,
>>>>
>>>> IN UINT32 Value
>>>>
>>>> )
>>>>
>>>> {
>>>>
>>>> @@ -202,7 +202,7 @@ WriteUnaligned32 (
>>>> UINT64
>>>>
>>>> EFIAPI
>>>>
>>>> ReadUnaligned64 (
>>>>
>>>> - IN CONST UINT64 *Buffer
>>>>
>>>> + IN CONST VOID *Buffer
>>>>
>>>> )
>>>>
>>>> {
>>>>
>>>> UINT32 LowerBytes;
>>>>
>>>> @@ -234,7 +234,7 @@ ReadUnaligned64 (
>>>> UINT64
>>>>
>>>> EFIAPI
>>>>
>>>> WriteUnaligned64 (
>>>>
>>>> - OUT UINT64 *Buffer,
>>>>
>>>> + OUT VOID *Buffer,
>>>>
>>>> IN UINT64 Value
>>>>
>>>> )
>>>>
>>>> {
>>>>
>>>> diff --git a/MdePkg/Library/BaseLib/Unaligned.c b/MdePkg/Library/BaseLib/Unaligned.c
>>>> index a419cb85e53c..3041adcde606 100644
>>>> --- a/MdePkg/Library/BaseLib/Unaligned.c
>>>> +++ b/MdePkg/Library/BaseLib/Unaligned.c
>>>> @@ -26,12 +26,12 @@
>>>> UINT16
>>>>
>>>> EFIAPI
>>>>
>>>> ReadUnaligned16 (
>>>>
>>>> - IN CONST UINT16 *Buffer
>>>>
>>>> + IN CONST VOID *Buffer
>>>>
>>>> )
>>>>
>>>> {
>>>>
>>>> ASSERT (Buffer != NULL);
>>>>
>>>>
>>>>
>>>> - return *Buffer;
>>>>
>>>> + return *(CONST UINT16 *) Buffer;
>>>>
>>>> }
>>>>
>>>>
>>>>
>>>> /**
>>>>
>>>> @@ -52,13 +52,13 @@ ReadUnaligned16 (
>>>> UINT16
>>>>
>>>> EFIAPI
>>>>
>>>> WriteUnaligned16 (
>>>>
>>>> - OUT UINT16 *Buffer,
>>>>
>>>> + OUT VOID *Buffer,
>>>>
>>>> IN UINT16 Value
>>>>
>>>> )
>>>>
>>>> {
>>>>
>>>> ASSERT (Buffer != NULL);
>>>>
>>>>
>>>>
>>>> - return *Buffer = Value;
>>>>
>>>> + return *(UINT16 *) Buffer = Value;
>>>>
>>>> }
>>>>
>>>>
>>>>
>>>> /**
>>>>
>>>> @@ -77,12 +77,12 @@ WriteUnaligned16 (
>>>> UINT32
>>>>
>>>> EFIAPI
>>>>
>>>> ReadUnaligned24 (
>>>>
>>>> - IN CONST UINT32 *Buffer
>>>>
>>>> + IN CONST VOID *Buffer
>>>>
>>>> )
>>>>
>>>> {
>>>>
>>>> ASSERT (Buffer != NULL);
>>>>
>>>>
>>>>
>>>> - return *Buffer & 0xffffff;
>>>>
>>>> + return *(CONST UINT32 *) Buffer & 0xffffff;
>>>>
>>>> }
>>>>
>>>>
>>>>
>>>> /**
>>>>
>>>> @@ -103,13 +103,13 @@ ReadUnaligned24 (
>>>> UINT32
>>>>
>>>> EFIAPI
>>>>
>>>> WriteUnaligned24 (
>>>>
>>>> - OUT UINT32 *Buffer,
>>>>
>>>> + OUT VOID *Buffer,
>>>>
>>>> IN UINT32 Value
>>>>
>>>> )
>>>>
>>>> {
>>>>
>>>> ASSERT (Buffer != NULL);
>>>>
>>>>
>>>>
>>>> - *Buffer = BitFieldWrite32 (*Buffer, 0, 23, Value);
>>>>
>>>> + *(UINT32 *) Buffer = BitFieldWrite32 (*(CONST UINT32 *) Buffer, 0, 23, Value);
>>>>
>>>> return Value;
>>>>
>>>> }
>>>>
>>>>
>>>>
>>>> @@ -129,12 +129,12 @@ WriteUnaligned24 (
>>>> UINT32
>>>>
>>>> EFIAPI
>>>>
>>>> ReadUnaligned32 (
>>>>
>>>> - IN CONST UINT32 *Buffer
>>>>
>>>> + IN CONST VOID *Buffer
>>>>
>>>> )
>>>>
>>>> {
>>>>
>>>> ASSERT (Buffer != NULL);
>>>>
>>>>
>>>>
>>>> - return *Buffer;
>>>>
>>>> + return *(CONST UINT32 *) Buffer;
>>>>
>>>> }
>>>>
>>>>
>>>>
>>>> /**
>>>>
>>>> @@ -155,13 +155,13 @@ ReadUnaligned32 (
>>>> UINT32
>>>>
>>>> EFIAPI
>>>>
>>>> WriteUnaligned32 (
>>>>
>>>> - OUT UINT32 *Buffer,
>>>>
>>>> + OUT VOID *Buffer,
>>>>
>>>> IN UINT32 Value
>>>>
>>>> )
>>>>
>>>> {
>>>>
>>>> ASSERT (Buffer != NULL);
>>>>
>>>>
>>>>
>>>> - return *Buffer = Value;
>>>>
>>>> + return *(UINT32 *) Buffer = Value;
>>>>
>>>> }
>>>>
>>>>
>>>>
>>>> /**
>>>>
>>>> @@ -180,12 +180,12 @@ WriteUnaligned32 (
>>>> UINT64
>>>>
>>>> EFIAPI
>>>>
>>>> ReadUnaligned64 (
>>>>
>>>> - IN CONST UINT64 *Buffer
>>>>
>>>> + IN CONST VOID *Buffer
>>>>
>>>> )
>>>>
>>>> {
>>>>
>>>> ASSERT (Buffer != NULL);
>>>>
>>>>
>>>>
>>>> - return *Buffer;
>>>>
>>>> + return *(CONST UINT64 *) Buffer;
>>>>
>>>> }
>>>>
>>>>
>>>>
>>>> /**
>>>>
>>>> @@ -206,11 +206,11 @@ ReadUnaligned64 (
>>>> UINT64
>>>>
>>>> EFIAPI
>>>>
>>>> WriteUnaligned64 (
>>>>
>>>> - OUT UINT64 *Buffer,
>>>>
>>>> + OUT VOID *Buffer,
>>>>
>>>> IN UINT64 Value
>>>>
>>>> )
>>>>
>>>> {
>>>>
>>>> ASSERT (Buffer != NULL);
>>>>
>>>>
>>>>
>>>> - return *Buffer = Value;
>>>>
>>>> + return *(UINT64 *) Buffer = Value;
>>>>
>>>> }
>>>>
>>>> diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h
>>>> index 2452c1d92e51..4d30f0539c6b 100644
>>>> --- a/MdePkg/Include/Library/BaseLib.h
>>>> +++ b/MdePkg/Include/Library/BaseLib.h
>>>> @@ -3420,7 +3420,7 @@ DivS64x64Remainder (
>>>> UINT16
>>>>
>>>> EFIAPI
>>>>
>>>> ReadUnaligned16 (
>>>>
>>>> - IN CONST UINT16 *Buffer
>>>>
>>>> + IN CONST VOID *Buffer
>>>>
>>>> );
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> @@ -3442,7 +3442,7 @@ ReadUnaligned16 (
>>>> UINT16
>>>>
>>>> EFIAPI
>>>>
>>>> WriteUnaligned16 (
>>>>
>>>> - OUT UINT16 *Buffer,
>>>>
>>>> + OUT VOID *Buffer,
>>>>
>>>> IN UINT16 Value
>>>>
>>>> );
>>>>
>>>>
>>>>
>>>> @@ -3463,7 +3463,7 @@ WriteUnaligned16 (
>>>> UINT32
>>>>
>>>> EFIAPI
>>>>
>>>> ReadUnaligned24 (
>>>>
>>>> - IN CONST UINT32 *Buffer
>>>>
>>>> + IN CONST VOID *Buffer
>>>>
>>>> );
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> @@ -3485,7 +3485,7 @@ ReadUnaligned24 (
>>>> UINT32
>>>>
>>>> EFIAPI
>>>>
>>>> WriteUnaligned24 (
>>>>
>>>> - OUT UINT32 *Buffer,
>>>>
>>>> + OUT VOID *Buffer,
>>>>
>>>> IN UINT32 Value
>>>>
>>>> );
>>>>
>>>>
>>>>
>>>> @@ -3506,7 +3506,7 @@ WriteUnaligned24 (
>>>> UINT32
>>>>
>>>> EFIAPI
>>>>
>>>> ReadUnaligned32 (
>>>>
>>>> - IN CONST UINT32 *Buffer
>>>>
>>>> + IN CONST VOID *Buffer
>>>>
>>>> );
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> @@ -3528,7 +3528,7 @@ ReadUnaligned32 (
>>>> UINT32
>>>>
>>>> EFIAPI
>>>>
>>>> WriteUnaligned32 (
>>>>
>>>> - OUT UINT32 *Buffer,
>>>>
>>>> + OUT VOID *Buffer,
>>>>
>>>> IN UINT32 Value
>>>>
>>>> );
>>>>
>>>>
>>>>
>>>> @@ -3549,7 +3549,7 @@ WriteUnaligned32 (
>>>> UINT64
>>>>
>>>> EFIAPI
>>>>
>>>> ReadUnaligned64 (
>>>>
>>>> - IN CONST UINT64 *Buffer
>>>>
>>>> + IN CONST VOID *Buffer
>>>>
>>>> );
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> @@ -3571,7 +3571,7 @@ ReadUnaligned64 (
>>>> UINT64
>>>>
>>>> EFIAPI
>>>>
>>>> WriteUnaligned64 (
>>>>
>>>> - OUT UINT64 *Buffer,
>>>>
>>>> + OUT VOID *Buffer,
>>>>
>>>> IN UINT64 Value
>>>>
>>>> );
>>>>
>>>>
>>>>
>>>> --
>>>> 2.31.1
>>>
>>>
>>>
>>
>>
[-- Attachment #2: Type: text/html, Size: 54325 bytes --]
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain
2021-08-10 8:27 ` Marvin Häuser
@ 2021-08-10 19:35 ` Andrew Fish
2021-08-10 21:30 ` Marvin Häuser
[not found] ` <169A090BBBBE12C1.15606@groups.io>
1 sibling, 1 reply; 42+ messages in thread
From: Andrew Fish @ 2021-08-10 19:35 UTC (permalink / raw)
To: Marvin Häuser
Cc: edk2-devel-groups-io, Bob Feng, Liming Gao, Yuwei Chen,
Vitaly Cheptsov
[-- Attachment #1: Type: text/plain, Size: 52419 bytes --]
> On Aug 10, 2021, at 1:27 AM, Marvin Häuser <mhaeuser@posteo.de> wrote:
>
> On 10/08/2021 06:19, Andrew Fish via groups.io wrote:
>>
>>
>>> On Aug 9, 2021, at 2:51 AM, Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>> wrote:
>>>
>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3318 <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>
>>>
>>> Different toolchains of the EDK II build system may generate ELF or
>>> Mach-O files, which use the ".rodata" naming convention, or PE/COFF
>>> files, which use the ".rdata" naming convention. Section permissions
>>> are chosen based on this name per file format by NASM. To harden
>>> image permission security, and to save space by avoiding both
>>> ".rdata" and ".rodata" sections being emitted, expose the appropriate
>>> name as a preprocessor constant.
>>>
>>> Cc: Bob Feng <bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>>
>>> Cc: Liming Gao <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>>
>>> Cc: Yuwei Chen <yuwei.chen@intel.com <mailto:yuwei.chen@intel.com>>
>>> Cc: Vitaly Cheptsov <vit9696@protonmail.com <mailto:vit9696@protonmail.com>>
>>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>
>>> ---
>>> BaseTools/Conf/tools_def.template | 172 ++++++++++----------
>>> 1 file changed, 86 insertions(+), 86 deletions(-)
>>>
>>> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
>>> index 2e6b382ab623..84d464916c4d 100755
>>> --- a/BaseTools/Conf/tools_def.template
>>> +++ b/BaseTools/Conf/tools_def.template
>>> @@ -463,9 +463,9 @@ NOOPT_VS2008_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>> RELEASE_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>
>>> NOOPT_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>
>>> -RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
>>>
>>> -NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>
>>> + DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -495,9 +495,9 @@ NOOPT_VS2008_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>> RELEASE_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>
>>> NOOPT_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g
>>>
>>> -RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
>>>
>>> -NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g
>>>
>>> + DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -574,9 +574,9 @@ NOOPT_VS2008x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>> RELEASE_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>
>>> NOOPT_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>
>>> -RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
>>>
>>> -NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>
>>> + DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -605,9 +605,9 @@ NOOPT_VS2008x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>> RELEASE_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>
>>> NOOPT_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>
>>> -RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
>>>
>>> -NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>
>>> + DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -688,9 +688,9 @@ NOOPT_VS2010_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>> RELEASE_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>
>>> NOOPT_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>
>>> -RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
>>>
>>> -NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>
>>> + DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -720,9 +720,9 @@ NOOPT_VS2010_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>> RELEASE_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>
>>> NOOPT_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g
>>>
>>> -RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
>>>
>>> -NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g
>>>
>>> + DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -799,9 +799,9 @@ NOOPT_VS2010x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>> RELEASE_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>
>>> NOOPT_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>
>>> -RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
>>>
>>> -NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>
>>> + DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -831,9 +831,9 @@ NOOPT_VS2010x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>> RELEASE_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>
>>> NOOPT_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>
>>> -RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
>>>
>>> -NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>
>>> + DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -913,9 +913,9 @@ NOOPT_VS2012_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>> RELEASE_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>
>>> NOOPT_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>
>>> -RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
>>>
>>> -NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>
>>> + DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -945,9 +945,9 @@ NOOPT_VS2012_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>> RELEASE_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>
>>> NOOPT_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g
>>>
>>> -RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
>>>
>>> -NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g
>>>
>>> + DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -1024,9 +1024,9 @@ NOOPT_VS2012x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>> RELEASE_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>
>>> NOOPT_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>
>>> -RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
>>>
>>> -NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>
>>> + DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -1056,9 +1056,9 @@ NOOPT_VS2012x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>> RELEASE_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>
>>> NOOPT_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>
>>> -RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
>>>
>>> -NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>
>>> + DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -1138,9 +1138,9 @@ NOOPT_VS2013_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>> RELEASE_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>
>>> NOOPT_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>
>>> -RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
>>>
>>> -NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>
>>> + DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -1170,9 +1170,9 @@ NOOPT_VS2013_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>> RELEASE_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>
>>> NOOPT_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g
>>>
>>> -RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
>>>
>>> -NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g
>>>
>>> + DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -1249,9 +1249,9 @@ NOOPT_VS2013x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>> RELEASE_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>
>>> NOOPT_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>
>>> -RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
>>>
>>> -NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>
>>> + DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -1281,9 +1281,9 @@ NOOPT_VS2013x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>> RELEASE_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>
>>> NOOPT_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>
>>> -RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
>>>
>>> -NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>
>>> + DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -1364,9 +1364,9 @@ NOOPT_VS2015_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>> RELEASE_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>
>>> NOOPT_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>
>>> -RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32
>>>
>>> -NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>
>>> + DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -1396,9 +1396,9 @@ NOOPT_VS2015_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>> RELEASE_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>
>>> NOOPT_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g
>>>
>>> -RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64
>>>
>>> -NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
>>>
>>> + DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -1476,9 +1476,9 @@ NOOPT_VS2015x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>> RELEASE_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>
>>> NOOPT_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>
>>> -RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32
>>>
>>> -NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>
>>> + DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -1508,9 +1508,9 @@ NOOPT_VS2015x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>> RELEASE_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>
>>> NOOPT_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>
>>> -RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64
>>>
>>> -NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>
>>> + DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -1586,9 +1586,9 @@ NOOPT_VS2017_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>> RELEASE_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>
>>> NOOPT_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>
>>> -RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
>>>
>>> -NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>
>>> + DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -1616,9 +1616,9 @@ NOOPT_VS2017_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>> RELEASE_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>
>>> NOOPT_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
>>>
>>> -RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
>>>
>>> -NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
>>>
>>> + DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -1744,9 +1744,9 @@ NOOPT_VS2019_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>> RELEASE_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>
>>> NOOPT_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>
>>> -RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32
>>>
>>> -NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>
>>> + DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -1774,9 +1774,9 @@ NOOPT_VS2019_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>> RELEASE_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>
>>> NOOPT_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>
>>>
>>>
>>> - DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g
>>>
>>> -RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64
>>>
>>> -NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g
>>>
>>> + DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>> +RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>
>>> +NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>
>>>
>>>
>>> DEBUG_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>
>>> RELEASE_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>
>>> @@ -2030,7 +2030,7 @@ DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include A
>>> *_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
>>>
>>> *_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>
>>> *_GCC48_IA32_OBJCOPY_FLAGS =
>>>
>>> -*_GCC48_IA32_NASM_FLAGS = -f elf32
>>>
>>> +*_GCC48_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>
>>>
>>>
>>> DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
>>>
>>> RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable
>>>
>>> @@ -2058,7 +2058,7 @@ RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but
>>> *_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
>>>
>>> *_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>
>>> *_GCC48_X64_OBJCOPY_FLAGS =
>>>
>>> -*_GCC48_X64_NASM_FLAGS = -f elf64
>>>
>>> +*_GCC48_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>
>>>
>>>
>>> DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
>>>
>>> RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable
>>>
>>> @@ -2170,7 +2170,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
>>> *_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
>>>
>>> *_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>
>>> *_GCC49_IA32_OBJCOPY_FLAGS =
>>>
>>> -*_GCC49_IA32_NASM_FLAGS = -f elf32
>>>
>>> +*_GCC49_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>
>>>
>>>
>>> DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
>>>
>>> RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>
>>> @@ -2198,7 +2198,7 @@ RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but
>>> *_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
>>>
>>> *_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>
>>> *_GCC49_X64_OBJCOPY_FLAGS =
>>>
>>> -*_GCC49_X64_NASM_FLAGS = -f elf64
>>>
>>> +*_GCC49_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>
>>>
>>>
>>> DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
>>>
>>> RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>
>>> @@ -2316,7 +2316,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
>>> *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
>>>
>>> *_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>
>>> *_GCC5_IA32_OBJCOPY_FLAGS =
>>>
>>> -*_GCC5_IA32_NASM_FLAGS = -f elf32
>>>
>>> +*_GCC5_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>
>>>
>>>
>>> DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Os
>>>
>>> DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
>>>
>>> @@ -2348,7 +2348,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,
>>> *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
>>>
>>> *_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>
>>> *_GCC5_X64_OBJCOPY_FLAGS =
>>>
>>> -*_GCC5_X64_NASM_FLAGS = -f elf64
>>>
>>> +*_GCC5_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>
>>>
>>>
>>> DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO -Os
>>>
>>> DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
>>>
>>> @@ -2589,7 +2589,7 @@ DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNIN
>>> *_CLANG38_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
>>>
>>> *_CLANG38_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>
>>> *_CLANG38_IA32_OBJCOPY_FLAGS =
>>>
>>> -*_CLANG38_IA32_NASM_FLAGS = -f elf32
>>>
>>> +*_CLANG38_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>
>>> *_CLANG38_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>
>>> *_CLANG38_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>
>>> *_CLANG38_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>
>>> @@ -2626,7 +2626,7 @@ NOOPT_CLANG38_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -O0
>>> *_CLANG38_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
>>>
>>> *_CLANG38_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>
>>> *_CLANG38_X64_OBJCOPY_FLAGS =
>>>
>>> -*_CLANG38_X64_NASM_FLAGS = -f elf64
>>>
>>> +*_CLANG38_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>
>>> *_CLANG38_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>
>>> *_CLANG38_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>
>>> *_CLANG38_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>
>>> @@ -2777,7 +2777,7 @@ DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARN
>>> *_CLANGPDB_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32 -fno-lto DEF(CLANGPDB_IA32_TARGET)
>>>
>>> *_CLANGPDB_IA32_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m32 -march=i386 DEF(CLANGPDB_IA32_TARGET)
>>>
>>> *_CLANGPDB_IA32_OBJCOPY_FLAGS =
>>>
>>> -*_CLANGPDB_IA32_NASM_FLAGS = -f win32
>>>
>>> +*_CLANGPDB_IA32_NASM_FLAGS = -f win32 -DRODATA_SECTION_NAME=.rdata
>>>
>>> *_CLANGPDB_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>
>>> *_CLANGPDB_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>
>>> *_CLANGPDB_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>
>>> @@ -2811,7 +2811,7 @@ NOOPT_CLANGPDB_IA32_DLINK2_FLAGS =
>>> *_CLANGPDB_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64 -fno-lto DEF(CLANGPDB_X64_TARGET)
>>>
>>> *_CLANGPDB_X64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m64 DEF(CLANGPDB_X64_TARGET)
>>>
>>> *_CLANGPDB_X64_OBJCOPY_FLAGS =
>>>
>>> -*_CLANGPDB_X64_NASM_FLAGS = -f win64
>>>
>>> +*_CLANGPDB_X64_NASM_FLAGS = -f win64 -DRODATA_SECTION_NAME=.rdata
>>>
>>> *_CLANGPDB_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>
>>> *_CLANGPDB_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>
>>> *_CLANGPDB_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>
>>> @@ -2878,7 +2878,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
>>> *_CLANGDWARF_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
>>>
>>> *_CLANGDWARF_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>
>>> *_CLANGDWARF_IA32_OBJCOPY_FLAGS =
>>>
>>> -*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32
>>>
>>> +*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>
>>> *_CLANGDWARF_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>
>>> *_CLANGDWARF_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>
>>> *_CLANGDWARF_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>
>>> @@ -2914,7 +2914,7 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -
>>> *_CLANGDWARF_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
>>>
>>> *_CLANGDWARF_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>
>>> *_CLANGDWARF_X64_OBJCOPY_FLAGS =
>>>
>>> -*_CLANGDWARF_X64_NASM_FLAGS = -f elf64
>>>
>>> +*_CLANGDWARF_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>
>>> *_CLANGDWARF_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>
>>> *_CLANGDWARF_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>
>>> *_CLANGDWARF_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>
>>> @@ -2985,7 +2985,7 @@ RELEASE_XCODE5_IA32_DLINK_FLAGS = -arch i386 -u _$(IMAGE_ENTRY_POINT) -e _$
>>> DEBUG_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>
>>> NOOPT_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>
>>> RELEASE_XCODE5_IA32_ASM_FLAGS = -arch i386
>>>
>>> - *_XCODE5_IA32_NASM_FLAGS = -f macho32
>>>
>>> + *_XCODE5_IA32_NASM_FLAGS = -f macho32 -DRODATA_SECTION_NAME=.rodata
>>>
>>>
>>>
>>
>> An EFI Mach-O file does not contain a .rodata section. A Mach-O contains a __DATA segment that is broken up into sections. For a typical EFI image there are __const, __data, __bss sections in the __DATA segment [1].
>
> Yes, and ".rodata" is almost a synonym for "__DATA,__const", with a small exception [1]. Maybe it'd be clearer if the macro was renamed to "NASM_RODATA_SECTION_NAME", to indicate this is not just a "raw" name, but NASM gives it a semantic meaning?
>
>>
>> The mtoc [2] tool used to convert mach-O to PE/COFF converts the entire __DATA segment (__const, __data, and __bss) into the .data section. Thus adding any kind of new data section is a no-op at best.
>
> This is a part I missed, because I do not have an Xcode toolchain at hand, so thanks for investigating. However this, in my opinion, is a flaw with Mach-O/mtoc and not with my patch. It seems like the only difference between __TEXT,__const and __DATA,__const is whether the data is targeted by a relocation or not. Such a concept does not exist for PE/COFF (and I think not even for ELF, but I'm not too familiar with it), thus the logical PE/COFF section __DATA,__const should be merged into is .rdata (and .rdata may or may not be merged into .text in an earlier step, I assume transitivity). I could change the macro definition to explicitly declare __TEXT,__const, but that would still put the compiler-emitted data in the wrong section. Does Xcode provide anything remotely similar to GNU linker scripts which we can use to move the section?
>
> Please also note that .rodata is used for Xcode-based toolchains already (in fact, all toolchains, and this is the issue), I'm not regressing anything. I just expected it to work fine as-is. This patch mainly fixed PE/COFF-based toolchains, which get both .rdata from the compiler and .rodata with RX permissions from NASM, because ".rodata" only has a semantic meaning for ELF and Mach-O outputs, but not for PE/COFF.
>
>>
>> If you want something to be read only for Xcode/clang you are better off putting it in the __TEXT section [3]. The __TEXT section is read only and for X64 can not even contain relocations.
>
> Well, this kind of is an issue. We would need to introduce an arbitrary constraint on the relocation part that holds only for Xcode-based toolchains. Does the compiler emit an error when data in __TEXT,__const is targeted by a relocation?
The Xcode linker emits a fatal error on X64 for a relocation in the __TEXT section, everything needs to be RIP relative and the compiler does that for free. We generally only run into this for hand coded assembler and the fix is to use RIP relative addressing in the assembly.
> Also see above regarding compiler-emitted __DATA,__const.
>
OK so the current nasm `SECTION .rodata`[1] gets mapped to __TEXT,__const[2] for Xcode clang, and this is done by nasm (I dumped the object file). GenFw and mtoc only run on executables, also they tend to be conservative as they need to keep the layout the same and the relative layout between sections the same, but in this case it is nasm placing the data in the text section.
So what I’d like to see in the patch is to define RODATA_SECTION_NAME to match what is actually happening. So for XCODE that would be `__TEXT,__const` not `.rodata`. We should double check what is happening for ELF on x86, ARM, RiskV, etc. and do the same thing. I assume all the tools that generate PE/COFF directly are good with .rodata? I think it is likely as simple as dumping the EFL object file in objdump or gdb for the given toolchain (like my Xcode example).
TL;DR It looks to me like nasm does some SECTION translations under the hood to make code portable, and I’d like to make sure we capture those in the new NASM_RODATA_SECTION_NAME. If some one is doing a security review having NASM_RODATA_SECTION_NAME is going to imply that a .rodata section is being used by that specific toolchain, and I think that is much worse than the current “magic” behavior in nasm. We are much better off explaining what is really happening, since it is not very obvious.
[1] https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14
[2] $otool -V -s __TEXT __const Build/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
Contents of (__TEXT,__const) section
0000001d 7f 03 80 1f 00 00
$ otool -l Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
Build/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
Load command 0
cmd LC_SEGMENT_64
cmdsize 232
segname
vmaddr 0x0000000000000000
vmsize 0x0000000000000026
fileoff 288
filesize 38
maxprot 0x00000007
initprot 0x00000007
nsects 2
flags 0x0
Section
sectname __text
segname __TEXT
addr 0x0000000000000000
size 0x000000000000001d
offset 288
align 2^0 (1)
reloff 328
nreloc 2
flags 0x80000500
reserved1 0
reserved2 0
Section
sectname __const
segname __TEXT
addr 0x000000000000001d
size 0x0000000000000006
offset 320
align 2^0 (1)
reloff 0
nreloc 0
flags 0x00000000
reserved1 0
reserved2 0
Load command 1
cmd LC_SYMTAB
cmdsize 24
symoff 344
nsyms 3
stroff 392
strsize 63
Thanks,
Andrew Fish
> Thanks for your notes and insight!
>
> Best regards,
> Marvin
>
>
> [1]
> "For compatibility with other Unix platforms, the following standard names are also supported:
> [...]
> .rodata = __DATA,__const data
> [...]
> If the .rodata section contains no relocations, it is instead put into the __TEXT,__const section unless this section has already been specified explicitly."
> https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html
>
>>
>> [1] otool -lh DxeCore.dll
>> ...
>> Load command 1
>> cmd LC_SEGMENT_64
>> cmdsize 312
>> segname __DATA
>> vmaddr 0x000000000002b000
>> vmsize 0x0000000000147000
>> fileoff 180224
>> filesize 8192
>> maxprot 0x00000003
>> initprot 0x00000003
>> nsects 3
>> flags 0x0
>> Section
>> sectname __const
>> segname __DATA
>> addr 0x000000000002b000
>> size 0x0000000000000718
>> offset 180224
>> align 2^4 (16)
>> reloff 0
>> nreloc 0
>> flags 0x00000000
>> reserved1 0
>> reserved2 0
>> Section
>> sectname __data
>> segname __DATA
>> addr 0x000000000002b720
>> size 0x00000000000014f0
>> offset 182048
>> align 2^4 (16)
>> reloff 0
>> nreloc 0
>> flags 0x00000000
>> reserved1 0
>> reserved2 0
>> Section
>> sectname __bss
>> segname __DATA
>> addr 0x000000000002cc10
>> size 0x0000000000144e11
>> offset 0
>> align 2^4 (16)
>> reloff 0
>> nreloc 0
>> flags 0x00000001
>> reserved1 0
>> reserved2 0
>> …
>>
>> [2] https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html>
>>
>> [3] otool more output…
>> Load command 0
>> cmd LC_SEGMENT_64
>> cmdsize 392
>> segname __TEXT
>> vmaddr 0x0000000000000240
>> vmsize 0x00000000000296c0
>> fileoff 1184
>> filesize 169664
>> maxprot 0x00000005
>> initprot 0x00000005
>> nsects 4
>> flags 0x0
>> Section
>> sectname __text
>> segname __TEXT
>> addr 0x0000000000000240
>> size 0x000000000002489f
>> offset 1184
>> align 2^3 (8)
>> reloff 0
>> nreloc 0
>> flags 0x80000400
>> reserved1 0
>> reserved2 0
>> Section
>> sectname __cstring
>> segname __TEXT
>> addr 0x0000000000024ae0
>> size 0x000000000000496d
>> offset 150848
>> align 2^4 (16)
>> reloff 0
>> nreloc 0
>> flags 0x00000002
>> reserved1 0
>> reserved2 0
>> Section
>> sectname __ustring
>> segname __TEXT
>> addr 0x000000000002944e
>> size 0x0000000000000048
>> offset 169646
>> align 2^1 (2)
>> reloff 0
>> nreloc 0
>> flags 0x00000000
>> reserved1 0
>> reserved2 0
>> Section
>> sectname __const
>> segname __TEXT
>> addr 0x00000000000294a0
>> size 0x0000000000000448
>> offset 169728
>> align 2^4 (16)
>> reloff 0
>> nreloc 0
>> flags 0x00000000
>> reserved1 0
>> reserved2 0
>>
>> Thanks,
>>
>> Andrew Fish
>>
>>>
>>>
>>> DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
>>>
>>> @@ -3003,7 +3003,7 @@ RELEASE_XCODE5_X64_DLINK_FLAGS = -arch x86_64 -u _$(IMAGE_ENTRY_POINT) -e _
>>> DEBUG_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>
>>> NOOPT_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>
>>> RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64
>>>
>>> - *_XCODE5_X64_NASM_FLAGS = -f macho64
>>>
>>> + *_XCODE5_X64_NASM_FLAGS = -f macho64 -DRODATA_SECTION_NAME=.rodata
>>>
>>> *_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h
>>>
>>> *_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include $(MODULE_NAME)StrDefs.h
>>>
>>>
>>>
>>> --
>>> 2.31.1
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>
[-- Attachment #2: Type: text/html, Size: 82604 bytes --]
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain
[not found] ` <169A090BBBBE12C1.15606@groups.io>
@ 2021-08-10 19:49 ` Andrew Fish
2021-08-10 21:24 ` Marvin Häuser
0 siblings, 1 reply; 42+ messages in thread
From: Andrew Fish @ 2021-08-10 19:49 UTC (permalink / raw)
To: edk2-devel-groups-io, Andrew Fish
Cc: Marvin Häuser, Bob Feng, Liming Gao, Yuwei Chen,
Vitaly Cheptsov
[-- Attachment #1: Type: text/plain, Size: 57632 bytes --]
I forgot I have an Ubuntu VM so we can take a look at an ELF to PE/COFF toolchain example ….
So it looks like nasm[1] “does the right thing”(tm) and places a .rodata section in the object file….
But it looks like GenFw[2] smashed the .rodata section into .data section when it translated to PE/COFF. This was the issue I was worried about….
Actually I should probably look at the ELF executable too[3]. Yikes no .rodata in the ELF. So it looks likely that the linker scripts are smashing .rodata into .data. So there may be multiple issues with ELF toolchains that need to change to end up with a .rodata in the PE/COFF.
[1]$ objdump -fh Build/OvmfX64/DEBUG_GCC5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
Build/OvmfX64/DEBUG_GCC5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj: file format elf64-x86-64
architecture: i386:x86-64, flags 0x00000011:
HAS_RELOC, HAS_SYMS
start address 0x0000000000000000
Sections:
Idx Name Size VMA LMA File off Algn
0 .rodata 00000006 0000000000000000 0000000000000000 00000200 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .text 0000001d 0000000000000000 0000000000000000 00000210 2**4
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
[2]$ objdump -fh Build/OvmfX64/DEBUG_GCC5/X64/UefiCpuPkg/CpuDxe/CpuDxe/DEBUG/CpuDxe.efi
Build/OvmfX64/DEBUG_GCC5/X64/UefiCpuPkg/CpuDxe/CpuDxe/DEBUG/CpuDxe.efi: file format pei-x86-64
architecture: i386:x86-64, flags 0x0000010b:
HAS_RELOC, EXEC_P, HAS_DEBUG, D_PAGED
start address 0x0000000000008eb1
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 0000ff80 0000000000000240 0000000000000240 00000240 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000540 00000000000101c0 00000000000101c0 000101c0 2**4
CONTENTS, ALLOC, LOAD, DATA
2 .reloc 00000080 0000000000010700 0000000000010700 00010700 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
[3] $ objdump -fh Build/OvmfX64/DEBUG_GCC5/X64/UefiCpuPkg/CpuDxe/CpuDxe/DEBUG/CpuDxe.dll
Build/OvmfX64/DEBUG_GCC5/X64/UefiCpuPkg/CpuDxe/CpuDxe/DEBUG/CpuDxe.dll: file format elf64-x86-64
architecture: i386:x86-64, flags 0x00000013:
HAS_RELOC, EXEC_P, HAS_SYMS
start address 0x0000000000008eb1
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 0000ff46 0000000000000240 0000000000000240 000000c0 2**6
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
1 .data 00000490 00000000000101c0 00000000000101c0 00010040 2**6
CONTENTS, ALLOC, LOAD, RELOC, DATA
2 .rela 000004f8 0000000000010680 0000000000010680 000104d0 2**3
CONTENTS, READONLY
3 .build-id 00000024 0000000000010b78 0000000000010b78 000109c8 2**2
CONTENTS, READONLY
4 .gnu_debuglink 00000014 0000000000000000 0000000000000000 000109ec 2**2
CONTENTS, READONLY
Thanks,
Andrew Fish
> On Aug 10, 2021, at 12:35 PM, Andrew Fish via groups.io <afish=apple.com@groups.io> wrote:
>
>
>
>> On Aug 10, 2021, at 1:27 AM, Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>> wrote:
>>
>> On 10/08/2021 06:19, Andrew Fish via groups.io <http://groups.io/> wrote:
>>>
>>>
>>>> On Aug 9, 2021, at 2:51 AM, Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>> wrote:
>>>>
>>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3318 <https://bugzilla.tianocore.org/show_bug.cgi?id=3318> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318 <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>>
>>>>
>>>> Different toolchains of the EDK II build system may generate ELF or
>>>> Mach-O files, which use the ".rodata" naming convention, or PE/COFF
>>>> files, which use the ".rdata" naming convention. Section permissions
>>>> are chosen based on this name per file format by NASM. To harden
>>>> image permission security, and to save space by avoiding both
>>>> ".rdata" and ".rodata" sections being emitted, expose the appropriate
>>>> name as a preprocessor constant.
>>>>
>>>> Cc: Bob Feng <bob.c.feng@intel.com <mailto:bob.c.feng@intel.com> <mailto:bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>>>
>>>> Cc: Liming Gao <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> <mailto:gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>>>
>>>> Cc: Yuwei Chen <yuwei.chen@intel.com <mailto:yuwei.chen@intel.com> <mailto:yuwei.chen@intel.com <mailto:yuwei.chen@intel.com>>>
>>>> Cc: Vitaly Cheptsov <vit9696@protonmail.com <mailto:vit9696@protonmail.com> <mailto:vit9696@protonmail.com <mailto:vit9696@protonmail.com>>>
>>>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>>
>>>> ---
>>>> BaseTools/Conf/tools_def.template | 172 ++++++++++----------
>>>> 1 file changed, 86 insertions(+), 86 deletions(-)
>>>>
>>>> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
>>>> index 2e6b382ab623..84d464916c4d 100755
>>>> --- a/BaseTools/Conf/tools_def.template
>>>> +++ b/BaseTools/Conf/tools_def.template
>>>> @@ -463,9 +463,9 @@ NOOPT_VS2008_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>> RELEASE_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -495,9 +495,9 @@ NOOPT_VS2008_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>> RELEASE_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -574,9 +574,9 @@ NOOPT_VS2008x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>> RELEASE_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -605,9 +605,9 @@ NOOPT_VS2008x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>> RELEASE_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -688,9 +688,9 @@ NOOPT_VS2010_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>> RELEASE_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -720,9 +720,9 @@ NOOPT_VS2010_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>> RELEASE_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -799,9 +799,9 @@ NOOPT_VS2010x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>> RELEASE_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -831,9 +831,9 @@ NOOPT_VS2010x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>> RELEASE_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -913,9 +913,9 @@ NOOPT_VS2012_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>> RELEASE_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -945,9 +945,9 @@ NOOPT_VS2012_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>> RELEASE_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1024,9 +1024,9 @@ NOOPT_VS2012x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>> RELEASE_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1056,9 +1056,9 @@ NOOPT_VS2012x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>> RELEASE_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1138,9 +1138,9 @@ NOOPT_VS2013_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>> RELEASE_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1170,9 +1170,9 @@ NOOPT_VS2013_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>> RELEASE_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1249,9 +1249,9 @@ NOOPT_VS2013x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>> RELEASE_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1281,9 +1281,9 @@ NOOPT_VS2013x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>> RELEASE_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1364,9 +1364,9 @@ NOOPT_VS2015_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>> RELEASE_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1396,9 +1396,9 @@ NOOPT_VS2015_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>> RELEASE_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1476,9 +1476,9 @@ NOOPT_VS2015x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>> RELEASE_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1508,9 +1508,9 @@ NOOPT_VS2015x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>> RELEASE_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1586,9 +1586,9 @@ NOOPT_VS2017_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>> RELEASE_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1616,9 +1616,9 @@ NOOPT_VS2017_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>> RELEASE_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1744,9 +1744,9 @@ NOOPT_VS2019_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>> RELEASE_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1774,9 +1774,9 @@ NOOPT_VS2019_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>> RELEASE_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -2030,7 +2030,7 @@ DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include A
>>>> *_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
>>>>
>>>> *_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>
>>>> *_GCC48_IA32_OBJCOPY_FLAGS =
>>>>
>>>> -*_GCC48_IA32_NASM_FLAGS = -f elf32
>>>>
>>>> +*_GCC48_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>
>>>>
>>>>
>>>> DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
>>>>
>>>> RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable
>>>>
>>>> @@ -2058,7 +2058,7 @@ RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>> *_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
>>>>
>>>> *_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>
>>>> *_GCC48_X64_OBJCOPY_FLAGS =
>>>>
>>>> -*_GCC48_X64_NASM_FLAGS = -f elf64
>>>>
>>>> +*_GCC48_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>
>>>>
>>>>
>>>> DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
>>>>
>>>> RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable
>>>>
>>>> @@ -2170,7 +2170,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
>>>> *_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
>>>>
>>>> *_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>
>>>> *_GCC49_IA32_OBJCOPY_FLAGS =
>>>>
>>>> -*_GCC49_IA32_NASM_FLAGS = -f elf32
>>>>
>>>> +*_GCC49_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>
>>>>
>>>>
>>>> DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
>>>>
>>>> RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>
>>>> @@ -2198,7 +2198,7 @@ RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>> *_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
>>>>
>>>> *_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>
>>>> *_GCC49_X64_OBJCOPY_FLAGS =
>>>>
>>>> -*_GCC49_X64_NASM_FLAGS = -f elf64
>>>>
>>>> +*_GCC49_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>
>>>>
>>>>
>>>> DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
>>>>
>>>> RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>
>>>> @@ -2316,7 +2316,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
>>>> *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
>>>>
>>>> *_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>
>>>> *_GCC5_IA32_OBJCOPY_FLAGS =
>>>>
>>>> -*_GCC5_IA32_NASM_FLAGS = -f elf32
>>>>
>>>> +*_GCC5_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>
>>>>
>>>>
>>>> DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Os
>>>>
>>>> DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
>>>>
>>>> @@ -2348,7 +2348,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,
>>>> *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
>>>>
>>>> *_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>
>>>> *_GCC5_X64_OBJCOPY_FLAGS =
>>>>
>>>> -*_GCC5_X64_NASM_FLAGS = -f elf64
>>>>
>>>> +*_GCC5_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>
>>>>
>>>>
>>>> DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO -Os
>>>>
>>>> DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
>>>>
>>>> @@ -2589,7 +2589,7 @@ DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNIN
>>>> *_CLANG38_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>
>>>> *_CLANG38_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>
>>>> *_CLANG38_IA32_OBJCOPY_FLAGS =
>>>>
>>>> -*_CLANG38_IA32_NASM_FLAGS = -f elf32
>>>>
>>>> +*_CLANG38_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>
>>>> *_CLANG38_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>
>>>> *_CLANG38_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>
>>>> *_CLANG38_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>
>>>> @@ -2626,7 +2626,7 @@ NOOPT_CLANG38_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -O0
>>>> *_CLANG38_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
>>>>
>>>> *_CLANG38_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>
>>>> *_CLANG38_X64_OBJCOPY_FLAGS =
>>>>
>>>> -*_CLANG38_X64_NASM_FLAGS = -f elf64
>>>>
>>>> +*_CLANG38_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>
>>>> *_CLANG38_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>
>>>> *_CLANG38_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>
>>>> *_CLANG38_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>
>>>> @@ -2777,7 +2777,7 @@ DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARN
>>>> *_CLANGPDB_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32 -fno-lto DEF(CLANGPDB_IA32_TARGET)
>>>>
>>>> *_CLANGPDB_IA32_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m32 -march=i386 DEF(CLANGPDB_IA32_TARGET)
>>>>
>>>> *_CLANGPDB_IA32_OBJCOPY_FLAGS =
>>>>
>>>> -*_CLANGPDB_IA32_NASM_FLAGS = -f win32
>>>>
>>>> +*_CLANGPDB_IA32_NASM_FLAGS = -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> *_CLANGPDB_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>
>>>> *_CLANGPDB_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>
>>>> *_CLANGPDB_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>
>>>> @@ -2811,7 +2811,7 @@ NOOPT_CLANGPDB_IA32_DLINK2_FLAGS =
>>>> *_CLANGPDB_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64 -fno-lto DEF(CLANGPDB_X64_TARGET)
>>>>
>>>> *_CLANGPDB_X64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m64 DEF(CLANGPDB_X64_TARGET)
>>>>
>>>> *_CLANGPDB_X64_OBJCOPY_FLAGS =
>>>>
>>>> -*_CLANGPDB_X64_NASM_FLAGS = -f win64
>>>>
>>>> +*_CLANGPDB_X64_NASM_FLAGS = -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> *_CLANGPDB_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>
>>>> *_CLANGPDB_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>
>>>> *_CLANGPDB_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>
>>>> @@ -2878,7 +2878,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
>>>> *_CLANGDWARF_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>
>>>> *_CLANGDWARF_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>
>>>> *_CLANGDWARF_IA32_OBJCOPY_FLAGS =
>>>>
>>>> -*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32
>>>>
>>>> +*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>
>>>> *_CLANGDWARF_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>
>>>> *_CLANGDWARF_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>
>>>> *_CLANGDWARF_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>
>>>> @@ -2914,7 +2914,7 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -
>>>> *_CLANGDWARF_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
>>>>
>>>> *_CLANGDWARF_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>
>>>> *_CLANGDWARF_X64_OBJCOPY_FLAGS =
>>>>
>>>> -*_CLANGDWARF_X64_NASM_FLAGS = -f elf64
>>>>
>>>> +*_CLANGDWARF_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>
>>>> *_CLANGDWARF_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>
>>>> *_CLANGDWARF_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>
>>>> *_CLANGDWARF_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>
>>>> @@ -2985,7 +2985,7 @@ RELEASE_XCODE5_IA32_DLINK_FLAGS = -arch i386 -u _$(IMAGE_ENTRY_POINT) -e _$
>>>> DEBUG_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>
>>>> NOOPT_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>
>>>> RELEASE_XCODE5_IA32_ASM_FLAGS = -arch i386
>>>>
>>>> - *_XCODE5_IA32_NASM_FLAGS = -f macho32
>>>>
>>>> + *_XCODE5_IA32_NASM_FLAGS = -f macho32 -DRODATA_SECTION_NAME=.rodata
>>>>
>>>>
>>>>
>>>
>>> An EFI Mach-O file does not contain a .rodata section. A Mach-O contains a __DATA segment that is broken up into sections. For a typical EFI image there are __const, __data, __bss sections in the __DATA segment [1].
>>
>> Yes, and ".rodata" is almost a synonym for "__DATA,__const", with a small exception [1]. Maybe it'd be clearer if the macro was renamed to "NASM_RODATA_SECTION_NAME", to indicate this is not just a "raw" name, but NASM gives it a semantic meaning?
>>
>>>
>>> The mtoc [2] tool used to convert mach-O to PE/COFF converts the entire __DATA segment (__const, __data, and __bss) into the .data section. Thus adding any kind of new data section is a no-op at best.
>>
>> This is a part I missed, because I do not have an Xcode toolchain at hand, so thanks for investigating. However this, in my opinion, is a flaw with Mach-O/mtoc and not with my patch. It seems like the only difference between __TEXT,__const and __DATA,__const is whether the data is targeted by a relocation or not. Such a concept does not exist for PE/COFF (and I think not even for ELF, but I'm not too familiar with it), thus the logical PE/COFF section __DATA,__const should be merged into is .rdata (and .rdata may or may not be merged into .text in an earlier step, I assume transitivity). I could change the macro definition to explicitly declare __TEXT,__const, but that would still put the compiler-emitted data in the wrong section. Does Xcode provide anything remotely similar to GNU linker scripts which we can use to move the section?
>>
>> Please also note that .rodata is used for Xcode-based toolchains already (in fact, all toolchains, and this is the issue), I'm not regressing anything. I just expected it to work fine as-is. This patch mainly fixed PE/COFF-based toolchains, which get both .rdata from the compiler and .rodata with RX permissions from NASM, because ".rodata" only has a semantic meaning for ELF and Mach-O outputs, but not for PE/COFF.
>>
>>>
>>> If you want something to be read only for Xcode/clang you are better off putting it in the __TEXT section [3]. The __TEXT section is read only and for X64 can not even contain relocations.
>>
>> Well, this kind of is an issue. We would need to introduce an arbitrary constraint on the relocation part that holds only for Xcode-based toolchains. Does the compiler emit an error when data in __TEXT,__const is targeted by a relocation?
>
> The Xcode linker emits a fatal error on X64 for a relocation in the __TEXT section, everything needs to be RIP relative and the compiler does that for free. We generally only run into this for hand coded assembler and the fix is to use RIP relative addressing in the assembly.
>
>> Also see above regarding compiler-emitted __DATA,__const.
>>
>
> OK so the current nasm `SECTION .rodata`[1] gets mapped to __TEXT,__const[2] for Xcode clang, and this is done by nasm (I dumped the object file). GenFw and mtoc only run on executables, also they tend to be conservative as they need to keep the layout the same and the relative layout between sections the same, but in this case it is nasm placing the data in the text section.
>
> So what I’d like to see in the patch is to define RODATA_SECTION_NAME to match what is actually happening. So for XCODE that would be `__TEXT,__const` not `.rodata`. We should double check what is happening for ELF on x86, ARM, RiskV, etc. and do the same thing. I assume all the tools that generate PE/COFF directly are good with .rodata? I think it is likely as simple as dumping the EFL object file in objdump or gdb for the given toolchain (like my Xcode example).
>
> TL;DR It looks to me like nasm does some SECTION translations under the hood to make code portable, and I’d like to make sure we capture those in the new NASM_RODATA_SECTION_NAME. If some one is doing a security review having NASM_RODATA_SECTION_NAME is going to imply that a .rodata section is being used by that specific toolchain, and I think that is much worse than the current “magic” behavior in nasm. We are much better off explaining what is really happening, since it is not very obvious.
>
> [1] https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14 <https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14>
>
> [2] $otool -V -s __TEXT __const Build/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
> Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
> Contents of (__TEXT,__const) section
> 0000001d 7f 03 80 1f 00 00
>
> $ otool -l Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
> Build/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
> Load command 0
> cmd LC_SEGMENT_64
> cmdsize 232
> segname
> vmaddr 0x0000000000000000
> vmsize 0x0000000000000026
> fileoff 288
> filesize 38
> maxprot 0x00000007
> initprot 0x00000007
> nsects 2
> flags 0x0
> Section
> sectname __text
> segname __TEXT
> addr 0x0000000000000000
> size 0x000000000000001d
> offset 288
> align 2^0 (1)
> reloff 328
> nreloc 2
> flags 0x80000500
> reserved1 0
> reserved2 0
> Section
> sectname __const
> segname __TEXT
> addr 0x000000000000001d
> size 0x0000000000000006
> offset 320
> align 2^0 (1)
> reloff 0
> nreloc 0
> flags 0x00000000
> reserved1 0
> reserved2 0
> Load command 1
> cmd LC_SYMTAB
> cmdsize 24
> symoff 344
> nsyms 3
> stroff 392
> strsize 63
>
>
> Thanks,
>
> Andrew Fish
>
>
>> Thanks for your notes and insight!
>>
>> Best regards,
>> Marvin
>>
>>
>> [1]
>> "For compatibility with other Unix platforms, the following standard names are also supported:
>> [...]
>> .rodata = __DATA,__const data
>> [...]
>> If the .rodata section contains no relocations, it is instead put into the __TEXT,__const section unless this section has already been specified explicitly."
>> https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html <https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html>
>>
>>>
>>> [1] otool -lh DxeCore.dll
>>> ...
>>> Load command 1
>>> cmd LC_SEGMENT_64
>>> cmdsize 312
>>> segname __DATA
>>> vmaddr 0x000000000002b000
>>> vmsize 0x0000000000147000
>>> fileoff 180224
>>> filesize 8192
>>> maxprot 0x00000003
>>> initprot 0x00000003
>>> nsects 3
>>> flags 0x0
>>> Section
>>> sectname __const
>>> segname __DATA
>>> addr 0x000000000002b000
>>> size 0x0000000000000718
>>> offset 180224
>>> align 2^4 (16)
>>> reloff 0
>>> nreloc 0
>>> flags 0x00000000
>>> reserved1 0
>>> reserved2 0
>>> Section
>>> sectname __data
>>> segname __DATA
>>> addr 0x000000000002b720
>>> size 0x00000000000014f0
>>> offset 182048
>>> align 2^4 (16)
>>> reloff 0
>>> nreloc 0
>>> flags 0x00000000
>>> reserved1 0
>>> reserved2 0
>>> Section
>>> sectname __bss
>>> segname __DATA
>>> addr 0x000000000002cc10
>>> size 0x0000000000144e11
>>> offset 0
>>> align 2^4 (16)
>>> reloff 0
>>> nreloc 0
>>> flags 0x00000001
>>> reserved1 0
>>> reserved2 0
>>> …
>>>
>>> [2] https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html>
>>>
>>> [3] otool more output…
>>> Load command 0
>>> cmd LC_SEGMENT_64
>>> cmdsize 392
>>> segname __TEXT
>>> vmaddr 0x0000000000000240
>>> vmsize 0x00000000000296c0
>>> fileoff 1184
>>> filesize 169664
>>> maxprot 0x00000005
>>> initprot 0x00000005
>>> nsects 4
>>> flags 0x0
>>> Section
>>> sectname __text
>>> segname __TEXT
>>> addr 0x0000000000000240
>>> size 0x000000000002489f
>>> offset 1184
>>> align 2^3 (8)
>>> reloff 0
>>> nreloc 0
>>> flags 0x80000400
>>> reserved1 0
>>> reserved2 0
>>> Section
>>> sectname __cstring
>>> segname __TEXT
>>> addr 0x0000000000024ae0
>>> size 0x000000000000496d
>>> offset 150848
>>> align 2^4 (16)
>>> reloff 0
>>> nreloc 0
>>> flags 0x00000002
>>> reserved1 0
>>> reserved2 0
>>> Section
>>> sectname __ustring
>>> segname __TEXT
>>> addr 0x000000000002944e
>>> size 0x0000000000000048
>>> offset 169646
>>> align 2^1 (2)
>>> reloff 0
>>> nreloc 0
>>> flags 0x00000000
>>> reserved1 0
>>> reserved2 0
>>> Section
>>> sectname __const
>>> segname __TEXT
>>> addr 0x00000000000294a0
>>> size 0x0000000000000448
>>> offset 169728
>>> align 2^4 (16)
>>> reloff 0
>>> nreloc 0
>>> flags 0x00000000
>>> reserved1 0
>>> reserved2 0
>>>
>>> Thanks,
>>>
>>> Andrew Fish
>>>
>>>>
>>>>
>>>> DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
>>>>
>>>> @@ -3003,7 +3003,7 @@ RELEASE_XCODE5_X64_DLINK_FLAGS = -arch x86_64 -u _$(IMAGE_ENTRY_POINT) -e _
>>>> DEBUG_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>
>>>> NOOPT_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>
>>>> RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64
>>>>
>>>> - *_XCODE5_X64_NASM_FLAGS = -f macho64
>>>>
>>>> + *_XCODE5_X64_NASM_FLAGS = -f macho64 -DRODATA_SECTION_NAME=.rodata
>>>>
>>>> *_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h
>>>>
>>>> *_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include $(MODULE_NAME)StrDefs.h
>>>>
>>>>
>>>>
>>>> --
>>>> 2.31.1
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>
>
[-- Attachment #2: Type: text/html, Size: 89388 bytes --]
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/2] MdePkg/BaseLib: Fix unaligned API prototypes
2021-08-10 17:36 ` Andrew Fish
@ 2021-08-10 21:14 ` Marvin Häuser
0 siblings, 0 replies; 42+ messages in thread
From: Marvin Häuser @ 2021-08-10 21:14 UTC (permalink / raw)
To: devel, afish; +Cc: Mike Kinney, Liming Gao, Liu, Zhiguang, Vitaly Cheptsov
On 10/08/2021 19:36, Andrew Fish via groups.io wrote:
>
>
>> On Aug 10, 2021, at 1:53 AM, Marvin Häuser <mhaeuser@posteo.de
>> <mailto:mhaeuser@posteo.de>> wrote:
>>
>> On 09/08/2021 23:32, Andrew Fish viagroups.io <http://groups.io/>wrote:
>>>
>>>
>>>> On Aug 9, 2021, at 9:15 AM, Michael D Kinney
>>>> <michael.d.kinney@intel.com
>>>> <mailto:michael.d.kinney@intel.com><mailto:michael.d.kinney@intel.com
>>>> <mailto:michael.d.kinney@intel.com>>> wrote:
>>>>
>>>> Hi Marvin,
>>>>
>>>> Can you provide an example of which C compiler is flagging this as
>>>> an error and what error message is generated.
>>>>
>>>> Please enter a BZ with this background information and add link to the
>>>> BZ in the commit message.
>>>>
>>>> This is a change to the BaseLib class, so we need to make sure there
>>>> are no impacts to any existing code. I looks like a safe change
>>>> because changing from a pointer to a fixed size type to VOID *
>>>> should be compatible. Please add that analysis to the background
>>>> in the BZ as well.
>>>>
>>>
>>> MIke,
>>>
>>> I want to say we had a discussion about this years ago? I don’t
>>> remember the outcome.
>>>
>>> Dereferencing a misaligned pointer is UB (Undefined Behavior) in C
>>> [1], but historically x86 compilers have let it slide.
>>>
>>> I think the situation we are in is the BaseLib functions don’t
>>> contain UB, but it is UB for the caller to use the returned pointer
>>> directly.
>>
>> They do contain UB, inherently from the combination of their
>> prototype and their usage.
>> Please refer to the new BZ added for
>> V2:https://bugzilla.tianocore.org/show_bug.cgi?id=3542
>> <https://bugzilla.tianocore.org/show_bug.cgi?id=3542>
>>
>
> I think we are saying the same thing.
OK, sorry, misunderstood then.
> My point is it is possible to use the library API correctly, but
> likely no one does. Changing the API to a VOID also does not fix every
> issue, actually it is a drop in to existing code so it does not really
> force any fixes...
Yes, but at least it does not *force* the caller to do UB casts.
I actually have fixed everything I found here:
https://github.com/mhaeuser/edk2/commit/7266c31f04634bf3e1861e84f9be9983a6084f3c
Just I thought I could not possibly defend such a huge patch for an
issue nobody encounters and likely never will either. If you want the
patch, you totally can have it, just I did not want to increase the
burden for no reason. I'm fine if future code does it right, but also to
polish and submit above patch.
>
>> I could only speculate why UBsan does not check cast safety...
>> To be fair, I don't know a real-world platform that has issues with
>> this UB, but the fix is simple enough in my opinion.
>>
>
> Cast is compile time UB, not runtime. UBSan is doing runtime checks.
> You can catch compile time UB with warnings. I've have had way too
> many talks with the clang folks about UB and firmware :).
Right, that would have been a guess. One could make a point though that
it is RT UB, because UB is only invoked if the address is actually not
aligned, the compiler not having a proof is not enough. Thanks for the
insight!
>
>> Actually, enabling "-Wcast-align" some day would be great either way. :)
>>
>
> In my example this gets you past the -Wcast-align. We have the same
> type of casts for the size of pointers and casting through UINTN.
> UINT16 *pointer = (UINT16 *)(void *)(buffer+1);
Yes, but this looks much more ominous than without the void cast. I
sometimes experiment with code style a bit in my own private code, and
omitting void pointers as far as possible (exceptions for cases as
above) has been one of those experiments. I don't think one can nail C
code style perfectly, it's always a game of trade-offs.
>
> Actually I’m starting to remember why we chose not to fix this before.
> It does not really help…. Notice if we change the API to use `VOID *`
> vs. `UINT16 *` nothing really changed [1] ? It is still up to the
> caller to do the right thing.
Yes-ish, this is not quite a functional fix, it's about guarantees. If
the functions take UINT16 pointers, they request a guarantee from every
caller, with no docs required, that the pointers must be aligned for
this type. It's a guarantee for the functional implementation, but more
importantly a guarantee for the compiler. If we change it to a VOID
pointer, it will basically be no-op for the binary, as no compiler
really makes such assumptions at cast-time (to my knowledge), but the
guarantees were shifted. Now, if the function wants an alignment
guarantee from the caller, it has to define it in the docs. No such
exists, so the caller knows that the input pointer does not impose any
alignment constraints, and the compiler knows it cannot assume any such.
> The real issue is the functions are not really useful given strict UB
> in C….
>
> A better solution is to just tell the compiler this pointer is not
> aligned, and at that point you DON'T need the lib functions….
>
> This code passes -Wcast-align and -fsanitize=undefined runtime checks:
> typedef UINT16 UUINT16 __attribute__ ((aligned (1)));
>
> int main()
> {
> UINT8 *buffer = malloc(64);
> UUINT16 *pointer = (UUINT16 *)(buffer+1);
> *pointer = 42;
> return *pointer;
> }
>
> So a better solution maybe to defined unaligned basic types? I’m not
> sure if __declspec(align(1)) does the right thing for VC++,
> __attribute__ ((aligned (1))); does the right thing for GCC and clang.
> Assuming this works we could defined unaligned version of our basic
> types, and over time obsolete the current alignment lib functions. We
> could start with a warning comment to use the unaligned types vs.
> current library functions.
>
> I’m thinking for the types in ProcessorBind.h[2] and Base.h[3] we
> could have a byte aligned versions. For example given UINT16 we add
> UUINT16 to Base.h. I guess we could also look into a #define
> abstraction for ` __attribute__ ((aligned (1)))` so new could could
> use that in a portable way?
>
> Just to be clear if we define UUINT16 then the compiler will do the
> the work of WriteUnaligned16() in the code generation, if it is needed
> by the CPU arch. Given that it is much harder for the coder to “mess
> it up”.
Well, the caller code can cast to aligned types over unaligned types
just as well with this concept. But I like it just for the sake of
leveraging compiler code over providing own implementations. At the very
least for packed structures they sound great. Clang added
"-Waddress-of-packed-member" at some point, and unaligned base types
allow safe (and warning-free) address retrieval.
>
> Actually I changed my mind I think we will want to keep the Unaligned
> library functions, but update them to use the unaligned pointers. The
> reason we need the function is the compiler is generating code that
> follow the rules of the CPU, so we need the library functions to talk
> to hardware devices that have stricter alignment rules than the CPU.
> For example on x86 UUINT16 will end up being a word operation in
> assembler. This is the reason the current lib functions use volatile.
> Sorry figuring this out as I type. So looks like we need to add
> unaligned types and update the libs to use those types? For memory
> operations you can use the new unaligned types, and for hardware
> access use the lib functions.
In this case I would probably rebrand them (docs are enough) to MMIO
functions, and encourage new code to use the unaligned pointer types
directly? This may actually provide optimisation advantages due to lack
of volatile.
Thanks for the detailed notes!
Best regards,
Marvin
>
> [1] ~/work/Compiler>cat ub.c
> #include <stdlib.h>
>
> #define EFIAPI
> #define IN
> #define OUT
> #define VOID void
>
> typedef unsigned char UINT8;
> typedef unsigned short UINT16;
>
> UINT16
> EFIAPI
> WriteUnaligned16 (
> OUT VOID *Buffer,
> IN UINT16 Value
> )
> {
> // ASSERT (Buffer != NULL);
>
> ((volatile UINT8*)Buffer)[0] = (UINT8)Value;
> ((volatile UINT8*)Buffer)[1] = (UINT8)(Value >> 8);
>
> return Value;
> }
>
>
> int main()
> {
> UINT8 *buffer = malloc(64);
> UINT16 *pointer = (UINT16 *)(void *)(buffer+1);
>
>
> WriteUnaligned16 (pointer, 42);
>
>
> // *pointer = 42; // Error: misaligned integer pointer assignment
> return *pointer;
> }
> ~/work/Compiler>clang -fsanitize=undefined -Wcast-align ub.c
> ~/work/Compiler>./a.out
> *ub.c:35:9:**runtime error: **load of misaligned address
> 0x7fdd9d405aa1 for type 'UINT16' (aka 'unsigned short'), which
> requires 2 byte alignment*
> *0x7fdd9d405aa1: note: *pointer points here
> 00 00 00 64 2a 00 79 6d 28 52 54 4c 44 5f 44 45 46 41 55 4c 54 2c
> 20 73 77 69 66 74 5f 64 65 6d
> * ^ *
> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ub.c:35:9 in
> ~/work/Compiler>
>
>
> [2]
> https://github.com/tianocore/edk2/blob/master/MdePkg/Include/X64/ProcessorBind.h#L127
> <https://github.com/tianocore/edk2/blob/master/MdePkg/Include/X64/ProcessorBind.h#L127>
>
> [3]
> https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Base.h
> <https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Base.h>
>
> Thanks,
>
> Andrew Fish
>
>> Best regards,
>> Marvin
>>
>>>
>>> Here is a simple example with clang UndefinedBehaviorSanitizer (UBSan) .
>>>
>>> ~/work/Compiler>cat ub.c
>>> #include <stdlib.h>
>>>
>>> #define EFIAPI
>>> #define IN
>>> #define OUT
>>>
>>> typedef unsigned char UINT8;
>>> typedef unsigned short UINT16;
>>>
>>> UINT16
>>> EFIAPI
>>> WriteUnaligned16 (
>>> OUT UINT16 *Buffer,
>>> IN UINT16 Value
>>> )
>>> {
>>> // ASSERT (Buffer != NULL);
>>>
>>> ((volatile UINT8*)Buffer)[0] = (UINT8)Value;
>>> ((volatile UINT8*)Buffer)[1] = (UINT8)(Value >> 8);
>>>
>>> return Value;
>>> }
>>>
>>>
>>> int main()
>>> {
>>> UINT8 *buffer = malloc(64);
>>> UINT16 *pointer = (UINT16 *)(buffer + 1);
>>>
>>>
>>> WriteUnaligned16 (pointer, 42);
>>>
>>>
>>> // *pointer = 42; // Error: misaligned integer pointer assignment
>>> return *pointer;
>>> }
>>> ~/work/Compiler>clang -fsanitize=undefined ub.c
>>> ~/work/Compiler>./a.out
>>> *ub.c:34:9:**runtime error: **load of misaligned address
>>> 0x7feac6405aa1 for type 'UINT16' (aka 'unsigned short'), which
>>> requires 2 byte alignment*
>>> *0x7feac6405aa1: note: *pointer points here
>>> 00 00 00 64 2a 00 79 6d 28 52 54 4c 44 5f 44 45 46 41 55 4c 54
>>> 2c 20 73 77 69 66 74 5f 64 65 6d
>>> * ^ *
>>> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ub.c:34:9 in
>>>
>>> FYI line 39 is `return *pointer`and 42 is 0x2A. So reading an
>>> writing to *pointer is UB.
>>>
>>>
>>> As you can see in [1] the general advice is to take code that looks
>>> like:
>>> int8_t *buffer = malloc(64);int32_t *pointer = (int32_t *)(buffer +
>>> 1);*pointer = 42; // Error: misaligned integer pointer assignment
>>> And replace it with;
>>> int8_t *buffer = malloc(64);int32_t value = 42;memcpy(buffer + 1,
>>> &value, sizeof(int32_t)); // Correct
>>>
>>> But in these cases the result is in a byte aligned buffer….
>>>
>>> [1]https://developer.apple.com/documentation/xcode/misaligned-pointer
>>> <https://developer.apple.com/documentation/xcode/misaligned-pointer><https://developer.apple.com/documentation/xcode/misaligned-pointer
>>> <https://developer.apple.com/documentation/xcode/misaligned-pointer>>
>>>
>>> Thanks,
>>>
>>> Andrew Fish
>>>
>>>> Thanks,
>>>>
>>>> Mike
>>>>
>>>>
>>>>> -----Original Message-----
>>>>> From: Marvin Häuser <mhaeuser@posteo.de
>>>>> <mailto:mhaeuser@posteo.de><mailto:mhaeuser@posteo.de
>>>>> <mailto:mhaeuser@posteo.de>>>
>>>>> Sent: Monday, August 9, 2021 2:51 AM
>>>>> To:devel@edk2.groups.io
>>>>> <mailto:devel@edk2.groups.io><mailto:devel@edk2.groups.io
>>>>> <mailto:devel@edk2.groups.io>>
>>>>> Cc: Kinney, Michael D <michael.d.kinney@intel.com
>>>>> <mailto:michael.d.kinney@intel.com><mailto:michael.d.kinney@intel.com
>>>>> <mailto:michael.d.kinney@intel.com>>>; Liming Gao
>>>>> <gaoliming@byosoft.com.cn
>>>>> <mailto:gaoliming@byosoft.com.cn><mailto:gaoliming@byosoft.com.cn
>>>>> <mailto:gaoliming@byosoft.com.cn>>>; Liu, Zhiguang
>>>>> <zhiguang.liu@intel.com
>>>>> <mailto:zhiguang.liu@intel.com><mailto:zhiguang.liu@intel.com
>>>>> <mailto:zhiguang.liu@intel.com>>>; Vitaly Cheptsov
>>>>> <vit9696@protonmail.com
>>>>> <mailto:vit9696@protonmail.com><mailto:vit9696@protonmail.com
>>>>> <mailto:vit9696@protonmail.com>>>
>>>>> Subject: [PATCH v2 1/2] MdePkg/BaseLib: Fix unaligned API prototypes
>>>>>
>>>>> C prohibits not only dereferencing but also casting to unaligned
>>>>> pointers. Thus, the current set of unaligned APIs cannot be called
>>>>> safely. Update their prototypes to take VOID * pointers, which must
>>>>> be able to represent any valid pointer.
>>>>>
>>>>> Cc: Michael D Kinney <michael.d.kinney@intel.com
>>>>> <mailto:michael.d.kinney@intel.com><mailto:michael.d.kinney@intel.com
>>>>> <mailto:michael.d.kinney@intel.com>>>
>>>>> Cc: Liming Gao <gaoliming@byosoft.com.cn
>>>>> <mailto:gaoliming@byosoft.com.cn><mailto:gaoliming@byosoft.com.cn
>>>>> <mailto:gaoliming@byosoft.com.cn>>>
>>>>> Cc: Zhiguang Liu <zhiguang.liu@intel.com
>>>>> <mailto:zhiguang.liu@intel.com><mailto:zhiguang.liu@intel.com
>>>>> <mailto:zhiguang.liu@intel.com>>>
>>>>> Cc: Vitaly Cheptsov <vit9696@protonmail.com
>>>>> <mailto:vit9696@protonmail.com><mailto:vit9696@protonmail.com
>>>>> <mailto:vit9696@protonmail.com>>>
>>>>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de
>>>>> <mailto:mhaeuser@posteo.de><mailto:mhaeuser@posteo.de
>>>>> <mailto:mhaeuser@posteo.de>>>
>>>>> ---
>>>>> MdePkg/Library/BaseLib/Arm/Unaligned.c | 14 ++++-----
>>>>> MdePkg/Library/BaseLib/Unaligned.c | 32 ++++++++++----------
>>>>> MdePkg/Include/Library/BaseLib.h | 16 +++++-----
>>>>> 3 files changed, 31 insertions(+), 31 deletions(-)
>>>>>
>>>>> diff --git a/MdePkg/Library/BaseLib/Arm/Unaligned.c
>>>>> b/MdePkg/Library/BaseLib/Arm/Unaligned.c
>>>>> index e9934e7003cb..57f19fc44e0b 100644
>>>>> --- a/MdePkg/Library/BaseLib/Arm/Unaligned.c
>>>>> +++ b/MdePkg/Library/BaseLib/Arm/Unaligned.c
>>>>> @@ -59,7 +59,7 @@ ReadUnaligned16 (
>>>>> UINT16
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> WriteUnaligned16 (
>>>>>
>>>>> - OUT UINT16 *Buffer,
>>>>>
>>>>> + OUT VOID *Buffer,
>>>>>
>>>>> IN UINT16 Value
>>>>>
>>>>> )
>>>>>
>>>>> {
>>>>>
>>>>> @@ -87,7 +87,7 @@ WriteUnaligned16 (
>>>>> UINT32
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> ReadUnaligned24 (
>>>>>
>>>>> - IN CONST UINT32 *Buffer
>>>>>
>>>>> + IN CONST VOID *Buffer
>>>>>
>>>>> )
>>>>>
>>>>> {
>>>>>
>>>>> ASSERT (Buffer != NULL);
>>>>>
>>>>> @@ -116,7 +116,7 @@ ReadUnaligned24 (
>>>>> UINT32
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> WriteUnaligned24 (
>>>>>
>>>>> - OUT UINT32 *Buffer,
>>>>>
>>>>> + OUT VOID *Buffer,
>>>>>
>>>>> IN UINT32 Value
>>>>>
>>>>> )
>>>>>
>>>>> {
>>>>>
>>>>> @@ -143,7 +143,7 @@ WriteUnaligned24 (
>>>>> UINT32
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> ReadUnaligned32 (
>>>>>
>>>>> - IN CONST UINT32 *Buffer
>>>>>
>>>>> + IN CONST VOID *Buffer
>>>>>
>>>>> )
>>>>>
>>>>> {
>>>>>
>>>>> UINT16 LowerBytes;
>>>>>
>>>>> @@ -175,7 +175,7 @@ ReadUnaligned32 (
>>>>> UINT32
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> WriteUnaligned32 (
>>>>>
>>>>> - OUT UINT32 *Buffer,
>>>>>
>>>>> + OUT VOID *Buffer,
>>>>>
>>>>> IN UINT32 Value
>>>>>
>>>>> )
>>>>>
>>>>> {
>>>>>
>>>>> @@ -202,7 +202,7 @@ WriteUnaligned32 (
>>>>> UINT64
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> ReadUnaligned64 (
>>>>>
>>>>> - IN CONST UINT64 *Buffer
>>>>>
>>>>> + IN CONST VOID *Buffer
>>>>>
>>>>> )
>>>>>
>>>>> {
>>>>>
>>>>> UINT32 LowerBytes;
>>>>>
>>>>> @@ -234,7 +234,7 @@ ReadUnaligned64 (
>>>>> UINT64
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> WriteUnaligned64 (
>>>>>
>>>>> - OUT UINT64 *Buffer,
>>>>>
>>>>> + OUT VOID *Buffer,
>>>>>
>>>>> IN UINT64 Value
>>>>>
>>>>> )
>>>>>
>>>>> {
>>>>>
>>>>> diff --git a/MdePkg/Library/BaseLib/Unaligned.c
>>>>> b/MdePkg/Library/BaseLib/Unaligned.c
>>>>> index a419cb85e53c..3041adcde606 100644
>>>>> --- a/MdePkg/Library/BaseLib/Unaligned.c
>>>>> +++ b/MdePkg/Library/BaseLib/Unaligned.c
>>>>> @@ -26,12 +26,12 @@
>>>>> UINT16
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> ReadUnaligned16 (
>>>>>
>>>>> - IN CONST UINT16 *Buffer
>>>>>
>>>>> + IN CONST VOID *Buffer
>>>>>
>>>>> )
>>>>>
>>>>> {
>>>>>
>>>>> ASSERT (Buffer != NULL);
>>>>>
>>>>>
>>>>>
>>>>> - return *Buffer;
>>>>>
>>>>> + return *(CONST UINT16 *) Buffer;
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>> /**
>>>>>
>>>>> @@ -52,13 +52,13 @@ ReadUnaligned16 (
>>>>> UINT16
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> WriteUnaligned16 (
>>>>>
>>>>> - OUT UINT16 *Buffer,
>>>>>
>>>>> + OUT VOID *Buffer,
>>>>>
>>>>> IN UINT16 Value
>>>>>
>>>>> )
>>>>>
>>>>> {
>>>>>
>>>>> ASSERT (Buffer != NULL);
>>>>>
>>>>>
>>>>>
>>>>> - return *Buffer = Value;
>>>>>
>>>>> + return *(UINT16 *) Buffer = Value;
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>> /**
>>>>>
>>>>> @@ -77,12 +77,12 @@ WriteUnaligned16 (
>>>>> UINT32
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> ReadUnaligned24 (
>>>>>
>>>>> - IN CONST UINT32 *Buffer
>>>>>
>>>>> + IN CONST VOID *Buffer
>>>>>
>>>>> )
>>>>>
>>>>> {
>>>>>
>>>>> ASSERT (Buffer != NULL);
>>>>>
>>>>>
>>>>>
>>>>> - return *Buffer & 0xffffff;
>>>>>
>>>>> + return *(CONST UINT32 *) Buffer & 0xffffff;
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>> /**
>>>>>
>>>>> @@ -103,13 +103,13 @@ ReadUnaligned24 (
>>>>> UINT32
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> WriteUnaligned24 (
>>>>>
>>>>> - OUT UINT32 *Buffer,
>>>>>
>>>>> + OUT VOID *Buffer,
>>>>>
>>>>> IN UINT32 Value
>>>>>
>>>>> )
>>>>>
>>>>> {
>>>>>
>>>>> ASSERT (Buffer != NULL);
>>>>>
>>>>>
>>>>>
>>>>> - *Buffer = BitFieldWrite32 (*Buffer, 0, 23, Value);
>>>>>
>>>>> + *(UINT32 *) Buffer = BitFieldWrite32 (*(CONST UINT32 *) Buffer,
>>>>> 0, 23, Value);
>>>>>
>>>>> return Value;
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>> @@ -129,12 +129,12 @@ WriteUnaligned24 (
>>>>> UINT32
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> ReadUnaligned32 (
>>>>>
>>>>> - IN CONST UINT32 *Buffer
>>>>>
>>>>> + IN CONST VOID *Buffer
>>>>>
>>>>> )
>>>>>
>>>>> {
>>>>>
>>>>> ASSERT (Buffer != NULL);
>>>>>
>>>>>
>>>>>
>>>>> - return *Buffer;
>>>>>
>>>>> + return *(CONST UINT32 *) Buffer;
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>> /**
>>>>>
>>>>> @@ -155,13 +155,13 @@ ReadUnaligned32 (
>>>>> UINT32
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> WriteUnaligned32 (
>>>>>
>>>>> - OUT UINT32 *Buffer,
>>>>>
>>>>> + OUT VOID *Buffer,
>>>>>
>>>>> IN UINT32 Value
>>>>>
>>>>> )
>>>>>
>>>>> {
>>>>>
>>>>> ASSERT (Buffer != NULL);
>>>>>
>>>>>
>>>>>
>>>>> - return *Buffer = Value;
>>>>>
>>>>> + return *(UINT32 *) Buffer = Value;
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>> /**
>>>>>
>>>>> @@ -180,12 +180,12 @@ WriteUnaligned32 (
>>>>> UINT64
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> ReadUnaligned64 (
>>>>>
>>>>> - IN CONST UINT64 *Buffer
>>>>>
>>>>> + IN CONST VOID *Buffer
>>>>>
>>>>> )
>>>>>
>>>>> {
>>>>>
>>>>> ASSERT (Buffer != NULL);
>>>>>
>>>>>
>>>>>
>>>>> - return *Buffer;
>>>>>
>>>>> + return *(CONST UINT64 *) Buffer;
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>> /**
>>>>>
>>>>> @@ -206,11 +206,11 @@ ReadUnaligned64 (
>>>>> UINT64
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> WriteUnaligned64 (
>>>>>
>>>>> - OUT UINT64 *Buffer,
>>>>>
>>>>> + OUT VOID *Buffer,
>>>>>
>>>>> IN UINT64 Value
>>>>>
>>>>> )
>>>>>
>>>>> {
>>>>>
>>>>> ASSERT (Buffer != NULL);
>>>>>
>>>>>
>>>>>
>>>>> - return *Buffer = Value;
>>>>>
>>>>> + return *(UINT64 *) Buffer = Value;
>>>>>
>>>>> }
>>>>>
>>>>> diff --git a/MdePkg/Include/Library/BaseLib.h
>>>>> b/MdePkg/Include/Library/BaseLib.h
>>>>> index 2452c1d92e51..4d30f0539c6b 100644
>>>>> --- a/MdePkg/Include/Library/BaseLib.h
>>>>> +++ b/MdePkg/Include/Library/BaseLib.h
>>>>> @@ -3420,7 +3420,7 @@ DivS64x64Remainder (
>>>>> UINT16
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> ReadUnaligned16 (
>>>>>
>>>>> - IN CONST UINT16 *Buffer
>>>>>
>>>>> + IN CONST VOID *Buffer
>>>>>
>>>>> );
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> @@ -3442,7 +3442,7 @@ ReadUnaligned16 (
>>>>> UINT16
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> WriteUnaligned16 (
>>>>>
>>>>> - OUT UINT16 *Buffer,
>>>>>
>>>>> + OUT VOID *Buffer,
>>>>>
>>>>> IN UINT16 Value
>>>>>
>>>>> );
>>>>>
>>>>>
>>>>>
>>>>> @@ -3463,7 +3463,7 @@ WriteUnaligned16 (
>>>>> UINT32
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> ReadUnaligned24 (
>>>>>
>>>>> - IN CONST UINT32 *Buffer
>>>>>
>>>>> + IN CONST VOID *Buffer
>>>>>
>>>>> );
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> @@ -3485,7 +3485,7 @@ ReadUnaligned24 (
>>>>> UINT32
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> WriteUnaligned24 (
>>>>>
>>>>> - OUT UINT32 *Buffer,
>>>>>
>>>>> + OUT VOID *Buffer,
>>>>>
>>>>> IN UINT32 Value
>>>>>
>>>>> );
>>>>>
>>>>>
>>>>>
>>>>> @@ -3506,7 +3506,7 @@ WriteUnaligned24 (
>>>>> UINT32
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> ReadUnaligned32 (
>>>>>
>>>>> - IN CONST UINT32 *Buffer
>>>>>
>>>>> + IN CONST VOID *Buffer
>>>>>
>>>>> );
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> @@ -3528,7 +3528,7 @@ ReadUnaligned32 (
>>>>> UINT32
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> WriteUnaligned32 (
>>>>>
>>>>> - OUT UINT32 *Buffer,
>>>>>
>>>>> + OUT VOID *Buffer,
>>>>>
>>>>> IN UINT32 Value
>>>>>
>>>>> );
>>>>>
>>>>>
>>>>>
>>>>> @@ -3549,7 +3549,7 @@ WriteUnaligned32 (
>>>>> UINT64
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> ReadUnaligned64 (
>>>>>
>>>>> - IN CONST UINT64 *Buffer
>>>>>
>>>>> + IN CONST VOID *Buffer
>>>>>
>>>>> );
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> @@ -3571,7 +3571,7 @@ ReadUnaligned64 (
>>>>> UINT64
>>>>>
>>>>> EFIAPI
>>>>>
>>>>> WriteUnaligned64 (
>>>>>
>>>>> - OUT UINT64 *Buffer,
>>>>>
>>>>> + OUT VOID *Buffer,
>>>>>
>>>>> IN UINT64 Value
>>>>>
>>>>> );
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> 2.31.1
>>>>
>>>>
>>>>
>
>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain
2021-08-10 19:49 ` Andrew Fish
@ 2021-08-10 21:24 ` Marvin Häuser
2021-08-10 21:54 ` Andrew Fish
0 siblings, 1 reply; 42+ messages in thread
From: Marvin Häuser @ 2021-08-10 21:24 UTC (permalink / raw)
To: Andrew Fish, edk2-devel-groups-io
Cc: Bob Feng, Liming Gao, Yuwei Chen, Vitaly Cheptsov
On 10/08/2021 21:49, Andrew Fish wrote:
> I forgot I have an Ubuntu VM so we can take a look at an ELF to
> PE/COFF toolchain example ….
>
> So it looks like nasm[1] “does the right thing”(tm) and places a
> .rodata section in the object file….
>
> But it looks like GenFw[2] smashed the .rodata section into .data
> section when it translated to PE/COFF. This was the issue I was
> worried about….
>
> Actually I should probably look at the ELF executable too[3]. Yikes no
> .rodata in the ELF. So it looks likely that the linker scripts are
> smashing .rodata into .data.
They smash it into .text, as linked in the other mail [1]. This is fine
honestly, just I want some toggle that decides consistently for all
toolchains what to do (merge into .text or let it live as a separate
section). But that'd be a task for another patch.
Best regards,
Marvin
[1]
https://github.com/tianocore/edk2/blob/d02dbb53cd78de799e6afaa237e98771fb5148db/BaseTools/Scripts/GccBase.lds#L25
> So there may be multiple issues with ELF toolchains that need to
> change to end up with a .rodata in the PE/COFF.
>
> [1]$ objdump -fh
> Build/OvmfX64/DEBUG_GCC5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>
> Build/OvmfX64/DEBUG_GCC5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
> file format elf64-x86-64
> architecture: i386:x86-64, flags 0x00000011:
> HAS_RELOC, HAS_SYMS
> start address 0x0000000000000000
>
> Sections:
> Idx Name Size VMA LMA File off Algn
> 0 .rodata 00000006 0000000000000000 0000000000000000
> 00000200 2**2
> CONTENTS, ALLOC, LOAD, READONLY, DATA
> 1 .text 0000001d 0000000000000000 0000000000000000
> 00000210 2**4
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
>
>
>
> [2]$ objdump -fh
> Build/OvmfX64/DEBUG_GCC5/X64/UefiCpuPkg/CpuDxe/CpuDxe/DEBUG/CpuDxe.efi
>
> Build/OvmfX64/DEBUG_GCC5/X64/UefiCpuPkg/CpuDxe/CpuDxe/DEBUG/CpuDxe.efi:
> file format pei-x86-64
> architecture: i386:x86-64, flags 0x0000010b:
> HAS_RELOC, EXEC_P, HAS_DEBUG, D_PAGED
> start address 0x0000000000008eb1
>
> Sections:
> Idx Name Size VMA LMA File off Algn
> 0 .text 0000ff80 0000000000000240 0000000000000240
> 00000240 2**4
> CONTENTS, ALLOC, LOAD, READONLY, CODE
> 1 .data 00000540 00000000000101c0 00000000000101c0
> 000101c0 2**4
> CONTENTS, ALLOC, LOAD, DATA
> 2 .reloc 00000080 0000000000010700 0000000000010700
> 00010700 2**2
> CONTENTS, ALLOC, LOAD, READONLY, DATA
>
> [3] $ objdump -fh
> Build/OvmfX64/DEBUG_GCC5/X64/UefiCpuPkg/CpuDxe/CpuDxe/DEBUG/CpuDxe.dll
>
> Build/OvmfX64/DEBUG_GCC5/X64/UefiCpuPkg/CpuDxe/CpuDxe/DEBUG/CpuDxe.dll:
> file format elf64-x86-64
> architecture: i386:x86-64, flags 0x00000013:
> HAS_RELOC, EXEC_P, HAS_SYMS
> start address 0x0000000000008eb1
>
> Sections:
> Idx Name Size VMA LMA File off Algn
> 0 .text 0000ff46 0000000000000240 0000000000000240
> 000000c0 2**6
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
> 1 .data 00000490 00000000000101c0 00000000000101c0
> 00010040 2**6
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 2 .rela 000004f8 0000000000010680 0000000000010680
> 000104d0 2**3
> CONTENTS, READONLY
> 3 .build-id 00000024 0000000000010b78 0000000000010b78
> 000109c8 2**2
> CONTENTS, READONLY
> 4 .gnu_debuglink 00000014 0000000000000000 0000000000000000
> 000109ec 2**2
> CONTENTS, READONLY
>
>
>
> Thanks,
>
> Andrew Fish
>
>> On Aug 10, 2021, at 12:35 PM, Andrew Fish via groups.io
>> <http://groups.io> <afish=apple.com@groups.io
>> <mailto:afish=apple.com@groups.io>> wrote:
>>
>>
>>
>>> On Aug 10, 2021, at 1:27 AM, Marvin Häuser <mhaeuser@posteo.de
>>> <mailto:mhaeuser@posteo.de>> wrote:
>>>
>>> On 10/08/2021 06:19, Andrew Fish via groups.io <http://groups.io/>
>>> wrote:
>>>>
>>>>
>>>>> On Aug 9, 2021, at 2:51 AM, Marvin Häuser <mhaeuser@posteo.de
>>>>> <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de
>>>>> <mailto:mhaeuser@posteo.de>>> wrote:
>>>>>
>>>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3318
>>>>> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>
>>>>> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318
>>>>> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>>
>>>>>
>>>>> Different toolchains of the EDK II build system may generate ELF or
>>>>> Mach-O files, which use the ".rodata" naming convention, or PE/COFF
>>>>> files, which use the ".rdata" naming convention. Section permissions
>>>>> are chosen based on this name per file format by NASM. To harden
>>>>> image permission security, and to save space by avoiding both
>>>>> ".rdata" and ".rodata" sections being emitted, expose the appropriate
>>>>> name as a preprocessor constant.
>>>>>
>>>>> Cc: Bob Feng <bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>
>>>>> <mailto:bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>>>
>>>>> Cc: Liming Gao <gaoliming@byosoft.com.cn
>>>>> <mailto:gaoliming@byosoft.com.cn> <mailto:gaoliming@byosoft.com.cn
>>>>> <mailto:gaoliming@byosoft.com.cn>>>
>>>>> Cc: Yuwei Chen <yuwei.chen@intel.com <mailto:yuwei.chen@intel.com>
>>>>> <mailto:yuwei.chen@intel.com <mailto:yuwei.chen@intel.com>>>
>>>>> Cc: Vitaly Cheptsov <vit9696@protonmail.com
>>>>> <mailto:vit9696@protonmail.com> <mailto:vit9696@protonmail.com
>>>>> <mailto:vit9696@protonmail.com>>>
>>>>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de
>>>>> <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de
>>>>> <mailto:mhaeuser@posteo.de>>>
>>>>> ---
>>>>> BaseTools/Conf/tools_def.template | 172 ++++++++++----------
>>>>> 1 file changed, 86 insertions(+), 86 deletions(-)
>>>>>
>>>>> diff --git a/BaseTools/Conf/tools_def.template
>>>>> b/BaseTools/Conf/tools_def.template
>>>>> index 2e6b382ab623..84d464916c4d 100755
>>>>> --- a/BaseTools/Conf/tools_def.template
>>>>> +++ b/BaseTools/Conf/tools_def.template
>>>>> @@ -463,9 +463,9 @@ NOOPT_VS2008_IA32_CC_FLAGS = /nologo /c
>>>>> /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>> RELEASE_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>>> /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -495,9 +495,9 @@ NOOPT_VS2008_X64_CC_FLAGS = /nologo /c
>>>>> /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>> RELEASE_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -574,9 +574,9 @@ NOOPT_VS2008x86_IA32_CC_FLAGS = /nologo
>>>>> /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>> RELEASE_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>>> /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -605,9 +605,9 @@ NOOPT_VS2008x86_X64_CC_FLAGS = /nologo
>>>>> /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>> RELEASE_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -688,9 +688,9 @@ NOOPT_VS2010_IA32_CC_FLAGS = /nologo /c
>>>>> /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>> RELEASE_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>>> /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -720,9 +720,9 @@ NOOPT_VS2010_X64_CC_FLAGS = /nologo /c
>>>>> /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>> RELEASE_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -799,9 +799,9 @@ NOOPT_VS2010x86_IA32_CC_FLAGS = /nologo
>>>>> /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>> RELEASE_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>>> /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -831,9 +831,9 @@ NOOPT_VS2010x86_X64_CC_FLAGS = /nologo
>>>>> /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>> RELEASE_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -913,9 +913,9 @@ NOOPT_VS2012_IA32_CC_FLAGS = /nologo
>>>>> /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>> RELEASE_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>>> /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -945,9 +945,9 @@ NOOPT_VS2012_X64_CC_FLAGS = /nologo /c
>>>>> /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>> RELEASE_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1024,9 +1024,9 @@ NOOPT_VS2012x86_IA32_CC_FLAGS = /nologo
>>>>> /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>> RELEASE_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>>> /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1056,9 +1056,9 @@ NOOPT_VS2012x86_X64_CC_FLAGS = /nologo
>>>>> /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>> RELEASE_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1138,9 +1138,9 @@ NOOPT_VS2013_IA32_CC_FLAGS = /nologo
>>>>> /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>> RELEASE_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>>> /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1170,9 +1170,9 @@ NOOPT_VS2013_X64_CC_FLAGS = /nologo /c
>>>>> /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>> RELEASE_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1249,9 +1249,9 @@ NOOPT_VS2013x86_IA32_CC_FLAGS = /nologo
>>>>> /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>> RELEASE_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>>> /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1281,9 +1281,9 @@ NOOPT_VS2013x86_X64_CC_FLAGS = /nologo
>>>>> /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>> RELEASE_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1364,9 +1364,9 @@ NOOPT_VS2015_IA32_CC_FLAGS = /nologo
>>>>> /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>> RELEASE_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>>> /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1396,9 +1396,9 @@ NOOPT_VS2015_X64_CC_FLAGS = /nologo /c
>>>>> /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>> RELEASE_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1476,9 +1476,9 @@ NOOPT_VS2015x86_IA32_CC_FLAGS = /nologo
>>>>> /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>> RELEASE_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>>> /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1508,9 +1508,9 @@ NOOPT_VS2015x86_X64_CC_FLAGS = /nologo
>>>>> /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>> RELEASE_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1586,9 +1586,9 @@ NOOPT_VS2017_IA32_CC_FLAGS = /nologo
>>>>> /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>>> RELEASE_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1616,9 +1616,9 @@ NOOPT_VS2017_X64_CC_FLAGS = /nologo /c
>>>>> /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>> RELEASE_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP
>>>>> /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG
>>>>> /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>>>>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER
>>>>> /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1744,9 +1744,9 @@ NOOPT_VS2019_IA32_CC_FLAGS = /nologo
>>>>> /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>>> RELEASE_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1774,9 +1774,9 @@ NOOPT_VS2019_X64_CC_FLAGS = /nologo /c
>>>>> /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>> RELEASE_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>> /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP
>>>>> /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG
>>>>> /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>>>>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER
>>>>> /MERGE:.rdata=.data
>>>>>
>>>>> @@ -2030,7 +2030,7 @@ DEFINE GCC_PP_FLAGS =
>>>>> -E -x assembler-with-cpp -include A
>>>>> *_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
>>>>>
>>>>> *_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>
>>>>> *_GCC48_IA32_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_GCC48_IA32_NASM_FLAGS = -f elf32
>>>>>
>>>>> +*_GCC48_IA32_NASM_FLAGS = -f elf32
>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
>>>>>
>>>>> RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
>>>>> -Wno-unused-but-set-variable
>>>>>
>>>>> @@ -2058,7 +2058,7 @@ RELEASE_GCC48_IA32_CC_FLAGS =
>>>>> DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>>> *_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
>>>>>
>>>>> *_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>
>>>>> *_GCC48_X64_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_GCC48_X64_NASM_FLAGS = -f elf64
>>>>>
>>>>> +*_GCC48_X64_NASM_FLAGS = -f elf64
>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
>>>>>
>>>>> RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
>>>>> -Wno-unused-but-set-variable
>>>>>
>>>>> @@ -2170,7 +2170,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS =
>>>>> DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
>>>>> *_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
>>>>>
>>>>> *_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>
>>>>> *_GCC49_IA32_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_GCC49_IA32_NASM_FLAGS = -f elf32
>>>>>
>>>>> +*_GCC49_IA32_NASM_FLAGS = -f elf32
>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
>>>>>
>>>>> RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
>>>>> -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>>
>>>>> @@ -2198,7 +2198,7 @@ RELEASE_GCC49_IA32_CC_FLAGS =
>>>>> DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>>> *_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
>>>>>
>>>>> *_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>
>>>>> *_GCC49_X64_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_GCC49_X64_NASM_FLAGS = -f elf64
>>>>>
>>>>> +*_GCC49_X64_NASM_FLAGS = -f elf64
>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
>>>>>
>>>>> RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
>>>>> -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>>
>>>>> @@ -2316,7 +2316,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z
>>>>> common-page-size=0x20
>>>>> *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
>>>>>
>>>>> *_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>
>>>>> *_GCC5_IA32_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_GCC5_IA32_NASM_FLAGS = -f elf32
>>>>>
>>>>> +*_GCC5_IA32_NASM_FLAGS = -f elf32
>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Os
>>>>>
>>>>> DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS)
>>>>> -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
>>>>>
>>>>> @@ -2348,7 +2348,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS =
>>>>> DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,
>>>>> *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
>>>>>
>>>>> *_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>
>>>>> *_GCC5_X64_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_GCC5_X64_NASM_FLAGS = -f elf64
>>>>>
>>>>> +*_GCC5_X64_NASM_FLAGS = -f elf64
>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto
>>>>> -DUSING_LTO -Os
>>>>>
>>>>> DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
>>>>>
>>>>> @@ -2589,7 +2589,7 @@ DEFINE CLANG38_ALL_CC_FLAGS =
>>>>> DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNIN
>>>>> *_CLANG38_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32
>>>>> -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>>
>>>>> *_CLANG38_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>
>>>>> *_CLANG38_IA32_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_CLANG38_IA32_NASM_FLAGS = -f elf32
>>>>>
>>>>> +*_CLANG38_IA32_NASM_FLAGS = -f elf32
>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>> *_CLANG38_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS)
>>>>> DEF(CLANG38_IA32_TARGET)
>>>>>
>>>>> *_CLANG38_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>>>>> DEF(CLANG38_IA32_TARGET)
>>>>>
>>>>> *_CLANG38_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>>>>> DEF(CLANG38_IA32_TARGET)
>>>>>
>>>>> @@ -2626,7 +2626,7 @@ NOOPT_CLANG38_IA32_DLINK2_FLAGS =
>>>>> DEF(GCC5_IA32_DLINK2_FLAGS) -O0
>>>>> *_CLANG38_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64
>>>>> DEF(CLANG38_X64_TARGET)
>>>>>
>>>>> *_CLANG38_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>
>>>>> *_CLANG38_X64_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_CLANG38_X64_NASM_FLAGS = -f elf64
>>>>>
>>>>> +*_CLANG38_X64_NASM_FLAGS = -f elf64
>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>> *_CLANG38_X64_PP_FLAGS = DEF(GCC_PP_FLAGS)
>>>>> DEF(CLANG38_X64_TARGET)
>>>>>
>>>>> *_CLANG38_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>>>>> DEF(CLANG38_X64_TARGET)
>>>>>
>>>>> *_CLANG38_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>>>>> DEF(CLANG38_X64_TARGET)
>>>>>
>>>>> @@ -2777,7 +2777,7 @@ DEFINE CLANGPDB_ALL_CC_FLAGS =
>>>>> DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARN
>>>>> *_CLANGPDB_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32
>>>>> -fno-lto DEF(CLANGPDB_IA32_TARGET)
>>>>>
>>>>> *_CLANGPDB_IA32_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m32
>>>>> -march=i386 DEF(CLANGPDB_IA32_TARGET)
>>>>>
>>>>> *_CLANGPDB_IA32_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_CLANGPDB_IA32_NASM_FLAGS = -f win32
>>>>>
>>>>> +*_CLANGPDB_IA32_NASM_FLAGS = -f win32
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> *_CLANGPDB_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS)
>>>>> DEF(CLANGPDB_IA32_TARGET)
>>>>>
>>>>> *_CLANGPDB_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>>>>> DEF(CLANGPDB_IA32_TARGET)
>>>>>
>>>>> *_CLANGPDB_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>>>>> DEF(CLANGPDB_IA32_TARGET)
>>>>>
>>>>> @@ -2811,7 +2811,7 @@ NOOPT_CLANGPDB_IA32_DLINK2_FLAGS =
>>>>> *_CLANGPDB_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64
>>>>> -fno-lto DEF(CLANGPDB_X64_TARGET)
>>>>>
>>>>> *_CLANGPDB_X64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m64
>>>>> DEF(CLANGPDB_X64_TARGET)
>>>>>
>>>>> *_CLANGPDB_X64_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_CLANGPDB_X64_NASM_FLAGS = -f win64
>>>>>
>>>>> +*_CLANGPDB_X64_NASM_FLAGS = -f win64
>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> *_CLANGPDB_X64_PP_FLAGS = DEF(GCC_PP_FLAGS)
>>>>> DEF(CLANGPDB_X64_TARGET)
>>>>>
>>>>> *_CLANGPDB_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>>>>> DEF(CLANGPDB_X64_TARGET)
>>>>>
>>>>> *_CLANGPDB_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>>>>> DEF(CLANGPDB_X64_TARGET)
>>>>>
>>>>> @@ -2878,7 +2878,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS =
>>>>> -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
>>>>> *_CLANGDWARF_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32
>>>>> -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>>
>>>>> *_CLANGDWARF_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>
>>>>> *_CLANGDWARF_IA32_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32
>>>>>
>>>>> +*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32
>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>> *_CLANGDWARF_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS)
>>>>> DEF(CLANG38_IA32_TARGET)
>>>>>
>>>>> *_CLANGDWARF_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>>>>> DEF(CLANG38_IA32_TARGET)
>>>>>
>>>>> *_CLANGDWARF_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>>>>> DEF(CLANG38_IA32_TARGET)
>>>>>
>>>>> @@ -2914,7 +2914,7 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS =
>>>>> DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -
>>>>> *_CLANGDWARF_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64
>>>>> DEF(CLANG38_X64_TARGET)
>>>>>
>>>>> *_CLANGDWARF_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>
>>>>> *_CLANGDWARF_X64_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_CLANGDWARF_X64_NASM_FLAGS = -f elf64
>>>>>
>>>>> +*_CLANGDWARF_X64_NASM_FLAGS = -f elf64
>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>> *_CLANGDWARF_X64_PP_FLAGS = DEF(GCC_PP_FLAGS)
>>>>> DEF(CLANG38_X64_TARGET)
>>>>>
>>>>> *_CLANGDWARF_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>>>>> DEF(CLANG38_X64_TARGET)
>>>>>
>>>>> *_CLANGDWARF_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>>>>> DEF(CLANG38_X64_TARGET)
>>>>>
>>>>> @@ -2985,7 +2985,7 @@ RELEASE_XCODE5_IA32_DLINK_FLAGS = -arch
>>>>> i386 -u _$(IMAGE_ENTRY_POINT) -e _$
>>>>> DEBUG_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>>
>>>>> NOOPT_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>>
>>>>> RELEASE_XCODE5_IA32_ASM_FLAGS = -arch i386
>>>>>
>>>>> - *_XCODE5_IA32_NASM_FLAGS = -f macho32
>>>>>
>>>>> + *_XCODE5_IA32_NASM_FLAGS = -f macho32
>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>>
>>>>>
>>>>
>>>> An EFI Mach-O file does not contain a .rodata section. A Mach-O
>>>> contains a __DATA segment that is broken up into sections. For a
>>>> typical EFI image there are __const, __data, __bss sections in the
>>>> __DATA segment [1].
>>>
>>> Yes, and ".rodata" is almost a synonym for "__DATA,__const", with a
>>> small exception [1]. Maybe it'd be clearer if the macro was renamed
>>> to "NASM_RODATA_SECTION_NAME", to indicate this is not just a "raw"
>>> name, but NASM gives it a semantic meaning?
>>>
>>>>
>>>> The mtoc [2] tool used to convert mach-O to PE/COFF converts the
>>>> entire __DATA segment (__const, __data, and __bss) into the .data
>>>> section. Thus adding any kind of new data section is a no-op at best.
>>>
>>> This is a part I missed, because I do not have an Xcode toolchain at
>>> hand, so thanks for investigating. However this, in my opinion, is a
>>> flaw with Mach-O/mtoc and not with my patch. It seems like the only
>>> difference between __TEXT,__const and __DATA,__const is whether the
>>> data is targeted by a relocation or not. Such a concept does not
>>> exist for PE/COFF (and I think not even for ELF, but I'm not too
>>> familiar with it), thus the logical PE/COFF section __DATA,__const
>>> should be merged into is .rdata (and .rdata may or may not be merged
>>> into .text in an earlier step, I assume transitivity). I could
>>> change the macro definition to explicitly declare __TEXT,__const,
>>> but that would still put the compiler-emitted data in the wrong
>>> section. Does Xcode provide anything remotely similar to GNU linker
>>> scripts which we can use to move the section?
>>>
>>> Please also note that .rodata is used for Xcode-based toolchains
>>> already (in fact, all toolchains, and this is the issue), I'm not
>>> regressing anything. I just expected it to work fine as-is. This
>>> patch mainly fixed PE/COFF-based toolchains, which get both .rdata
>>> from the compiler and .rodata with RX permissions from NASM, because
>>> ".rodata" only has a semantic meaning for ELF and Mach-O outputs,
>>> but not for PE/COFF.
>>>
>>>>
>>>> If you want something to be read only for Xcode/clang you are
>>>> better off putting it in the __TEXT section [3]. The __TEXT section
>>>> is read only and for X64 can not even contain relocations.
>>>
>>> Well, this kind of is an issue. We would need to introduce an
>>> arbitrary constraint on the relocation part that holds only for
>>> Xcode-based toolchains. Does the compiler emit an error when data in
>>> __TEXT,__const is targeted by a relocation?
>>
>> The Xcode linker emits a fatal error on X64 for a relocation in the
>> __TEXT section, everything needs to be RIP relative and the compiler
>> does that for free. We generally only run into this for hand coded
>> assembler and the fix is to use RIP relative addressing in the assembly.
>>
>>> Also see above regarding compiler-emitted __DATA,__const.
>>>
>>
>> OK so the current nasm `SECTION .rodata`[1] gets mapped to
>> __TEXT,__const[2] for Xcode clang, and this is done by nasm (I dumped
>> the object file). GenFw and mtoc only run on executables, also they
>> tend to be conservative as they need to keep the layout the same and
>> the relative layout between sections the same, but in this case it is
>> nasm placing the data in the text section.
>>
>> So what I’d like to see in the patch is to define RODATA_SECTION_NAME
>> to match what is actually happening. So for XCODE that would be
>> `__TEXT,__const` not `.rodata`. We should double check what is
>> happening for ELF on x86, ARM, RiskV, etc. and do the same thing. I
>> assume all the tools that generate PE/COFF directly are good with
>> .rodata? I think it is likely as simple as dumping the EFL object
>> file in objdump or gdb for the given toolchain (like my Xcode example).
>>
>> TL;DR It looks to me like nasm does some SECTION translations under
>> the hood to make code portable, and I’d like to make sure we capture
>> those in the new NASM_RODATA_SECTION_NAME. If some one is doing a
>> security review having NASM_RODATA_SECTION_NAME is going to imply
>> that a .rodata section is being used by that specific toolchain, and
>> I think that is much worse than the current “magic” behavior in nasm.
>> We are much better off explaining what is really happening, since it
>> is not very obvious.
>>
>> [1]
>> https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14
>> <https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14>
>>
>> [2] $otool -V -s __TEXT
>> __constBuild/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>> Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
>> Contents of (__TEXT,__const) section
>> 0000001d 7f 03 80 1f 00 00
>>
>> $ otool -l
>> Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>> Build/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
>> Load command 0
>> cmd LC_SEGMENT_64
>> cmdsize 232
>> segname
>> vmaddr 0x0000000000000000
>> vmsize 0x0000000000000026
>> fileoff 288
>> filesize 38
>> maxprot 0x00000007
>> initprot 0x00000007
>> nsects 2
>> flags 0x0
>> Section
>> sectname __text
>> segname __TEXT
>> addr 0x0000000000000000
>> size 0x000000000000001d
>> offset 288
>> align 2^0 (1)
>> reloff 328
>> nreloc 2
>> flags 0x80000500
>> reserved1 0
>> reserved2 0
>> Section
>> sectname __const
>> segname __TEXT
>> addr 0x000000000000001d
>> size 0x0000000000000006
>> offset 320
>> align 2^0 (1)
>> reloff 0
>> nreloc 0
>> flags 0x00000000
>> reserved1 0
>> reserved2 0
>> Load command 1
>> cmd LC_SYMTAB
>> cmdsize 24
>> symoff 344
>> nsyms 3
>> stroff 392
>> strsize 63
>>
>> Thanks,
>>
>> Andrew Fish
>>
>>
>>> Thanks for your notes and insight!
>>>
>>> Best regards,
>>> Marvin
>>>
>>>
>>> [1]
>>> "For compatibility with other Unix platforms, the following standard
>>> names are also supported:
>>> [...]
>>> .rodata = __DATA,__const data
>>> [...]
>>> If the .rodata section contains no relocations, it is instead put
>>> into the __TEXT,__const section unless this section has already been
>>> specified explicitly."
>>> https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html
>>> <https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html>
>>>
>>>>
>>>> [1] otool -lh DxeCore.dll
>>>> ...
>>>> Load command 1
>>>> cmd LC_SEGMENT_64
>>>> cmdsize 312
>>>> segname __DATA
>>>> vmaddr 0x000000000002b000
>>>> vmsize 0x0000000000147000
>>>> fileoff 180224
>>>> filesize 8192
>>>> maxprot 0x00000003
>>>> initprot 0x00000003
>>>> nsects 3
>>>> flags 0x0
>>>> Section
>>>> sectname __const
>>>> segname __DATA
>>>> addr 0x000000000002b000
>>>> size 0x0000000000000718
>>>> offset 180224
>>>> align 2^4 (16)
>>>> reloff 0
>>>> nreloc 0
>>>> flags 0x00000000
>>>> reserved1 0
>>>> reserved2 0
>>>> Section
>>>> sectname __data
>>>> segname __DATA
>>>> addr 0x000000000002b720
>>>> size 0x00000000000014f0
>>>> offset 182048
>>>> align 2^4 (16)
>>>> reloff 0
>>>> nreloc 0
>>>> flags 0x00000000
>>>> reserved1 0
>>>> reserved2 0
>>>> Section
>>>> sectname __bss
>>>> segname __DATA
>>>> addr 0x000000000002cc10
>>>> size 0x0000000000144e11
>>>> offset 0
>>>> align 2^4 (16)
>>>> reloff 0
>>>> nreloc 0
>>>> flags 0x00000001
>>>> reserved1 0
>>>> reserved2 0
>>>> …
>>>>
>>>> [2]
>>>> https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html
>>>> <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html>
>>>> <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html
>>>> <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html>>
>>>>
>>>>
>>>> [3] otool more output…
>>>> Load command 0
>>>> cmd LC_SEGMENT_64
>>>> cmdsize 392
>>>> segname __TEXT
>>>> vmaddr 0x0000000000000240
>>>> vmsize 0x00000000000296c0
>>>> fileoff 1184
>>>> filesize 169664
>>>> maxprot 0x00000005
>>>> initprot 0x00000005
>>>> nsects 4
>>>> flags 0x0
>>>> Section
>>>> sectname __text
>>>> segname __TEXT
>>>> addr 0x0000000000000240
>>>> size 0x000000000002489f
>>>> offset 1184
>>>> align 2^3 (8)
>>>> reloff 0
>>>> nreloc 0
>>>> flags 0x80000400
>>>> reserved1 0
>>>> reserved2 0
>>>> Section
>>>> sectname __cstring
>>>> segname __TEXT
>>>> addr 0x0000000000024ae0
>>>> size 0x000000000000496d
>>>> offset 150848
>>>> align 2^4 (16)
>>>> reloff 0
>>>> nreloc 0
>>>> flags 0x00000002
>>>> reserved1 0
>>>> reserved2 0
>>>> Section
>>>> sectname __ustring
>>>> segname __TEXT
>>>> addr 0x000000000002944e
>>>> size 0x0000000000000048
>>>> offset 169646
>>>> align 2^1 (2)
>>>> reloff 0
>>>> nreloc 0
>>>> flags 0x00000000
>>>> reserved1 0
>>>> reserved2 0
>>>> Section
>>>> sectname __const
>>>> segname __TEXT
>>>> addr 0x00000000000294a0
>>>> size 0x0000000000000448
>>>> offset 169728
>>>> align 2^4 (16)
>>>> reloff 0
>>>> nreloc 0
>>>> flags 0x00000000
>>>> reserved1 0
>>>> reserved2 0
>>>>
>>>> Thanks,
>>>>
>>>> Andrew Fish
>>>>
>>>>>
>>>>>
>>>>> DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os -Wall
>>>>> -Werror -include AutoGen.h -funsigned-char -fno-stack-protector
>>>>> -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic
>>>>> -mno-implicit-float -mms-bitfields -msoft-float
>>>>> -Wno-unused-parameter -Wno-missing-braces
>>>>> -Wno-missing-field-initializers -Wno-tautological-compare
>>>>> -Wno-sign-compare -Wno-varargs
>>>>> -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang
>>>>> $(PLATFORM_FLAGS)
>>>>>
>>>>> @@ -3003,7 +3003,7 @@ RELEASE_XCODE5_X64_DLINK_FLAGS = -arch
>>>>> x86_64 -u _$(IMAGE_ENTRY_POINT) -e _
>>>>> DEBUG_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>>
>>>>> NOOPT_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>>
>>>>> RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64
>>>>>
>>>>> - *_XCODE5_X64_NASM_FLAGS = -f macho64
>>>>>
>>>>> + *_XCODE5_X64_NASM_FLAGS = -f macho64
>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>> *_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp -include
>>>>> AutoGen.h
>>>>>
>>>>> *_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include
>>>>> $(MODULE_NAME)StrDefs.h
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> 2.31.1
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>
>>
>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain
2021-08-10 19:35 ` Andrew Fish
@ 2021-08-10 21:30 ` Marvin Häuser
2021-08-10 21:58 ` Andrew Fish
0 siblings, 1 reply; 42+ messages in thread
From: Marvin Häuser @ 2021-08-10 21:30 UTC (permalink / raw)
To: devel, afish; +Cc: Bob Feng, Liming Gao, Yuwei Chen, Vitaly Cheptsov
On 10/08/2021 21:35, Andrew Fish via groups.io wrote:
>
>
>> On Aug 10, 2021, at 1:27 AM, Marvin Häuser <mhaeuser@posteo.de
>> <mailto:mhaeuser@posteo.de>> wrote:
>>
>> On 10/08/2021 06:19, Andrew Fish via groups.io <http://groups.io> wrote:
>>>
>>>
>>>> On Aug 9, 2021, at 2:51 AM, Marvin Häuser <mhaeuser@posteo.de
>>>> <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de
>>>> <mailto:mhaeuser@posteo.de>>> wrote:
>>>>
>>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3318
>>>> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>
>>>> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318
>>>> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>>
>>>>
>>>> Different toolchains of the EDK II build system may generate ELF or
>>>> Mach-O files, which use the ".rodata" naming convention, or PE/COFF
>>>> files, which use the ".rdata" naming convention. Section permissions
>>>> are chosen based on this name per file format by NASM. To harden
>>>> image permission security, and to save space by avoiding both
>>>> ".rdata" and ".rodata" sections being emitted, expose the appropriate
>>>> name as a preprocessor constant.
>>>>
>>>> Cc: Bob Feng <bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>
>>>> <mailto:bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>>>
>>>> Cc: Liming Gao <gaoliming@byosoft.com.cn
>>>> <mailto:gaoliming@byosoft.com.cn> <mailto:gaoliming@byosoft.com.cn
>>>> <mailto:gaoliming@byosoft.com.cn>>>
>>>> Cc: Yuwei Chen <yuwei.chen@intel.com <mailto:yuwei.chen@intel.com>
>>>> <mailto:yuwei.chen@intel.com <mailto:yuwei.chen@intel.com>>>
>>>> Cc: Vitaly Cheptsov <vit9696@protonmail.com
>>>> <mailto:vit9696@protonmail.com> <mailto:vit9696@protonmail.com
>>>> <mailto:vit9696@protonmail.com>>>
>>>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de
>>>> <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de
>>>> <mailto:mhaeuser@posteo.de>>>
>>>> ---
>>>> BaseTools/Conf/tools_def.template | 172 ++++++++++----------
>>>> 1 file changed, 86 insertions(+), 86 deletions(-)
>>>>
>>>> diff --git a/BaseTools/Conf/tools_def.template
>>>> b/BaseTools/Conf/tools_def.template
>>>> index 2e6b382ab623..84d464916c4d 100755
>>>> --- a/BaseTools/Conf/tools_def.template
>>>> +++ b/BaseTools/Conf/tools_def.template
>>>> @@ -463,9 +463,9 @@ NOOPT_VS2008_IA32_CC_FLAGS = /nologo /c
>>>> /WX /GS- /W4 /Gs32768 /D UNICODE
>>>> RELEASE_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>> /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -495,9 +495,9 @@ NOOPT_VS2008_X64_CC_FLAGS = /nologo /c
>>>> /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>> RELEASE_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -574,9 +574,9 @@ NOOPT_VS2008x86_IA32_CC_FLAGS = /nologo /c
>>>> /WX /GS- /W4 /Gs32768 /D UNICODE
>>>> RELEASE_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>> /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -605,9 +605,9 @@ NOOPT_VS2008x86_X64_CC_FLAGS = /nologo /c
>>>> /WX /GS- /W4 /Gs32768 /D UNICODE
>>>> RELEASE_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -688,9 +688,9 @@ NOOPT_VS2010_IA32_CC_FLAGS = /nologo /c
>>>> /WX /GS- /W4 /Gs32768 /D UNICODE
>>>> RELEASE_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>> /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -720,9 +720,9 @@ NOOPT_VS2010_X64_CC_FLAGS = /nologo /c
>>>> /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>> RELEASE_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -799,9 +799,9 @@ NOOPT_VS2010x86_IA32_CC_FLAGS = /nologo /c
>>>> /WX /GS- /W4 /Gs32768 /D UNICODE
>>>> RELEASE_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>> /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -831,9 +831,9 @@ NOOPT_VS2010x86_X64_CC_FLAGS = /nologo /c
>>>> /WX /GS- /W4 /Gs32768 /D UNICODE
>>>> RELEASE_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -913,9 +913,9 @@ NOOPT_VS2012_IA32_CC_FLAGS = /nologo
>>>> /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>> RELEASE_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>> /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -945,9 +945,9 @@ NOOPT_VS2012_X64_CC_FLAGS = /nologo /c
>>>> /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>> RELEASE_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1024,9 +1024,9 @@ NOOPT_VS2012x86_IA32_CC_FLAGS = /nologo
>>>> /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>> RELEASE_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>> /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1056,9 +1056,9 @@ NOOPT_VS2012x86_X64_CC_FLAGS = /nologo
>>>> /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>> RELEASE_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1138,9 +1138,9 @@ NOOPT_VS2013_IA32_CC_FLAGS = /nologo
>>>> /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>> RELEASE_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>> /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1170,9 +1170,9 @@ NOOPT_VS2013_X64_CC_FLAGS = /nologo /c
>>>> /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>> RELEASE_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1249,9 +1249,9 @@ NOOPT_VS2013x86_IA32_CC_FLAGS = /nologo
>>>> /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>> RELEASE_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>> /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1281,9 +1281,9 @@ NOOPT_VS2013x86_X64_CC_FLAGS = /nologo
>>>> /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>> RELEASE_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1364,9 +1364,9 @@ NOOPT_VS2015_IA32_CC_FLAGS = /nologo
>>>> /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>> RELEASE_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>> /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1396,9 +1396,9 @@ NOOPT_VS2015_X64_CC_FLAGS = /nologo /c
>>>> /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>> RELEASE_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1476,9 +1476,9 @@ NOOPT_VS2015x86_IA32_CC_FLAGS = /nologo
>>>> /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>> RELEASE_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>> /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1508,9 +1508,9 @@ NOOPT_VS2015x86_X64_CC_FLAGS = /nologo
>>>> /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>> RELEASE_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1586,9 +1586,9 @@ NOOPT_VS2017_IA32_CC_FLAGS = /nologo
>>>> /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>> RELEASE_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1616,9 +1616,9 @@ NOOPT_VS2017_X64_CC_FLAGS = /nologo /c
>>>> /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>> RELEASE_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP
>>>> /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG
>>>> /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1744,9 +1744,9 @@ NOOPT_VS2019_IA32_CC_FLAGS = /nologo
>>>> /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>> RELEASE_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>
>>>> NOOPT_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>
>>>> -RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32
>>>>
>>>> -NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>
>>>> + DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D
>>>> /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -1774,9 +1774,9 @@ NOOPT_VS2019_X64_CC_FLAGS = /nologo /c
>>>> /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>> RELEASE_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>
>>>> NOOPT_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>
>>>>
>>>>
>>>> - DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>
>>>> -RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64
>>>>
>>>> -NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>
>>>> + DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> +NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>>
>>>>
>>>> DEBUG_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>
>>>> RELEASE_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>> /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP
>>>> /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG
>>>> /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>
>>>> @@ -2030,7 +2030,7 @@ DEFINE GCC_PP_FLAGS =
>>>> -E -x assembler-with-cpp -include A
>>>> *_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
>>>>
>>>> *_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>
>>>> *_GCC48_IA32_OBJCOPY_FLAGS =
>>>>
>>>> -*_GCC48_IA32_NASM_FLAGS = -f elf32
>>>>
>>>> +*_GCC48_IA32_NASM_FLAGS = -f elf32
>>>> -DRODATA_SECTION_NAME=.rodata
>>>>
>>>>
>>>>
>>>> DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
>>>>
>>>> RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
>>>> -Wno-unused-but-set-variable
>>>>
>>>> @@ -2058,7 +2058,7 @@ RELEASE_GCC48_IA32_CC_FLAGS =
>>>> DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>> *_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
>>>>
>>>> *_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>
>>>> *_GCC48_X64_OBJCOPY_FLAGS =
>>>>
>>>> -*_GCC48_X64_NASM_FLAGS = -f elf64
>>>>
>>>> +*_GCC48_X64_NASM_FLAGS = -f elf64
>>>> -DRODATA_SECTION_NAME=.rodata
>>>>
>>>>
>>>>
>>>> DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
>>>>
>>>> RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
>>>> -Wno-unused-but-set-variable
>>>>
>>>> @@ -2170,7 +2170,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS =
>>>> DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
>>>> *_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
>>>>
>>>> *_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>
>>>> *_GCC49_IA32_OBJCOPY_FLAGS =
>>>>
>>>> -*_GCC49_IA32_NASM_FLAGS = -f elf32
>>>>
>>>> +*_GCC49_IA32_NASM_FLAGS = -f elf32
>>>> -DRODATA_SECTION_NAME=.rodata
>>>>
>>>>
>>>>
>>>> DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
>>>>
>>>> RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
>>>> -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>
>>>> @@ -2198,7 +2198,7 @@ RELEASE_GCC49_IA32_CC_FLAGS =
>>>> DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>> *_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
>>>>
>>>> *_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>
>>>> *_GCC49_X64_OBJCOPY_FLAGS =
>>>>
>>>> -*_GCC49_X64_NASM_FLAGS = -f elf64
>>>>
>>>> +*_GCC49_X64_NASM_FLAGS = -f elf64
>>>> -DRODATA_SECTION_NAME=.rodata
>>>>
>>>>
>>>>
>>>> DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
>>>>
>>>> RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
>>>> -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>
>>>> @@ -2316,7 +2316,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z
>>>> common-page-size=0x20
>>>> *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
>>>>
>>>> *_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>
>>>> *_GCC5_IA32_OBJCOPY_FLAGS =
>>>>
>>>> -*_GCC5_IA32_NASM_FLAGS = -f elf32
>>>>
>>>> +*_GCC5_IA32_NASM_FLAGS = -f elf32
>>>> -DRODATA_SECTION_NAME=.rodata
>>>>
>>>>
>>>>
>>>> DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Os
>>>>
>>>> DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS)
>>>> -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
>>>>
>>>> @@ -2348,7 +2348,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS =
>>>> DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,
>>>> *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
>>>>
>>>> *_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>
>>>> *_GCC5_X64_OBJCOPY_FLAGS =
>>>>
>>>> -*_GCC5_X64_NASM_FLAGS = -f elf64
>>>>
>>>> +*_GCC5_X64_NASM_FLAGS = -f elf64
>>>> -DRODATA_SECTION_NAME=.rodata
>>>>
>>>>
>>>>
>>>> DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto
>>>> -DUSING_LTO -Os
>>>>
>>>> DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
>>>>
>>>> @@ -2589,7 +2589,7 @@ DEFINE CLANG38_ALL_CC_FLAGS =
>>>> DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNIN
>>>> *_CLANG38_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32
>>>> -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>
>>>> *_CLANG38_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>
>>>> *_CLANG38_IA32_OBJCOPY_FLAGS =
>>>>
>>>> -*_CLANG38_IA32_NASM_FLAGS = -f elf32
>>>>
>>>> +*_CLANG38_IA32_NASM_FLAGS = -f elf32
>>>> -DRODATA_SECTION_NAME=.rodata
>>>>
>>>> *_CLANG38_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS)
>>>> DEF(CLANG38_IA32_TARGET)
>>>>
>>>> *_CLANG38_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>>>> DEF(CLANG38_IA32_TARGET)
>>>>
>>>> *_CLANG38_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>>>> DEF(CLANG38_IA32_TARGET)
>>>>
>>>> @@ -2626,7 +2626,7 @@ NOOPT_CLANG38_IA32_DLINK2_FLAGS =
>>>> DEF(GCC5_IA32_DLINK2_FLAGS) -O0
>>>> *_CLANG38_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64
>>>> DEF(CLANG38_X64_TARGET)
>>>>
>>>> *_CLANG38_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>
>>>> *_CLANG38_X64_OBJCOPY_FLAGS =
>>>>
>>>> -*_CLANG38_X64_NASM_FLAGS = -f elf64
>>>>
>>>> +*_CLANG38_X64_NASM_FLAGS = -f elf64
>>>> -DRODATA_SECTION_NAME=.rodata
>>>>
>>>> *_CLANG38_X64_PP_FLAGS = DEF(GCC_PP_FLAGS)
>>>> DEF(CLANG38_X64_TARGET)
>>>>
>>>> *_CLANG38_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>>>> DEF(CLANG38_X64_TARGET)
>>>>
>>>> *_CLANG38_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>>>> DEF(CLANG38_X64_TARGET)
>>>>
>>>> @@ -2777,7 +2777,7 @@ DEFINE CLANGPDB_ALL_CC_FLAGS =
>>>> DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARN
>>>> *_CLANGPDB_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32
>>>> -fno-lto DEF(CLANGPDB_IA32_TARGET)
>>>>
>>>> *_CLANGPDB_IA32_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m32
>>>> -march=i386 DEF(CLANGPDB_IA32_TARGET)
>>>>
>>>> *_CLANGPDB_IA32_OBJCOPY_FLAGS =
>>>>
>>>> -*_CLANGPDB_IA32_NASM_FLAGS = -f win32
>>>>
>>>> +*_CLANGPDB_IA32_NASM_FLAGS = -f win32
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> *_CLANGPDB_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS)
>>>> DEF(CLANGPDB_IA32_TARGET)
>>>>
>>>> *_CLANGPDB_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>>>> DEF(CLANGPDB_IA32_TARGET)
>>>>
>>>> *_CLANGPDB_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>>>> DEF(CLANGPDB_IA32_TARGET)
>>>>
>>>> @@ -2811,7 +2811,7 @@ NOOPT_CLANGPDB_IA32_DLINK2_FLAGS =
>>>> *_CLANGPDB_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64
>>>> -fno-lto DEF(CLANGPDB_X64_TARGET)
>>>>
>>>> *_CLANGPDB_X64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m64
>>>> DEF(CLANGPDB_X64_TARGET)
>>>>
>>>> *_CLANGPDB_X64_OBJCOPY_FLAGS =
>>>>
>>>> -*_CLANGPDB_X64_NASM_FLAGS = -f win64
>>>>
>>>> +*_CLANGPDB_X64_NASM_FLAGS = -f win64
>>>> -DRODATA_SECTION_NAME=.rdata
>>>>
>>>> *_CLANGPDB_X64_PP_FLAGS = DEF(GCC_PP_FLAGS)
>>>> DEF(CLANGPDB_X64_TARGET)
>>>>
>>>> *_CLANGPDB_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>>>> DEF(CLANGPDB_X64_TARGET)
>>>>
>>>> *_CLANGPDB_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>>>> DEF(CLANGPDB_X64_TARGET)
>>>>
>>>> @@ -2878,7 +2878,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS =
>>>> -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
>>>> *_CLANGDWARF_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32
>>>> -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>
>>>> *_CLANGDWARF_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>
>>>> *_CLANGDWARF_IA32_OBJCOPY_FLAGS =
>>>>
>>>> -*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32
>>>>
>>>> +*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32
>>>> -DRODATA_SECTION_NAME=.rodata
>>>>
>>>> *_CLANGDWARF_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS)
>>>> DEF(CLANG38_IA32_TARGET)
>>>>
>>>> *_CLANGDWARF_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>>>> DEF(CLANG38_IA32_TARGET)
>>>>
>>>> *_CLANGDWARF_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>>>> DEF(CLANG38_IA32_TARGET)
>>>>
>>>> @@ -2914,7 +2914,7 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS =
>>>> DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -
>>>> *_CLANGDWARF_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64
>>>> DEF(CLANG38_X64_TARGET)
>>>>
>>>> *_CLANGDWARF_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>
>>>> *_CLANGDWARF_X64_OBJCOPY_FLAGS =
>>>>
>>>> -*_CLANGDWARF_X64_NASM_FLAGS = -f elf64
>>>>
>>>> +*_CLANGDWARF_X64_NASM_FLAGS = -f elf64
>>>> -DRODATA_SECTION_NAME=.rodata
>>>>
>>>> *_CLANGDWARF_X64_PP_FLAGS = DEF(GCC_PP_FLAGS)
>>>> DEF(CLANG38_X64_TARGET)
>>>>
>>>> *_CLANGDWARF_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>>>> DEF(CLANG38_X64_TARGET)
>>>>
>>>> *_CLANGDWARF_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>>>> DEF(CLANG38_X64_TARGET)
>>>>
>>>> @@ -2985,7 +2985,7 @@ RELEASE_XCODE5_IA32_DLINK_FLAGS = -arch
>>>> i386 -u _$(IMAGE_ENTRY_POINT) -e _$
>>>> DEBUG_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>
>>>> NOOPT_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>
>>>> RELEASE_XCODE5_IA32_ASM_FLAGS = -arch i386
>>>>
>>>> - *_XCODE5_IA32_NASM_FLAGS = -f macho32
>>>>
>>>> + *_XCODE5_IA32_NASM_FLAGS = -f macho32
>>>> -DRODATA_SECTION_NAME=.rodata
>>>>
>>>>
>>>>
>>>
>>> An EFI Mach-O file does not contain a .rodata section. A Mach-O
>>> contains a __DATA segment that is broken up into sections. For a
>>> typical EFI image there are __const, __data, __bss sections in the
>>> __DATA segment [1].
>>
>> Yes, and ".rodata" is almost a synonym for "__DATA,__const", with a
>> small exception [1]. Maybe it'd be clearer if the macro was renamed
>> to "NASM_RODATA_SECTION_NAME", to indicate this is not just a "raw"
>> name, but NASM gives it a semantic meaning?
>>
>>>
>>> The mtoc [2] tool used to convert mach-O to PE/COFF converts the
>>> entire __DATA segment (__const, __data, and __bss) into the .data
>>> section. Thus adding any kind of new data section is a no-op at best.
>>
>> This is a part I missed, because I do not have an Xcode toolchain at
>> hand, so thanks for investigating. However this, in my opinion, is a
>> flaw with Mach-O/mtoc and not with my patch. It seems like the only
>> difference between __TEXT,__const and __DATA,__const is whether the
>> data is targeted by a relocation or not. Such a concept does not
>> exist for PE/COFF (and I think not even for ELF, but I'm not too
>> familiar with it), thus the logical PE/COFF section __DATA,__const
>> should be merged into is .rdata (and .rdata may or may not be merged
>> into .text in an earlier step, I assume transitivity). I could change
>> the macro definition to explicitly declare __TEXT,__const, but that
>> would still put the compiler-emitted data in the wrong section. Does
>> Xcode provide anything remotely similar to GNU linker scripts which
>> we can use to move the section?
>>
>> Please also note that .rodata is used for Xcode-based toolchains
>> already (in fact, all toolchains, and this is the issue), I'm not
>> regressing anything. I just expected it to work fine as-is. This
>> patch mainly fixed PE/COFF-based toolchains, which get both .rdata
>> from the compiler and .rodata with RX permissions from NASM, because
>> ".rodata" only has a semantic meaning for ELF and Mach-O outputs, but
>> not for PE/COFF.
>>
>>>
>>> If you want something to be read only for Xcode/clang you are better
>>> off putting it in the __TEXT section [3]. The __TEXT section is read
>>> only and for X64 can not even contain relocations.
>>
>> Well, this kind of is an issue. We would need to introduce an
>> arbitrary constraint on the relocation part that holds only for
>> Xcode-based toolchains. Does the compiler emit an error when data in
>> __TEXT,__const is targeted by a relocation?
>
> The Xcode linker emits a fatal error on X64 for a relocation in the
> __TEXT section, everything needs to be RIP relative and the compiler
> does that for free. We generally only run into this for hand coded
> assembler and the fix is to use RIP relative addressing in the assembly.
Good, thanks for confirming! Still, this would be a bit of an awkward
constraints for Xcode only.
>
>> Also see above regarding compiler-emitted __DATA,__const.
>>
>
> OK so the current nasm `SECTION .rodata`[1] gets mapped to
> __TEXT,__const[2] for Xcode clang, and this is done by nasm (I dumped
> the object file). GenFw and mtoc only run on executables, also they
> tend to be conservative as they need to keep the layout the same and
> the relative layout between sections the same, but in this case it is
> nasm placing the data in the text section.
>
> So what I’d like to see in the patch is to define RODATA_SECTION_NAME
> to match what is actually happening. So for XCODE that would be
> `__TEXT,__const` not `.rodata`.
We can do that, but what to do about compiler-emitted __DATA,__const?
> We should double check what is happening for ELF on x86, ARM, RiskV,
> etc. and do the same thing. I assume all the tools that generate
> PE/COFF directly are good with .rodata?
They are not, that is the whole point of the patch in its current shape.
.rodata is valid for ELF and Mach-O, PE/COFF needs .rdata.
> I think it is likely as simple as dumping the EFL object file in
> objdump or gdb for the given toolchain (like my Xcode example).
>
> TL;DR It looks to me like nasm does some SECTION translations under
> the hood to make code portable, and I’d like to make sure we capture
> those in the new NASM_RODATA_SECTION_NAME. If some one is doing a
> security review having NASM_RODATA_SECTION_NAME is going to imply that
> a .rodata section is being used by that specific toolchain, and I
> think that is much worse than the current “magic” behavior in nasm. We
> are much better off explaining what is really happening, since it is
> not very obvious.
I feel like I'm too tired to get the point. Do you mean you want
comments whenever this section name is used? Or comments in tools_def?
Best regards,
Marvin
>
> [1]
> https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14
> <https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14>
>
> [2] $otool -V -s __TEXT
> __constBuild/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
> Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
> Contents of (__TEXT,__const) section
> 0000001d 7f 03 80 1f 00 00
>
> $ otool -l
> Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
> Build/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
> Load command 0
> cmd LC_SEGMENT_64
> cmdsize 232
> segname
> vmaddr 0x0000000000000000
> vmsize 0x0000000000000026
> fileoff 288
> filesize 38
> maxprot 0x00000007
> initprot 0x00000007
> nsects 2
> flags 0x0
> Section
> sectname __text
> segname __TEXT
> addr 0x0000000000000000
> size 0x000000000000001d
> offset 288
> align 2^0 (1)
> reloff 328
> nreloc 2
> flags 0x80000500
> reserved1 0
> reserved2 0
> Section
> sectname __const
> segname __TEXT
> addr 0x000000000000001d
> size 0x0000000000000006
> offset 320
> align 2^0 (1)
> reloff 0
> nreloc 0
> flags 0x00000000
> reserved1 0
> reserved2 0
> Load command 1
> cmd LC_SYMTAB
> cmdsize 24
> symoff 344
> nsyms 3
> stroff 392
> strsize 63
>
> Thanks,
>
> Andrew Fish
>
>
>> Thanks for your notes and insight!
>>
>> Best regards,
>> Marvin
>>
>>
>> [1]
>> "For compatibility with other Unix platforms, the following standard
>> names are also supported:
>> [...]
>> .rodata = __DATA,__const data
>> [...]
>> If the .rodata section contains no relocations, it is instead put
>> into the __TEXT,__const section unless this section has already been
>> specified explicitly."
>> https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html
>> <https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html>
>>
>>>
>>> [1] otool -lh DxeCore.dll
>>> ...
>>> Load command 1
>>> cmd LC_SEGMENT_64
>>> cmdsize 312
>>> segname __DATA
>>> vmaddr 0x000000000002b000
>>> vmsize 0x0000000000147000
>>> fileoff 180224
>>> filesize 8192
>>> maxprot 0x00000003
>>> initprot 0x00000003
>>> nsects 3
>>> flags 0x0
>>> Section
>>> sectname __const
>>> segname __DATA
>>> addr 0x000000000002b000
>>> size 0x0000000000000718
>>> offset 180224
>>> align 2^4 (16)
>>> reloff 0
>>> nreloc 0
>>> flags 0x00000000
>>> reserved1 0
>>> reserved2 0
>>> Section
>>> sectname __data
>>> segname __DATA
>>> addr 0x000000000002b720
>>> size 0x00000000000014f0
>>> offset 182048
>>> align 2^4 (16)
>>> reloff 0
>>> nreloc 0
>>> flags 0x00000000
>>> reserved1 0
>>> reserved2 0
>>> Section
>>> sectname __bss
>>> segname __DATA
>>> addr 0x000000000002cc10
>>> size 0x0000000000144e11
>>> offset 0
>>> align 2^4 (16)
>>> reloff 0
>>> nreloc 0
>>> flags 0x00000001
>>> reserved1 0
>>> reserved2 0
>>> …
>>>
>>> [2]
>>> https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html
>>> <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html>
>>>
>>>
>>> [3] otool more output…
>>> Load command 0
>>> cmd LC_SEGMENT_64
>>> cmdsize 392
>>> segname __TEXT
>>> vmaddr 0x0000000000000240
>>> vmsize 0x00000000000296c0
>>> fileoff 1184
>>> filesize 169664
>>> maxprot 0x00000005
>>> initprot 0x00000005
>>> nsects 4
>>> flags 0x0
>>> Section
>>> sectname __text
>>> segname __TEXT
>>> addr 0x0000000000000240
>>> size 0x000000000002489f
>>> offset 1184
>>> align 2^3 (8)
>>> reloff 0
>>> nreloc 0
>>> flags 0x80000400
>>> reserved1 0
>>> reserved2 0
>>> Section
>>> sectname __cstring
>>> segname __TEXT
>>> addr 0x0000000000024ae0
>>> size 0x000000000000496d
>>> offset 150848
>>> align 2^4 (16)
>>> reloff 0
>>> nreloc 0
>>> flags 0x00000002
>>> reserved1 0
>>> reserved2 0
>>> Section
>>> sectname __ustring
>>> segname __TEXT
>>> addr 0x000000000002944e
>>> size 0x0000000000000048
>>> offset 169646
>>> align 2^1 (2)
>>> reloff 0
>>> nreloc 0
>>> flags 0x00000000
>>> reserved1 0
>>> reserved2 0
>>> Section
>>> sectname __const
>>> segname __TEXT
>>> addr 0x00000000000294a0
>>> size 0x0000000000000448
>>> offset 169728
>>> align 2^4 (16)
>>> reloff 0
>>> nreloc 0
>>> flags 0x00000000
>>> reserved1 0
>>> reserved2 0
>>>
>>> Thanks,
>>>
>>> Andrew Fish
>>>
>>>>
>>>>
>>>> DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os -Wall
>>>> -Werror -include AutoGen.h -funsigned-char -fno-stack-protector
>>>> -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic
>>>> -mno-implicit-float -mms-bitfields -msoft-float
>>>> -Wno-unused-parameter -Wno-missing-braces
>>>> -Wno-missing-field-initializers -Wno-tautological-compare
>>>> -Wno-sign-compare -Wno-varargs
>>>> -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang
>>>> $(PLATFORM_FLAGS)
>>>>
>>>> @@ -3003,7 +3003,7 @@ RELEASE_XCODE5_X64_DLINK_FLAGS = -arch
>>>> x86_64 -u _$(IMAGE_ENTRY_POINT) -e _
>>>> DEBUG_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>
>>>> NOOPT_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>
>>>> RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64
>>>>
>>>> - *_XCODE5_X64_NASM_FLAGS = -f macho64
>>>>
>>>> + *_XCODE5_X64_NASM_FLAGS = -f macho64
>>>> -DRODATA_SECTION_NAME=.rodata
>>>>
>>>> *_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp -include
>>>> AutoGen.h
>>>>
>>>> *_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include
>>>> $(MODULE_NAME)StrDefs.h
>>>>
>>>>
>>>>
>>>> --
>>>> 2.31.1
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>
>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain
2021-08-10 21:24 ` Marvin Häuser
@ 2021-08-10 21:54 ` Andrew Fish
0 siblings, 0 replies; 42+ messages in thread
From: Andrew Fish @ 2021-08-10 21:54 UTC (permalink / raw)
To: devel, mhaeuser; +Cc: Bob Feng, Liming Gao, Yuwei Chen, Vitaly Cheptsov
> On Aug 10, 2021, at 2:24 PM, Marvin Häuser <mhaeuser@posteo.de> wrote:
>
> On 10/08/2021 21:49, Andrew Fish wrote:
>> I forgot I have an Ubuntu VM so we can take a look at an ELF to PE/COFF toolchain example ….
>>
>> So it looks like nasm[1] “does the right thing”(tm) and places a .rodata section in the object file….
>>
>> But it looks like GenFw[2] smashed the .rodata section into .data section when it translated to PE/COFF. This was the issue I was worried about….
>>
>> Actually I should probably look at the ELF executable too[3]. Yikes no .rodata in the ELF. So it looks likely that the linker scripts are smashing .rodata into .data.
>
> They smash it into .text, as linked in the other mail [1].
Sorry I get way to much email…..
> This is fine honestly, just I want some toggle that decides consistently for all toolchains what to do (merge into .text or let it live as a separate section). But that'd be a task for another patch.
>
I’m still trying to wrap my head around the definition of the nasm RODATA_SECTION_NAME. Do we want it to track what ends up in the object file, the native executable, or the PE/COFF?
It seems like it is tracking the object file. If that is the case we can just fix the XCODE changes to use `__TEXT,__const`and all the toolchains would be consistent.
I’d like to see the commit message reworked to better define what is going on. RODATA_SECTION_NAME tracks what end up object file, and PE/COFF results are controlled by the linker script/GenFw or mtoc.
Thanks,
Andrew Fish
> Best regards,
> Marvin
>
>
> [1] https://github.com/tianocore/edk2/blob/d02dbb53cd78de799e6afaa237e98771fb5148db/BaseTools/Scripts/GccBase.lds#L25
>
>> So there may be multiple issues with ELF toolchains that need to change to end up with a .rodata in the PE/COFF.
>>
>> [1]$ objdump -fh Build/OvmfX64/DEBUG_GCC5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>>
>> Build/OvmfX64/DEBUG_GCC5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj: file format elf64-x86-64
>> architecture: i386:x86-64, flags 0x00000011:
>> HAS_RELOC, HAS_SYMS
>> start address 0x0000000000000000
>>
>> Sections:
>> Idx Name Size VMA LMA File off Algn
>> 0 .rodata 00000006 0000000000000000 0000000000000000 00000200 2**2
>> CONTENTS, ALLOC, LOAD, READONLY, DATA
>> 1 .text 0000001d 0000000000000000 0000000000000000 00000210 2**4
>> CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
>>
>>
>>
>> [2]$ objdump -fh Build/OvmfX64/DEBUG_GCC5/X64/UefiCpuPkg/CpuDxe/CpuDxe/DEBUG/CpuDxe.efi
>>
>> Build/OvmfX64/DEBUG_GCC5/X64/UefiCpuPkg/CpuDxe/CpuDxe/DEBUG/CpuDxe.efi: file format pei-x86-64
>> architecture: i386:x86-64, flags 0x0000010b:
>> HAS_RELOC, EXEC_P, HAS_DEBUG, D_PAGED
>> start address 0x0000000000008eb1
>>
>> Sections:
>> Idx Name Size VMA LMA File off Algn
>> 0 .text 0000ff80 0000000000000240 0000000000000240 00000240 2**4
>> CONTENTS, ALLOC, LOAD, READONLY, CODE
>> 1 .data 00000540 00000000000101c0 00000000000101c0 000101c0 2**4
>> CONTENTS, ALLOC, LOAD, DATA
>> 2 .reloc 00000080 0000000000010700 0000000000010700 00010700 2**2
>> CONTENTS, ALLOC, LOAD, READONLY, DATA
>>
>> [3] $ objdump -fh Build/OvmfX64/DEBUG_GCC5/X64/UefiCpuPkg/CpuDxe/CpuDxe/DEBUG/CpuDxe.dll
>>
>> Build/OvmfX64/DEBUG_GCC5/X64/UefiCpuPkg/CpuDxe/CpuDxe/DEBUG/CpuDxe.dll: file format elf64-x86-64
>> architecture: i386:x86-64, flags 0x00000013:
>> HAS_RELOC, EXEC_P, HAS_SYMS
>> start address 0x0000000000008eb1
>>
>> Sections:
>> Idx Name Size VMA LMA File off Algn
>> 0 .text 0000ff46 0000000000000240 0000000000000240 000000c0 2**6
>> CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
>> 1 .data 00000490 00000000000101c0 00000000000101c0 00010040 2**6
>> CONTENTS, ALLOC, LOAD, RELOC, DATA
>> 2 .rela 000004f8 0000000000010680 0000000000010680 000104d0 2**3
>> CONTENTS, READONLY
>> 3 .build-id 00000024 0000000000010b78 0000000000010b78 000109c8 2**2
>> CONTENTS, READONLY
>> 4 .gnu_debuglink 00000014 0000000000000000 0000000000000000 000109ec 2**2
>> CONTENTS, READONLY
>>
>>
>>
>> Thanks,
>>
>> Andrew Fish
>>
>>> On Aug 10, 2021, at 12:35 PM, Andrew Fish via groups.io <http://groups.io> <afish=apple.com@groups.io <mailto:afish=apple.com@groups.io>> wrote:
>>>
>>>
>>>
>>>> On Aug 10, 2021, at 1:27 AM, Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>> wrote:
>>>>
>>>> On 10/08/2021 06:19, Andrew Fish via groups.io <http://groups.io/> wrote:
>>>>>
>>>>>
>>>>>> On Aug 9, 2021, at 2:51 AM, Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>> wrote:
>>>>>>
>>>>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3318 <https://bugzilla.tianocore.org/show_bug.cgi?id=3318> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318 <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>>
>>>>>>
>>>>>> Different toolchains of the EDK II build system may generate ELF or
>>>>>> Mach-O files, which use the ".rodata" naming convention, or PE/COFF
>>>>>> files, which use the ".rdata" naming convention. Section permissions
>>>>>> are chosen based on this name per file format by NASM. To harden
>>>>>> image permission security, and to save space by avoiding both
>>>>>> ".rdata" and ".rodata" sections being emitted, expose the appropriate
>>>>>> name as a preprocessor constant.
>>>>>>
>>>>>> Cc: Bob Feng <bob.c.feng@intel.com <mailto:bob.c.feng@intel.com> <mailto:bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>>>
>>>>>> Cc: Liming Gao <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> <mailto:gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>>>
>>>>>> Cc: Yuwei Chen <yuwei.chen@intel.com <mailto:yuwei.chen@intel.com> <mailto:yuwei.chen@intel.com <mailto:yuwei.chen@intel.com>>>
>>>>>> Cc: Vitaly Cheptsov <vit9696@protonmail.com <mailto:vit9696@protonmail.com> <mailto:vit9696@protonmail.com <mailto:vit9696@protonmail.com>>>
>>>>>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>>
>>>>>> ---
>>>>>> BaseTools/Conf/tools_def.template | 172 ++++++++++----------
>>>>>> 1 file changed, 86 insertions(+), 86 deletions(-)
>>>>>>
>>>>>> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
>>>>>> index 2e6b382ab623..84d464916c4d 100755
>>>>>> --- a/BaseTools/Conf/tools_def.template
>>>>>> +++ b/BaseTools/Conf/tools_def.template
>>>>>> @@ -463,9 +463,9 @@ NOOPT_VS2008_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>> RELEASE_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -495,9 +495,9 @@ NOOPT_VS2008_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>> RELEASE_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -574,9 +574,9 @@ NOOPT_VS2008x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>> RELEASE_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -605,9 +605,9 @@ NOOPT_VS2008x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>> RELEASE_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -688,9 +688,9 @@ NOOPT_VS2010_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>> RELEASE_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -720,9 +720,9 @@ NOOPT_VS2010_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>> RELEASE_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -799,9 +799,9 @@ NOOPT_VS2010x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>> RELEASE_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -831,9 +831,9 @@ NOOPT_VS2010x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>> RELEASE_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -913,9 +913,9 @@ NOOPT_VS2012_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>> RELEASE_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -945,9 +945,9 @@ NOOPT_VS2012_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>> RELEASE_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1024,9 +1024,9 @@ NOOPT_VS2012x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>> RELEASE_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1056,9 +1056,9 @@ NOOPT_VS2012x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>> RELEASE_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1138,9 +1138,9 @@ NOOPT_VS2013_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>> RELEASE_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1170,9 +1170,9 @@ NOOPT_VS2013_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>> RELEASE_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1249,9 +1249,9 @@ NOOPT_VS2013x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>> RELEASE_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1281,9 +1281,9 @@ NOOPT_VS2013x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>> RELEASE_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1364,9 +1364,9 @@ NOOPT_VS2015_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>> RELEASE_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1396,9 +1396,9 @@ NOOPT_VS2015_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>> RELEASE_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1476,9 +1476,9 @@ NOOPT_VS2015x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>> RELEASE_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1508,9 +1508,9 @@ NOOPT_VS2015x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>> RELEASE_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1586,9 +1586,9 @@ NOOPT_VS2017_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>>>> RELEASE_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1616,9 +1616,9 @@ NOOPT_VS2017_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>> RELEASE_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1744,9 +1744,9 @@ NOOPT_VS2019_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>>>> RELEASE_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1774,9 +1774,9 @@ NOOPT_VS2019_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>> RELEASE_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -2030,7 +2030,7 @@ DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include A
>>>>>> *_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
>>>>>>
>>>>>> *_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>
>>>>>> *_GCC48_IA32_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_GCC48_IA32_NASM_FLAGS = -f elf32
>>>>>>
>>>>>> +*_GCC48_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
>>>>>>
>>>>>> RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable
>>>>>>
>>>>>> @@ -2058,7 +2058,7 @@ RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>>>> *_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
>>>>>>
>>>>>> *_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>
>>>>>> *_GCC48_X64_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_GCC48_X64_NASM_FLAGS = -f elf64
>>>>>>
>>>>>> +*_GCC48_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
>>>>>>
>>>>>> RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable
>>>>>>
>>>>>> @@ -2170,7 +2170,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
>>>>>> *_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
>>>>>>
>>>>>> *_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>
>>>>>> *_GCC49_IA32_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_GCC49_IA32_NASM_FLAGS = -f elf32
>>>>>>
>>>>>> +*_GCC49_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
>>>>>>
>>>>>> RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>>>
>>>>>> @@ -2198,7 +2198,7 @@ RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>>>> *_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
>>>>>>
>>>>>> *_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>
>>>>>> *_GCC49_X64_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_GCC49_X64_NASM_FLAGS = -f elf64
>>>>>>
>>>>>> +*_GCC49_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
>>>>>>
>>>>>> RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>>>
>>>>>> @@ -2316,7 +2316,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
>>>>>> *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
>>>>>>
>>>>>> *_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>
>>>>>> *_GCC5_IA32_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_GCC5_IA32_NASM_FLAGS = -f elf32
>>>>>>
>>>>>> +*_GCC5_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Os
>>>>>>
>>>>>> DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
>>>>>>
>>>>>> @@ -2348,7 +2348,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,
>>>>>> *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
>>>>>>
>>>>>> *_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>
>>>>>> *_GCC5_X64_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_GCC5_X64_NASM_FLAGS = -f elf64
>>>>>>
>>>>>> +*_GCC5_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO -Os
>>>>>>
>>>>>> DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
>>>>>>
>>>>>> @@ -2589,7 +2589,7 @@ DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNIN
>>>>>> *_CLANG38_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>>>
>>>>>> *_CLANG38_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>
>>>>>> *_CLANG38_IA32_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_CLANG38_IA32_NASM_FLAGS = -f elf32
>>>>>>
>>>>>> +*_CLANG38_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>> *_CLANG38_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>
>>>>>> *_CLANG38_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>
>>>>>> *_CLANG38_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>
>>>>>> @@ -2626,7 +2626,7 @@ NOOPT_CLANG38_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -O0
>>>>>> *_CLANG38_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
>>>>>>
>>>>>> *_CLANG38_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>
>>>>>> *_CLANG38_X64_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_CLANG38_X64_NASM_FLAGS = -f elf64
>>>>>>
>>>>>> +*_CLANG38_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>> *_CLANG38_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>
>>>>>> *_CLANG38_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>
>>>>>> *_CLANG38_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>
>>>>>> @@ -2777,7 +2777,7 @@ DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARN
>>>>>> *_CLANGPDB_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32 -fno-lto DEF(CLANGPDB_IA32_TARGET)
>>>>>>
>>>>>> *_CLANGPDB_IA32_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m32 -march=i386 DEF(CLANGPDB_IA32_TARGET)
>>>>>>
>>>>>> *_CLANGPDB_IA32_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_CLANGPDB_IA32_NASM_FLAGS = -f win32
>>>>>>
>>>>>> +*_CLANGPDB_IA32_NASM_FLAGS = -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> *_CLANGPDB_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>>>
>>>>>> *_CLANGPDB_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>>>
>>>>>> *_CLANGPDB_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>>>
>>>>>> @@ -2811,7 +2811,7 @@ NOOPT_CLANGPDB_IA32_DLINK2_FLAGS =
>>>>>> *_CLANGPDB_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64 -fno-lto DEF(CLANGPDB_X64_TARGET)
>>>>>>
>>>>>> *_CLANGPDB_X64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m64 DEF(CLANGPDB_X64_TARGET)
>>>>>>
>>>>>> *_CLANGPDB_X64_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_CLANGPDB_X64_NASM_FLAGS = -f win64
>>>>>>
>>>>>> +*_CLANGPDB_X64_NASM_FLAGS = -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> *_CLANGPDB_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>>>
>>>>>> *_CLANGPDB_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>>>
>>>>>> *_CLANGPDB_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>>>
>>>>>> @@ -2878,7 +2878,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
>>>>>> *_CLANGDWARF_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>>>
>>>>>> *_CLANGDWARF_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>
>>>>>> *_CLANGDWARF_IA32_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32
>>>>>>
>>>>>> +*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>> *_CLANGDWARF_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>
>>>>>> *_CLANGDWARF_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>
>>>>>> *_CLANGDWARF_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>
>>>>>> @@ -2914,7 +2914,7 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -
>>>>>> *_CLANGDWARF_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
>>>>>>
>>>>>> *_CLANGDWARF_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>
>>>>>> *_CLANGDWARF_X64_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_CLANGDWARF_X64_NASM_FLAGS = -f elf64
>>>>>>
>>>>>> +*_CLANGDWARF_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>> *_CLANGDWARF_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>
>>>>>> *_CLANGDWARF_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>
>>>>>> *_CLANGDWARF_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>
>>>>>> @@ -2985,7 +2985,7 @@ RELEASE_XCODE5_IA32_DLINK_FLAGS = -arch i386 -u _$(IMAGE_ENTRY_POINT) -e _$
>>>>>> DEBUG_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>>>
>>>>>> NOOPT_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>>>
>>>>>> RELEASE_XCODE5_IA32_ASM_FLAGS = -arch i386
>>>>>>
>>>>>> - *_XCODE5_IA32_NASM_FLAGS = -f macho32
>>>>>>
>>>>>> + *_XCODE5_IA32_NASM_FLAGS = -f macho32 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> An EFI Mach-O file does not contain a .rodata section. A Mach-O contains a __DATA segment that is broken up into sections. For a typical EFI image there are __const, __data, __bss sections in the __DATA segment [1].
>>>>
>>>> Yes, and ".rodata" is almost a synonym for "__DATA,__const", with a small exception [1]. Maybe it'd be clearer if the macro was renamed to "NASM_RODATA_SECTION_NAME", to indicate this is not just a "raw" name, but NASM gives it a semantic meaning?
>>>>
>>>>>
>>>>> The mtoc [2] tool used to convert mach-O to PE/COFF converts the entire __DATA segment (__const, __data, and __bss) into the .data section. Thus adding any kind of new data section is a no-op at best.
>>>>
>>>> This is a part I missed, because I do not have an Xcode toolchain at hand, so thanks for investigating. However this, in my opinion, is a flaw with Mach-O/mtoc and not with my patch. It seems like the only difference between __TEXT,__const and __DATA,__const is whether the data is targeted by a relocation or not. Such a concept does not exist for PE/COFF (and I think not even for ELF, but I'm not too familiar with it), thus the logical PE/COFF section __DATA,__const should be merged into is .rdata (and .rdata may or may not be merged into .text in an earlier step, I assume transitivity). I could change the macro definition to explicitly declare __TEXT,__const, but that would still put the compiler-emitted data in the wrong section. Does Xcode provide anything remotely similar to GNU linker scripts which we can use to move the section?
>>>>
>>>> Please also note that .rodata is used for Xcode-based toolchains already (in fact, all toolchains, and this is the issue), I'm not regressing anything. I just expected it to work fine as-is. This patch mainly fixed PE/COFF-based toolchains, which get both .rdata from the compiler and .rodata with RX permissions from NASM, because ".rodata" only has a semantic meaning for ELF and Mach-O outputs, but not for PE/COFF.
>>>>
>>>>>
>>>>> If you want something to be read only for Xcode/clang you are better off putting it in the __TEXT section [3]. The __TEXT section is read only and for X64 can not even contain relocations.
>>>>
>>>> Well, this kind of is an issue. We would need to introduce an arbitrary constraint on the relocation part that holds only for Xcode-based toolchains. Does the compiler emit an error when data in __TEXT,__const is targeted by a relocation?
>>>
>>> The Xcode linker emits a fatal error on X64 for a relocation in the __TEXT section, everything needs to be RIP relative and the compiler does that for free. We generally only run into this for hand coded assembler and the fix is to use RIP relative addressing in the assembly.
>>>
>>>> Also see above regarding compiler-emitted __DATA,__const.
>>>>
>>>
>>> OK so the current nasm `SECTION .rodata`[1] gets mapped to __TEXT,__const[2] for Xcode clang, and this is done by nasm (I dumped the object file). GenFw and mtoc only run on executables, also they tend to be conservative as they need to keep the layout the same and the relative layout between sections the same, but in this case it is nasm placing the data in the text section.
>>>
>>> So what I’d like to see in the patch is to define RODATA_SECTION_NAME to match what is actually happening. So for XCODE that would be `__TEXT,__const` not `.rodata`. We should double check what is happening for ELF on x86, ARM, RiskV, etc. and do the same thing. I assume all the tools that generate PE/COFF directly are good with .rodata? I think it is likely as simple as dumping the EFL object file in objdump or gdb for the given toolchain (like my Xcode example).
>>>
>>> TL;DR It looks to me like nasm does some SECTION translations under the hood to make code portable, and I’d like to make sure we capture those in the new NASM_RODATA_SECTION_NAME. If some one is doing a security review having NASM_RODATA_SECTION_NAME is going to imply that a .rodata section is being used by that specific toolchain, and I think that is much worse than the current “magic” behavior in nasm. We are much better off explaining what is really happening, since it is not very obvious.
>>>
>>> [1] https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14 <https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14>
>>>
>>> [2] $otool -V -s __TEXT __constBuild/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>>> Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
>>> Contents of (__TEXT,__const) section
>>> 0000001d 7f 03 80 1f 00 00
>>>
>>> $ otool -l Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>>> Build/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
>>> Load command 0
>>> cmd LC_SEGMENT_64
>>> cmdsize 232
>>> segname
>>> vmaddr 0x0000000000000000
>>> vmsize 0x0000000000000026
>>> fileoff 288
>>> filesize 38
>>> maxprot 0x00000007
>>> initprot 0x00000007
>>> nsects 2
>>> flags 0x0
>>> Section
>>> sectname __text
>>> segname __TEXT
>>> addr 0x0000000000000000
>>> size 0x000000000000001d
>>> offset 288
>>> align 2^0 (1)
>>> reloff 328
>>> nreloc 2
>>> flags 0x80000500
>>> reserved1 0
>>> reserved2 0
>>> Section
>>> sectname __const
>>> segname __TEXT
>>> addr 0x000000000000001d
>>> size 0x0000000000000006
>>> offset 320
>>> align 2^0 (1)
>>> reloff 0
>>> nreloc 0
>>> flags 0x00000000
>>> reserved1 0
>>> reserved2 0
>>> Load command 1
>>> cmd LC_SYMTAB
>>> cmdsize 24
>>> symoff 344
>>> nsyms 3
>>> stroff 392
>>> strsize 63
>>>
>>> Thanks,
>>>
>>> Andrew Fish
>>>
>>>
>>>> Thanks for your notes and insight!
>>>>
>>>> Best regards,
>>>> Marvin
>>>>
>>>>
>>>> [1]
>>>> "For compatibility with other Unix platforms, the following standard names are also supported:
>>>> [...]
>>>> .rodata = __DATA,__const data
>>>> [...]
>>>> If the .rodata section contains no relocations, it is instead put into the __TEXT,__const section unless this section has already been specified explicitly."
>>>> https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html <https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html>
>>>>
>>>>>
>>>>> [1] otool -lh DxeCore.dll
>>>>> ...
>>>>> Load command 1
>>>>> cmd LC_SEGMENT_64
>>>>> cmdsize 312
>>>>> segname __DATA
>>>>> vmaddr 0x000000000002b000
>>>>> vmsize 0x0000000000147000
>>>>> fileoff 180224
>>>>> filesize 8192
>>>>> maxprot 0x00000003
>>>>> initprot 0x00000003
>>>>> nsects 3
>>>>> flags 0x0
>>>>> Section
>>>>> sectname __const
>>>>> segname __DATA
>>>>> addr 0x000000000002b000
>>>>> size 0x0000000000000718
>>>>> offset 180224
>>>>> align 2^4 (16)
>>>>> reloff 0
>>>>> nreloc 0
>>>>> flags 0x00000000
>>>>> reserved1 0
>>>>> reserved2 0
>>>>> Section
>>>>> sectname __data
>>>>> segname __DATA
>>>>> addr 0x000000000002b720
>>>>> size 0x00000000000014f0
>>>>> offset 182048
>>>>> align 2^4 (16)
>>>>> reloff 0
>>>>> nreloc 0
>>>>> flags 0x00000000
>>>>> reserved1 0
>>>>> reserved2 0
>>>>> Section
>>>>> sectname __bss
>>>>> segname __DATA
>>>>> addr 0x000000000002cc10
>>>>> size 0x0000000000144e11
>>>>> offset 0
>>>>> align 2^4 (16)
>>>>> reloff 0
>>>>> nreloc 0
>>>>> flags 0x00000001
>>>>> reserved1 0
>>>>> reserved2 0
>>>>> …
>>>>>
>>>>> [2] https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html> <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html>>
>>>>>
>>>>> [3] otool more output…
>>>>> Load command 0
>>>>> cmd LC_SEGMENT_64
>>>>> cmdsize 392
>>>>> segname __TEXT
>>>>> vmaddr 0x0000000000000240
>>>>> vmsize 0x00000000000296c0
>>>>> fileoff 1184
>>>>> filesize 169664
>>>>> maxprot 0x00000005
>>>>> initprot 0x00000005
>>>>> nsects 4
>>>>> flags 0x0
>>>>> Section
>>>>> sectname __text
>>>>> segname __TEXT
>>>>> addr 0x0000000000000240
>>>>> size 0x000000000002489f
>>>>> offset 1184
>>>>> align 2^3 (8)
>>>>> reloff 0
>>>>> nreloc 0
>>>>> flags 0x80000400
>>>>> reserved1 0
>>>>> reserved2 0
>>>>> Section
>>>>> sectname __cstring
>>>>> segname __TEXT
>>>>> addr 0x0000000000024ae0
>>>>> size 0x000000000000496d
>>>>> offset 150848
>>>>> align 2^4 (16)
>>>>> reloff 0
>>>>> nreloc 0
>>>>> flags 0x00000002
>>>>> reserved1 0
>>>>> reserved2 0
>>>>> Section
>>>>> sectname __ustring
>>>>> segname __TEXT
>>>>> addr 0x000000000002944e
>>>>> size 0x0000000000000048
>>>>> offset 169646
>>>>> align 2^1 (2)
>>>>> reloff 0
>>>>> nreloc 0
>>>>> flags 0x00000000
>>>>> reserved1 0
>>>>> reserved2 0
>>>>> Section
>>>>> sectname __const
>>>>> segname __TEXT
>>>>> addr 0x00000000000294a0
>>>>> size 0x0000000000000448
>>>>> offset 169728
>>>>> align 2^4 (16)
>>>>> reloff 0
>>>>> nreloc 0
>>>>> flags 0x00000000
>>>>> reserved1 0
>>>>> reserved2 0
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Andrew Fish
>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
>>>>>>
>>>>>> @@ -3003,7 +3003,7 @@ RELEASE_XCODE5_X64_DLINK_FLAGS = -arch x86_64 -u _$(IMAGE_ENTRY_POINT) -e _
>>>>>> DEBUG_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>>>
>>>>>> NOOPT_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>>>
>>>>>> RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64
>>>>>>
>>>>>> - *_XCODE5_X64_NASM_FLAGS = -f macho64
>>>>>>
>>>>>> + *_XCODE5_X64_NASM_FLAGS = -f macho64 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>> *_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h
>>>>>>
>>>>>> *_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include $(MODULE_NAME)StrDefs.h
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> 2.31.1
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>
>>
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain
2021-08-10 21:30 ` Marvin Häuser
@ 2021-08-10 21:58 ` Andrew Fish
2021-08-11 8:11 ` Marvin Häuser
0 siblings, 1 reply; 42+ messages in thread
From: Andrew Fish @ 2021-08-10 21:58 UTC (permalink / raw)
To: devel, mhaeuser; +Cc: Bob Feng, Liming Gao, Yuwei Chen, Vitaly Cheptsov
> On Aug 10, 2021, at 2:30 PM, Marvin Häuser <mhaeuser@posteo.de> wrote:
>
> On 10/08/2021 21:35, Andrew Fish via groups.io wrote:
>>
>>
>>> On Aug 10, 2021, at 1:27 AM, Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>> wrote:
>>>
>>> On 10/08/2021 06:19, Andrew Fish via groups.io <http://groups.io> wrote:
>>>>
>>>>
>>>>> On Aug 9, 2021, at 2:51 AM, Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>> wrote:
>>>>>
>>>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3318 <https://bugzilla.tianocore.org/show_bug.cgi?id=3318> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318 <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>>
>>>>>
>>>>> Different toolchains of the EDK II build system may generate ELF or
>>>>> Mach-O files, which use the ".rodata" naming convention, or PE/COFF
>>>>> files, which use the ".rdata" naming convention. Section permissions
>>>>> are chosen based on this name per file format by NASM. To harden
>>>>> image permission security, and to save space by avoiding both
>>>>> ".rdata" and ".rodata" sections being emitted, expose the appropriate
>>>>> name as a preprocessor constant.
>>>>>
>>>>> Cc: Bob Feng <bob.c.feng@intel.com <mailto:bob.c.feng@intel.com> <mailto:bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>>>
>>>>> Cc: Liming Gao <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> <mailto:gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>>>
>>>>> Cc: Yuwei Chen <yuwei.chen@intel.com <mailto:yuwei.chen@intel.com> <mailto:yuwei.chen@intel.com <mailto:yuwei.chen@intel.com>>>
>>>>> Cc: Vitaly Cheptsov <vit9696@protonmail.com <mailto:vit9696@protonmail.com> <mailto:vit9696@protonmail.com <mailto:vit9696@protonmail.com>>>
>>>>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>>
>>>>> ---
>>>>> BaseTools/Conf/tools_def.template | 172 ++++++++++----------
>>>>> 1 file changed, 86 insertions(+), 86 deletions(-)
>>>>>
>>>>> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
>>>>> index 2e6b382ab623..84d464916c4d 100755
>>>>> --- a/BaseTools/Conf/tools_def.template
>>>>> +++ b/BaseTools/Conf/tools_def.template
>>>>> @@ -463,9 +463,9 @@ NOOPT_VS2008_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>> RELEASE_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -495,9 +495,9 @@ NOOPT_VS2008_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>> RELEASE_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -574,9 +574,9 @@ NOOPT_VS2008x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>> RELEASE_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -605,9 +605,9 @@ NOOPT_VS2008x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>> RELEASE_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -688,9 +688,9 @@ NOOPT_VS2010_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>> RELEASE_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -720,9 +720,9 @@ NOOPT_VS2010_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>> RELEASE_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -799,9 +799,9 @@ NOOPT_VS2010x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>> RELEASE_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -831,9 +831,9 @@ NOOPT_VS2010x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>> RELEASE_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -913,9 +913,9 @@ NOOPT_VS2012_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>> RELEASE_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -945,9 +945,9 @@ NOOPT_VS2012_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>> RELEASE_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1024,9 +1024,9 @@ NOOPT_VS2012x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>> RELEASE_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1056,9 +1056,9 @@ NOOPT_VS2012x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>> RELEASE_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1138,9 +1138,9 @@ NOOPT_VS2013_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>> RELEASE_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1170,9 +1170,9 @@ NOOPT_VS2013_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>> RELEASE_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1249,9 +1249,9 @@ NOOPT_VS2013x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>> RELEASE_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1281,9 +1281,9 @@ NOOPT_VS2013x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>> RELEASE_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1364,9 +1364,9 @@ NOOPT_VS2015_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>> RELEASE_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1396,9 +1396,9 @@ NOOPT_VS2015_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>> RELEASE_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1476,9 +1476,9 @@ NOOPT_VS2015x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>> RELEASE_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1508,9 +1508,9 @@ NOOPT_VS2015x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>> RELEASE_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1586,9 +1586,9 @@ NOOPT_VS2017_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>>> RELEASE_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1616,9 +1616,9 @@ NOOPT_VS2017_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>> RELEASE_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1744,9 +1744,9 @@ NOOPT_VS2019_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>>> RELEASE_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>
>>>>> NOOPT_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>
>>>>> -RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32
>>>>>
>>>>> -NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>
>>>>> + DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -1774,9 +1774,9 @@ NOOPT_VS2019_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>> RELEASE_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>
>>>>> NOOPT_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>
>>>>>
>>>>>
>>>>> - DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>
>>>>> -RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64
>>>>>
>>>>> -NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>
>>>>> + DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> +NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>
>>>>> RELEASE_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>
>>>>> @@ -2030,7 +2030,7 @@ DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include A
>>>>> *_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
>>>>>
>>>>> *_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>
>>>>> *_GCC48_IA32_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_GCC48_IA32_NASM_FLAGS = -f elf32
>>>>>
>>>>> +*_GCC48_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
>>>>>
>>>>> RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable
>>>>>
>>>>> @@ -2058,7 +2058,7 @@ RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>>> *_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
>>>>>
>>>>> *_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>
>>>>> *_GCC48_X64_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_GCC48_X64_NASM_FLAGS = -f elf64
>>>>>
>>>>> +*_GCC48_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
>>>>>
>>>>> RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable
>>>>>
>>>>> @@ -2170,7 +2170,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
>>>>> *_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
>>>>>
>>>>> *_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>
>>>>> *_GCC49_IA32_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_GCC49_IA32_NASM_FLAGS = -f elf32
>>>>>
>>>>> +*_GCC49_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
>>>>>
>>>>> RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>>
>>>>> @@ -2198,7 +2198,7 @@ RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>>> *_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
>>>>>
>>>>> *_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>
>>>>> *_GCC49_X64_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_GCC49_X64_NASM_FLAGS = -f elf64
>>>>>
>>>>> +*_GCC49_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
>>>>>
>>>>> RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>>
>>>>> @@ -2316,7 +2316,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
>>>>> *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
>>>>>
>>>>> *_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>
>>>>> *_GCC5_IA32_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_GCC5_IA32_NASM_FLAGS = -f elf32
>>>>>
>>>>> +*_GCC5_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Os
>>>>>
>>>>> DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
>>>>>
>>>>> @@ -2348,7 +2348,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,
>>>>> *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
>>>>>
>>>>> *_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>
>>>>> *_GCC5_X64_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_GCC5_X64_NASM_FLAGS = -f elf64
>>>>>
>>>>> +*_GCC5_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>>
>>>>>
>>>>> DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO -Os
>>>>>
>>>>> DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
>>>>>
>>>>> @@ -2589,7 +2589,7 @@ DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNIN
>>>>> *_CLANG38_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>>
>>>>> *_CLANG38_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>
>>>>> *_CLANG38_IA32_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_CLANG38_IA32_NASM_FLAGS = -f elf32
>>>>>
>>>>> +*_CLANG38_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>> *_CLANG38_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>
>>>>> *_CLANG38_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>
>>>>> *_CLANG38_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>
>>>>> @@ -2626,7 +2626,7 @@ NOOPT_CLANG38_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -O0
>>>>> *_CLANG38_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
>>>>>
>>>>> *_CLANG38_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>
>>>>> *_CLANG38_X64_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_CLANG38_X64_NASM_FLAGS = -f elf64
>>>>>
>>>>> +*_CLANG38_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>> *_CLANG38_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>
>>>>> *_CLANG38_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>
>>>>> *_CLANG38_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>
>>>>> @@ -2777,7 +2777,7 @@ DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARN
>>>>> *_CLANGPDB_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32 -fno-lto DEF(CLANGPDB_IA32_TARGET)
>>>>>
>>>>> *_CLANGPDB_IA32_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m32 -march=i386 DEF(CLANGPDB_IA32_TARGET)
>>>>>
>>>>> *_CLANGPDB_IA32_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_CLANGPDB_IA32_NASM_FLAGS = -f win32
>>>>>
>>>>> +*_CLANGPDB_IA32_NASM_FLAGS = -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> *_CLANGPDB_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>>
>>>>> *_CLANGPDB_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>>
>>>>> *_CLANGPDB_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>>
>>>>> @@ -2811,7 +2811,7 @@ NOOPT_CLANGPDB_IA32_DLINK2_FLAGS =
>>>>> *_CLANGPDB_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64 -fno-lto DEF(CLANGPDB_X64_TARGET)
>>>>>
>>>>> *_CLANGPDB_X64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m64 DEF(CLANGPDB_X64_TARGET)
>>>>>
>>>>> *_CLANGPDB_X64_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_CLANGPDB_X64_NASM_FLAGS = -f win64
>>>>>
>>>>> +*_CLANGPDB_X64_NASM_FLAGS = -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>
>>>>> *_CLANGPDB_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>>
>>>>> *_CLANGPDB_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>>
>>>>> *_CLANGPDB_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>>
>>>>> @@ -2878,7 +2878,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
>>>>> *_CLANGDWARF_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>>
>>>>> *_CLANGDWARF_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>
>>>>> *_CLANGDWARF_IA32_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32
>>>>>
>>>>> +*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>> *_CLANGDWARF_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>
>>>>> *_CLANGDWARF_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>
>>>>> *_CLANGDWARF_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>
>>>>> @@ -2914,7 +2914,7 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -
>>>>> *_CLANGDWARF_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
>>>>>
>>>>> *_CLANGDWARF_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>
>>>>> *_CLANGDWARF_X64_OBJCOPY_FLAGS =
>>>>>
>>>>> -*_CLANGDWARF_X64_NASM_FLAGS = -f elf64
>>>>>
>>>>> +*_CLANGDWARF_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>> *_CLANGDWARF_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>
>>>>> *_CLANGDWARF_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>
>>>>> *_CLANGDWARF_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>
>>>>> @@ -2985,7 +2985,7 @@ RELEASE_XCODE5_IA32_DLINK_FLAGS = -arch i386 -u _$(IMAGE_ENTRY_POINT) -e _$
>>>>> DEBUG_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>>
>>>>> NOOPT_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>>
>>>>> RELEASE_XCODE5_IA32_ASM_FLAGS = -arch i386
>>>>>
>>>>> - *_XCODE5_IA32_NASM_FLAGS = -f macho32
>>>>>
>>>>> + *_XCODE5_IA32_NASM_FLAGS = -f macho32 -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>>
>>>>>
>>>>
>>>> An EFI Mach-O file does not contain a .rodata section. A Mach-O contains a __DATA segment that is broken up into sections. For a typical EFI image there are __const, __data, __bss sections in the __DATA segment [1].
>>>
>>> Yes, and ".rodata" is almost a synonym for "__DATA,__const", with a small exception [1]. Maybe it'd be clearer if the macro was renamed to "NASM_RODATA_SECTION_NAME", to indicate this is not just a "raw" name, but NASM gives it a semantic meaning?
>>>
>>>>
>>>> The mtoc [2] tool used to convert mach-O to PE/COFF converts the entire __DATA segment (__const, __data, and __bss) into the .data section. Thus adding any kind of new data section is a no-op at best.
>>>
>>> This is a part I missed, because I do not have an Xcode toolchain at hand, so thanks for investigating. However this, in my opinion, is a flaw with Mach-O/mtoc and not with my patch. It seems like the only difference between __TEXT,__const and __DATA,__const is whether the data is targeted by a relocation or not. Such a concept does not exist for PE/COFF (and I think not even for ELF, but I'm not too familiar with it), thus the logical PE/COFF section __DATA,__const should be merged into is .rdata (and .rdata may or may not be merged into .text in an earlier step, I assume transitivity). I could change the macro definition to explicitly declare __TEXT,__const, but that would still put the compiler-emitted data in the wrong section. Does Xcode provide anything remotely similar to GNU linker scripts which we can use to move the section?
>>>
>>> Please also note that .rodata is used for Xcode-based toolchains already (in fact, all toolchains, and this is the issue), I'm not regressing anything. I just expected it to work fine as-is. This patch mainly fixed PE/COFF-based toolchains, which get both .rdata from the compiler and .rodata with RX permissions from NASM, because ".rodata" only has a semantic meaning for ELF and Mach-O outputs, but not for PE/COFF.
>>>
>>>>
>>>> If you want something to be read only for Xcode/clang you are better off putting it in the __TEXT section [3]. The __TEXT section is read only and for X64 can not even contain relocations.
>>>
>>> Well, this kind of is an issue. We would need to introduce an arbitrary constraint on the relocation part that holds only for Xcode-based toolchains. Does the compiler emit an error when data in __TEXT,__const is targeted by a relocation?
>>
>> The Xcode linker emits a fatal error on X64 for a relocation in the __TEXT section, everything needs to be RIP relative and the compiler does that for free. We generally only run into this for hand coded assembler and the fix is to use RIP relative addressing in the assembly.
>
> Good, thanks for confirming! Still, this would be a bit of an awkward constraints for Xcode only.
>
It is a physics problem we can’t fix, so I end up writing some patches to fix other peoples assembler from time to time. The CI building with Xcode helps with this a lot.
>>
>>> Also see above regarding compiler-emitted __DATA,__const.
>>>
>>
>> OK so the current nasm `SECTION .rodata`[1] gets mapped to __TEXT,__const[2] for Xcode clang, and this is done by nasm (I dumped the object file). GenFw and mtoc only run on executables, also they tend to be conservative as they need to keep the layout the same and the relative layout between sections the same, but in this case it is nasm placing the data in the text section.
>>
>> So what I’d like to see in the patch is to define RODATA_SECTION_NAME to match what is actually happening. So for XCODE that would be `__TEXT,__const` not `.rodata`.
>
> We can do that, but what to do about compiler-emitted __DATA,__const?
Sorry I don’t understand what RODATA_SECTION_NAME has to do with the compiler? I thought it was for nasm?
>
>> We should double check what is happening for ELF on x86, ARM, RiskV, etc. and do the same thing. I assume all the tools that generate PE/COFF directly are good with .rodata?
>
> They are not, that is the whole point of the patch in its current shape. .rodata is valid for ELF and Mach-O, PE/COFF needs .rdata.
>
>> I think it is likely as simple as dumping the EFL object file in objdump or gdb for the given toolchain (like my Xcode example).
>>
>> TL;DR It looks to me like nasm does some SECTION translations under the hood to make code portable, and I’d like to make sure we capture those in the new NASM_RODATA_SECTION_NAME. If some one is doing a security review having NASM_RODATA_SECTION_NAME is going to imply that a .rodata section is being used by that specific toolchain, and I think that is much worse than the current “magic” behavior in nasm. We are much better off explaining what is really happening, since it is not very obvious.
>
> I feel like I'm too tired to get the point. Do you mean you want comments whenever this section name is used? Or comments in tools_def?
>
I think I’d settle for a more descriptive commit comment that better defines what the define means like I mentioned in the other mail.
Thanks,
Andrew Fish
> Best regards,
> Marvin
>
>>
>> [1] https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14 <https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14>
>>
>> [2] $otool -V -s __TEXT __constBuild/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>> Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
>> Contents of (__TEXT,__const) section
>> 0000001d 7f 03 80 1f 00 00
>>
>> $ otool -l Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>> Build/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
>> Load command 0
>> cmd LC_SEGMENT_64
>> cmdsize 232
>> segname
>> vmaddr 0x0000000000000000
>> vmsize 0x0000000000000026
>> fileoff 288
>> filesize 38
>> maxprot 0x00000007
>> initprot 0x00000007
>> nsects 2
>> flags 0x0
>> Section
>> sectname __text
>> segname __TEXT
>> addr 0x0000000000000000
>> size 0x000000000000001d
>> offset 288
>> align 2^0 (1)
>> reloff 328
>> nreloc 2
>> flags 0x80000500
>> reserved1 0
>> reserved2 0
>> Section
>> sectname __const
>> segname __TEXT
>> addr 0x000000000000001d
>> size 0x0000000000000006
>> offset 320
>> align 2^0 (1)
>> reloff 0
>> nreloc 0
>> flags 0x00000000
>> reserved1 0
>> reserved2 0
>> Load command 1
>> cmd LC_SYMTAB
>> cmdsize 24
>> symoff 344
>> nsyms 3
>> stroff 392
>> strsize 63
>>
>> Thanks,
>>
>> Andrew Fish
>>
>>
>>> Thanks for your notes and insight!
>>>
>>> Best regards,
>>> Marvin
>>>
>>>
>>> [1]
>>> "For compatibility with other Unix platforms, the following standard names are also supported:
>>> [...]
>>> .rodata = __DATA,__const data
>>> [...]
>>> If the .rodata section contains no relocations, it is instead put into the __TEXT,__const section unless this section has already been specified explicitly."
>>> https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html <https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html>
>>>
>>>>
>>>> [1] otool -lh DxeCore.dll
>>>> ...
>>>> Load command 1
>>>> cmd LC_SEGMENT_64
>>>> cmdsize 312
>>>> segname __DATA
>>>> vmaddr 0x000000000002b000
>>>> vmsize 0x0000000000147000
>>>> fileoff 180224
>>>> filesize 8192
>>>> maxprot 0x00000003
>>>> initprot 0x00000003
>>>> nsects 3
>>>> flags 0x0
>>>> Section
>>>> sectname __const
>>>> segname __DATA
>>>> addr 0x000000000002b000
>>>> size 0x0000000000000718
>>>> offset 180224
>>>> align 2^4 (16)
>>>> reloff 0
>>>> nreloc 0
>>>> flags 0x00000000
>>>> reserved1 0
>>>> reserved2 0
>>>> Section
>>>> sectname __data
>>>> segname __DATA
>>>> addr 0x000000000002b720
>>>> size 0x00000000000014f0
>>>> offset 182048
>>>> align 2^4 (16)
>>>> reloff 0
>>>> nreloc 0
>>>> flags 0x00000000
>>>> reserved1 0
>>>> reserved2 0
>>>> Section
>>>> sectname __bss
>>>> segname __DATA
>>>> addr 0x000000000002cc10
>>>> size 0x0000000000144e11
>>>> offset 0
>>>> align 2^4 (16)
>>>> reloff 0
>>>> nreloc 0
>>>> flags 0x00000001
>>>> reserved1 0
>>>> reserved2 0
>>>> …
>>>>
>>>> [2] https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html>
>>>>
>>>> [3] otool more output…
>>>> Load command 0
>>>> cmd LC_SEGMENT_64
>>>> cmdsize 392
>>>> segname __TEXT
>>>> vmaddr 0x0000000000000240
>>>> vmsize 0x00000000000296c0
>>>> fileoff 1184
>>>> filesize 169664
>>>> maxprot 0x00000005
>>>> initprot 0x00000005
>>>> nsects 4
>>>> flags 0x0
>>>> Section
>>>> sectname __text
>>>> segname __TEXT
>>>> addr 0x0000000000000240
>>>> size 0x000000000002489f
>>>> offset 1184
>>>> align 2^3 (8)
>>>> reloff 0
>>>> nreloc 0
>>>> flags 0x80000400
>>>> reserved1 0
>>>> reserved2 0
>>>> Section
>>>> sectname __cstring
>>>> segname __TEXT
>>>> addr 0x0000000000024ae0
>>>> size 0x000000000000496d
>>>> offset 150848
>>>> align 2^4 (16)
>>>> reloff 0
>>>> nreloc 0
>>>> flags 0x00000002
>>>> reserved1 0
>>>> reserved2 0
>>>> Section
>>>> sectname __ustring
>>>> segname __TEXT
>>>> addr 0x000000000002944e
>>>> size 0x0000000000000048
>>>> offset 169646
>>>> align 2^1 (2)
>>>> reloff 0
>>>> nreloc 0
>>>> flags 0x00000000
>>>> reserved1 0
>>>> reserved2 0
>>>> Section
>>>> sectname __const
>>>> segname __TEXT
>>>> addr 0x00000000000294a0
>>>> size 0x0000000000000448
>>>> offset 169728
>>>> align 2^4 (16)
>>>> reloff 0
>>>> nreloc 0
>>>> flags 0x00000000
>>>> reserved1 0
>>>> reserved2 0
>>>>
>>>> Thanks,
>>>>
>>>> Andrew Fish
>>>>
>>>>>
>>>>>
>>>>> DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
>>>>>
>>>>> @@ -3003,7 +3003,7 @@ RELEASE_XCODE5_X64_DLINK_FLAGS = -arch x86_64 -u _$(IMAGE_ENTRY_POINT) -e _
>>>>> DEBUG_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>>
>>>>> NOOPT_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>>
>>>>> RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64
>>>>>
>>>>> - *_XCODE5_X64_NASM_FLAGS = -f macho64
>>>>>
>>>>> + *_XCODE5_X64_NASM_FLAGS = -f macho64 -DRODATA_SECTION_NAME=.rodata
>>>>>
>>>>> *_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h
>>>>>
>>>>> *_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include $(MODULE_NAME)StrDefs.h
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> 2.31.1
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain
2021-08-10 21:58 ` Andrew Fish
@ 2021-08-11 8:11 ` Marvin Häuser
2021-08-11 17:19 ` Andrew Fish
0 siblings, 1 reply; 42+ messages in thread
From: Marvin Häuser @ 2021-08-11 8:11 UTC (permalink / raw)
To: Andrew Fish, devel; +Cc: Bob Feng, Liming Gao, Yuwei Chen, Vitaly Cheptsov
On 10/08/2021 23:58, Andrew Fish wrote:
>
>> On Aug 10, 2021, at 2:30 PM, Marvin Häuser <mhaeuser@posteo.de> wrote:
>>
>> On 10/08/2021 21:35, Andrew Fish via groups.io wrote:
>>>
>>>> On Aug 10, 2021, at 1:27 AM, Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>> wrote:
>>>>
>>>> On 10/08/2021 06:19, Andrew Fish via groups.io <http://groups.io> wrote:
>>>>>
>>>>>> On Aug 9, 2021, at 2:51 AM, Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>> wrote:
>>>>>>
>>>>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3318 <https://bugzilla.tianocore.org/show_bug.cgi?id=3318> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318 <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>>
>>>>>>
>>>>>> Different toolchains of the EDK II build system may generate ELF or
>>>>>> Mach-O files, which use the ".rodata" naming convention, or PE/COFF
>>>>>> files, which use the ".rdata" naming convention. Section permissions
>>>>>> are chosen based on this name per file format by NASM. To harden
>>>>>> image permission security, and to save space by avoiding both
>>>>>> ".rdata" and ".rodata" sections being emitted, expose the appropriate
>>>>>> name as a preprocessor constant.
>>>>>>
>>>>>> Cc: Bob Feng <bob.c.feng@intel.com <mailto:bob.c.feng@intel.com> <mailto:bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>>>
>>>>>> Cc: Liming Gao <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> <mailto:gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>>>
>>>>>> Cc: Yuwei Chen <yuwei.chen@intel.com <mailto:yuwei.chen@intel.com> <mailto:yuwei.chen@intel.com <mailto:yuwei.chen@intel.com>>>
>>>>>> Cc: Vitaly Cheptsov <vit9696@protonmail.com <mailto:vit9696@protonmail.com> <mailto:vit9696@protonmail.com <mailto:vit9696@protonmail.com>>>
>>>>>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>>
>>>>>> ---
>>>>>> BaseTools/Conf/tools_def.template | 172 ++++++++++----------
>>>>>> 1 file changed, 86 insertions(+), 86 deletions(-)
>>>>>>
>>>>>> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
>>>>>> index 2e6b382ab623..84d464916c4d 100755
>>>>>> --- a/BaseTools/Conf/tools_def.template
>>>>>> +++ b/BaseTools/Conf/tools_def.template
>>>>>> @@ -463,9 +463,9 @@ NOOPT_VS2008_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>> RELEASE_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -495,9 +495,9 @@ NOOPT_VS2008_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>> RELEASE_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -574,9 +574,9 @@ NOOPT_VS2008x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>> RELEASE_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -605,9 +605,9 @@ NOOPT_VS2008x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>> RELEASE_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -688,9 +688,9 @@ NOOPT_VS2010_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>> RELEASE_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -720,9 +720,9 @@ NOOPT_VS2010_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>> RELEASE_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -799,9 +799,9 @@ NOOPT_VS2010x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>> RELEASE_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -831,9 +831,9 @@ NOOPT_VS2010x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>> RELEASE_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -913,9 +913,9 @@ NOOPT_VS2012_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>> RELEASE_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -945,9 +945,9 @@ NOOPT_VS2012_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>> RELEASE_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1024,9 +1024,9 @@ NOOPT_VS2012x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>> RELEASE_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1056,9 +1056,9 @@ NOOPT_VS2012x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>> RELEASE_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1138,9 +1138,9 @@ NOOPT_VS2013_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>> RELEASE_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1170,9 +1170,9 @@ NOOPT_VS2013_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>> RELEASE_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1249,9 +1249,9 @@ NOOPT_VS2013x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>> RELEASE_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1281,9 +1281,9 @@ NOOPT_VS2013x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>> RELEASE_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1364,9 +1364,9 @@ NOOPT_VS2015_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>> RELEASE_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1396,9 +1396,9 @@ NOOPT_VS2015_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>> RELEASE_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1476,9 +1476,9 @@ NOOPT_VS2015x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>> RELEASE_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1508,9 +1508,9 @@ NOOPT_VS2015x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>> RELEASE_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1586,9 +1586,9 @@ NOOPT_VS2017_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>>>> RELEASE_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1616,9 +1616,9 @@ NOOPT_VS2017_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>> RELEASE_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1744,9 +1744,9 @@ NOOPT_VS2019_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>>>> RELEASE_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>
>>>>>> NOOPT_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>
>>>>>> -RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>
>>>>>> -NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>
>>>>>> + DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -1774,9 +1774,9 @@ NOOPT_VS2019_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>> RELEASE_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>
>>>>>> NOOPT_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>
>>>>>>
>>>>>>
>>>>>> - DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>
>>>>>> -RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64
>>>>>>
>>>>>> -NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>
>>>>>> + DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> +NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>
>>>>>> RELEASE_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>
>>>>>> @@ -2030,7 +2030,7 @@ DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include A
>>>>>> *_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
>>>>>>
>>>>>> *_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>
>>>>>> *_GCC48_IA32_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_GCC48_IA32_NASM_FLAGS = -f elf32
>>>>>>
>>>>>> +*_GCC48_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
>>>>>>
>>>>>> RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable
>>>>>>
>>>>>> @@ -2058,7 +2058,7 @@ RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>>>> *_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
>>>>>>
>>>>>> *_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>
>>>>>> *_GCC48_X64_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_GCC48_X64_NASM_FLAGS = -f elf64
>>>>>>
>>>>>> +*_GCC48_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
>>>>>>
>>>>>> RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable
>>>>>>
>>>>>> @@ -2170,7 +2170,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
>>>>>> *_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
>>>>>>
>>>>>> *_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>
>>>>>> *_GCC49_IA32_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_GCC49_IA32_NASM_FLAGS = -f elf32
>>>>>>
>>>>>> +*_GCC49_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
>>>>>>
>>>>>> RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>>>
>>>>>> @@ -2198,7 +2198,7 @@ RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>>>> *_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
>>>>>>
>>>>>> *_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>
>>>>>> *_GCC49_X64_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_GCC49_X64_NASM_FLAGS = -f elf64
>>>>>>
>>>>>> +*_GCC49_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
>>>>>>
>>>>>> RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>>>
>>>>>> @@ -2316,7 +2316,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
>>>>>> *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
>>>>>>
>>>>>> *_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>
>>>>>> *_GCC5_IA32_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_GCC5_IA32_NASM_FLAGS = -f elf32
>>>>>>
>>>>>> +*_GCC5_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Os
>>>>>>
>>>>>> DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
>>>>>>
>>>>>> @@ -2348,7 +2348,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,
>>>>>> *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
>>>>>>
>>>>>> *_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>
>>>>>> *_GCC5_X64_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_GCC5_X64_NASM_FLAGS = -f elf64
>>>>>>
>>>>>> +*_GCC5_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>>
>>>>>>
>>>>>> DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO -Os
>>>>>>
>>>>>> DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
>>>>>>
>>>>>> @@ -2589,7 +2589,7 @@ DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNIN
>>>>>> *_CLANG38_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>>>
>>>>>> *_CLANG38_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>
>>>>>> *_CLANG38_IA32_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_CLANG38_IA32_NASM_FLAGS = -f elf32
>>>>>>
>>>>>> +*_CLANG38_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>> *_CLANG38_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>
>>>>>> *_CLANG38_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>
>>>>>> *_CLANG38_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>
>>>>>> @@ -2626,7 +2626,7 @@ NOOPT_CLANG38_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -O0
>>>>>> *_CLANG38_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
>>>>>>
>>>>>> *_CLANG38_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>
>>>>>> *_CLANG38_X64_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_CLANG38_X64_NASM_FLAGS = -f elf64
>>>>>>
>>>>>> +*_CLANG38_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>> *_CLANG38_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>
>>>>>> *_CLANG38_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>
>>>>>> *_CLANG38_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>
>>>>>> @@ -2777,7 +2777,7 @@ DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARN
>>>>>> *_CLANGPDB_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32 -fno-lto DEF(CLANGPDB_IA32_TARGET)
>>>>>>
>>>>>> *_CLANGPDB_IA32_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m32 -march=i386 DEF(CLANGPDB_IA32_TARGET)
>>>>>>
>>>>>> *_CLANGPDB_IA32_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_CLANGPDB_IA32_NASM_FLAGS = -f win32
>>>>>>
>>>>>> +*_CLANGPDB_IA32_NASM_FLAGS = -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> *_CLANGPDB_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>>>
>>>>>> *_CLANGPDB_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>>>
>>>>>> *_CLANGPDB_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>>>
>>>>>> @@ -2811,7 +2811,7 @@ NOOPT_CLANGPDB_IA32_DLINK2_FLAGS =
>>>>>> *_CLANGPDB_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64 -fno-lto DEF(CLANGPDB_X64_TARGET)
>>>>>>
>>>>>> *_CLANGPDB_X64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m64 DEF(CLANGPDB_X64_TARGET)
>>>>>>
>>>>>> *_CLANGPDB_X64_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_CLANGPDB_X64_NASM_FLAGS = -f win64
>>>>>>
>>>>>> +*_CLANGPDB_X64_NASM_FLAGS = -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>
>>>>>> *_CLANGPDB_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>>>
>>>>>> *_CLANGPDB_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>>>
>>>>>> *_CLANGPDB_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>>>
>>>>>> @@ -2878,7 +2878,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
>>>>>> *_CLANGDWARF_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>>>
>>>>>> *_CLANGDWARF_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>
>>>>>> *_CLANGDWARF_IA32_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32
>>>>>>
>>>>>> +*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>> *_CLANGDWARF_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>
>>>>>> *_CLANGDWARF_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>
>>>>>> *_CLANGDWARF_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>
>>>>>> @@ -2914,7 +2914,7 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -
>>>>>> *_CLANGDWARF_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
>>>>>>
>>>>>> *_CLANGDWARF_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>
>>>>>> *_CLANGDWARF_X64_OBJCOPY_FLAGS =
>>>>>>
>>>>>> -*_CLANGDWARF_X64_NASM_FLAGS = -f elf64
>>>>>>
>>>>>> +*_CLANGDWARF_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>> *_CLANGDWARF_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>
>>>>>> *_CLANGDWARF_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>
>>>>>> *_CLANGDWARF_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>
>>>>>> @@ -2985,7 +2985,7 @@ RELEASE_XCODE5_IA32_DLINK_FLAGS = -arch i386 -u _$(IMAGE_ENTRY_POINT) -e _$
>>>>>> DEBUG_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>>>
>>>>>> NOOPT_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>>>
>>>>>> RELEASE_XCODE5_IA32_ASM_FLAGS = -arch i386
>>>>>>
>>>>>> - *_XCODE5_IA32_NASM_FLAGS = -f macho32
>>>>>>
>>>>>> + *_XCODE5_IA32_NASM_FLAGS = -f macho32 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>>
>>>>>>
>>>>> An EFI Mach-O file does not contain a .rodata section. A Mach-O contains a __DATA segment that is broken up into sections. For a typical EFI image there are __const, __data, __bss sections in the __DATA segment [1].
>>>> Yes, and ".rodata" is almost a synonym for "__DATA,__const", with a small exception [1]. Maybe it'd be clearer if the macro was renamed to "NASM_RODATA_SECTION_NAME", to indicate this is not just a "raw" name, but NASM gives it a semantic meaning?
>>>>
>>>>> The mtoc [2] tool used to convert mach-O to PE/COFF converts the entire __DATA segment (__const, __data, and __bss) into the .data section. Thus adding any kind of new data section is a no-op at best.
>>>> This is a part I missed, because I do not have an Xcode toolchain at hand, so thanks for investigating. However this, in my opinion, is a flaw with Mach-O/mtoc and not with my patch. It seems like the only difference between __TEXT,__const and __DATA,__const is whether the data is targeted by a relocation or not. Such a concept does not exist for PE/COFF (and I think not even for ELF, but I'm not too familiar with it), thus the logical PE/COFF section __DATA,__const should be merged into is .rdata (and .rdata may or may not be merged into .text in an earlier step, I assume transitivity). I could change the macro definition to explicitly declare __TEXT,__const, but that would still put the compiler-emitted data in the wrong section. Does Xcode provide anything remotely similar to GNU linker scripts which we can use to move the section?
>>>>
>>>> Please also note that .rodata is used for Xcode-based toolchains already (in fact, all toolchains, and this is the issue), I'm not regressing anything. I just expected it to work fine as-is. This patch mainly fixed PE/COFF-based toolchains, which get both .rdata from the compiler and .rodata with RX permissions from NASM, because ".rodata" only has a semantic meaning for ELF and Mach-O outputs, but not for PE/COFF.
>>>>
>>>>> If you want something to be read only for Xcode/clang you are better off putting it in the __TEXT section [3]. The __TEXT section is read only and for X64 can not even contain relocations.
>>>> Well, this kind of is an issue. We would need to introduce an arbitrary constraint on the relocation part that holds only for Xcode-based toolchains. Does the compiler emit an error when data in __TEXT,__const is targeted by a relocation?
>>> The Xcode linker emits a fatal error on X64 for a relocation in the __TEXT section, everything needs to be RIP relative and the compiler does that for free. We generally only run into this for hand coded assembler and the fix is to use RIP relative addressing in the assembly.
>> Good, thanks for confirming! Still, this would be a bit of an awkward constraints for Xcode only.
>>
> It is a physics problem we can’t fix, so I end up writing some patches to fix other peoples assembler from time to time. The CI building with Xcode helps with this a lot.
(I think all open ends of the other threads are in here too, so let's
drop them and go on only here?)
Right, ok, thanks!
>>>> Also see above regarding compiler-emitted __DATA,__const.
>>>>
>>> OK so the current nasm `SECTION .rodata`[1] gets mapped to __TEXT,__const[2] for Xcode clang, and this is done by nasm (I dumped the object file). GenFw and mtoc only run on executables, also they tend to be conservative as they need to keep the layout the same and the relative layout between sections the same, but in this case it is nasm placing the data in the text section.
>>>
>>> So what I’d like to see in the patch is to define RODATA_SECTION_NAME to match what is actually happening. So for XCODE that would be `__TEXT,__const` not `.rodata`.
>> We can do that, but what to do about compiler-emitted __DATA,__const?
> Sorry I don’t understand what RODATA_SECTION_NAME has to do with the compiler? I thought it was for nasm?
Yes, it is for NASM. My point is, the actual issue is not that my macro
uses __DATA,__const, but that __DATA,__const is not merged into .text,
but into .data. Fixing the macro fixes where the NASM definitions go,
but what about the C definitions? I cannot test it, as I said, because I
don't have an Xcode machine, but let's say we have a stupid example like
this:
volatile UINT32 a;
volatile UINT32 *CONST p = &a;
The value of p is constant, so it can be placed in a constant data
section. p points to a global variable, so if the compiler does not
manage to somehow turn this into relative addressing (let's assume it
does not), it needs to generate a relocation. This means the compiler
cannot put it in __TEXT,__const, so it has to put it in __DATA,__const
(of course it could put it in other __DATA sections, but let's assume
the compiler agrees this should be read-only). The very same issue will
arise and no matter the choice of the compiler, this will end up in
.data. Do you agree? Or do we have some guarantee that Apple Clang
cannot emit __DATA,__const?
>>> We should double check what is happening for ELF on x86, ARM, RiskV, etc. and do the same thing. I assume all the tools that generate PE/COFF directly are good with .rodata?
>> They are not, that is the whole point of the patch in its current shape. .rodata is valid for ELF and Mach-O, PE/COFF needs .rdata.
>>
>>> I think it is likely as simple as dumping the EFL object file in objdump or gdb for the given toolchain (like my Xcode example).
>>>
>>> TL;DR It looks to me like nasm does some SECTION translations under the hood to make code portable, and I’d like to make sure we capture those in the new NASM_RODATA_SECTION_NAME. If some one is doing a security review having NASM_RODATA_SECTION_NAME is going to imply that a .rodata section is being used by that specific toolchain, and I think that is much worse than the current “magic” behavior in nasm. We are much better off explaining what is really happening, since it is not very obvious.
>> I feel like I'm too tired to get the point. Do you mean you want comments whenever this section name is used? Or comments in tools_def?
>>
> I think I’d settle for a more descriptive commit comment that better defines what the define means like I mentioned in the other mail.
Hmm no, we can do that too, but in that case I really want comments in
the code. tools_def is not really documented at all, maybe it is time to
introduce an example comment so at least new things get commented? Maybe
just the start of a macro list. Relying on "git blame" to figure out
simple things is rather awful.
One more thing from another thread: Yes, the new macro should refer to
object file section naming. I want this patch to get object file
sections proper and sound. From there on we can fix the linking stage to
emit proper and sound executables in a later patch.
Best regards,
Marvin
>
> Thanks,
>
> Andrew Fish
>
>> Best regards,
>> Marvin
>>
>>> [1] https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14 <https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14>
>>>
>>> [2] $otool -V -s __TEXT __constBuild/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>>> Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
>>> Contents of (__TEXT,__const) section
>>> 0000001d 7f 03 80 1f 00 00
>>>
>>> $ otool -l Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>>> Build/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
>>> Load command 0
>>> cmd LC_SEGMENT_64
>>> cmdsize 232
>>> segname
>>> vmaddr 0x0000000000000000
>>> vmsize 0x0000000000000026
>>> fileoff 288
>>> filesize 38
>>> maxprot 0x00000007
>>> initprot 0x00000007
>>> nsects 2
>>> flags 0x0
>>> Section
>>> sectname __text
>>> segname __TEXT
>>> addr 0x0000000000000000
>>> size 0x000000000000001d
>>> offset 288
>>> align 2^0 (1)
>>> reloff 328
>>> nreloc 2
>>> flags 0x80000500
>>> reserved1 0
>>> reserved2 0
>>> Section
>>> sectname __const
>>> segname __TEXT
>>> addr 0x000000000000001d
>>> size 0x0000000000000006
>>> offset 320
>>> align 2^0 (1)
>>> reloff 0
>>> nreloc 0
>>> flags 0x00000000
>>> reserved1 0
>>> reserved2 0
>>> Load command 1
>>> cmd LC_SYMTAB
>>> cmdsize 24
>>> symoff 344
>>> nsyms 3
>>> stroff 392
>>> strsize 63
>>>
>>> Thanks,
>>>
>>> Andrew Fish
>>>
>>>
>>>> Thanks for your notes and insight!
>>>>
>>>> Best regards,
>>>> Marvin
>>>>
>>>>
>>>> [1]
>>>> "For compatibility with other Unix platforms, the following standard names are also supported:
>>>> [...]
>>>> .rodata = __DATA,__const data
>>>> [...]
>>>> If the .rodata section contains no relocations, it is instead put into the __TEXT,__const section unless this section has already been specified explicitly."
>>>> https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html <https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html>
>>>>
>>>>> [1] otool -lh DxeCore.dll
>>>>> ...
>>>>> Load command 1
>>>>> cmd LC_SEGMENT_64
>>>>> cmdsize 312
>>>>> segname __DATA
>>>>> vmaddr 0x000000000002b000
>>>>> vmsize 0x0000000000147000
>>>>> fileoff 180224
>>>>> filesize 8192
>>>>> maxprot 0x00000003
>>>>> initprot 0x00000003
>>>>> nsects 3
>>>>> flags 0x0
>>>>> Section
>>>>> sectname __const
>>>>> segname __DATA
>>>>> addr 0x000000000002b000
>>>>> size 0x0000000000000718
>>>>> offset 180224
>>>>> align 2^4 (16)
>>>>> reloff 0
>>>>> nreloc 0
>>>>> flags 0x00000000
>>>>> reserved1 0
>>>>> reserved2 0
>>>>> Section
>>>>> sectname __data
>>>>> segname __DATA
>>>>> addr 0x000000000002b720
>>>>> size 0x00000000000014f0
>>>>> offset 182048
>>>>> align 2^4 (16)
>>>>> reloff 0
>>>>> nreloc 0
>>>>> flags 0x00000000
>>>>> reserved1 0
>>>>> reserved2 0
>>>>> Section
>>>>> sectname __bss
>>>>> segname __DATA
>>>>> addr 0x000000000002cc10
>>>>> size 0x0000000000144e11
>>>>> offset 0
>>>>> align 2^4 (16)
>>>>> reloff 0
>>>>> nreloc 0
>>>>> flags 0x00000001
>>>>> reserved1 0
>>>>> reserved2 0
>>>>> …
>>>>>
>>>>> [2] https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html>
>>>>>
>>>>> [3] otool more output…
>>>>> Load command 0
>>>>> cmd LC_SEGMENT_64
>>>>> cmdsize 392
>>>>> segname __TEXT
>>>>> vmaddr 0x0000000000000240
>>>>> vmsize 0x00000000000296c0
>>>>> fileoff 1184
>>>>> filesize 169664
>>>>> maxprot 0x00000005
>>>>> initprot 0x00000005
>>>>> nsects 4
>>>>> flags 0x0
>>>>> Section
>>>>> sectname __text
>>>>> segname __TEXT
>>>>> addr 0x0000000000000240
>>>>> size 0x000000000002489f
>>>>> offset 1184
>>>>> align 2^3 (8)
>>>>> reloff 0
>>>>> nreloc 0
>>>>> flags 0x80000400
>>>>> reserved1 0
>>>>> reserved2 0
>>>>> Section
>>>>> sectname __cstring
>>>>> segname __TEXT
>>>>> addr 0x0000000000024ae0
>>>>> size 0x000000000000496d
>>>>> offset 150848
>>>>> align 2^4 (16)
>>>>> reloff 0
>>>>> nreloc 0
>>>>> flags 0x00000002
>>>>> reserved1 0
>>>>> reserved2 0
>>>>> Section
>>>>> sectname __ustring
>>>>> segname __TEXT
>>>>> addr 0x000000000002944e
>>>>> size 0x0000000000000048
>>>>> offset 169646
>>>>> align 2^1 (2)
>>>>> reloff 0
>>>>> nreloc 0
>>>>> flags 0x00000000
>>>>> reserved1 0
>>>>> reserved2 0
>>>>> Section
>>>>> sectname __const
>>>>> segname __TEXT
>>>>> addr 0x00000000000294a0
>>>>> size 0x0000000000000448
>>>>> offset 169728
>>>>> align 2^4 (16)
>>>>> reloff 0
>>>>> nreloc 0
>>>>> flags 0x00000000
>>>>> reserved1 0
>>>>> reserved2 0
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Andrew Fish
>>>>>
>>>>>>
>>>>>> DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
>>>>>>
>>>>>> @@ -3003,7 +3003,7 @@ RELEASE_XCODE5_X64_DLINK_FLAGS = -arch x86_64 -u _$(IMAGE_ENTRY_POINT) -e _
>>>>>> DEBUG_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>>>
>>>>>> NOOPT_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>>>
>>>>>> RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64
>>>>>>
>>>>>> - *_XCODE5_X64_NASM_FLAGS = -f macho64
>>>>>>
>>>>>> + *_XCODE5_X64_NASM_FLAGS = -f macho64 -DRODATA_SECTION_NAME=.rodata
>>>>>>
>>>>>> *_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h
>>>>>>
>>>>>> *_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include $(MODULE_NAME)StrDefs.h
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> 2.31.1
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>
>>
>>
>>
>>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain
2021-08-11 8:11 ` Marvin Häuser
@ 2021-08-11 17:19 ` Andrew Fish
2021-08-12 7:26 ` Marvin Häuser
0 siblings, 1 reply; 42+ messages in thread
From: Andrew Fish @ 2021-08-11 17:19 UTC (permalink / raw)
To: edk2-devel-groups-io, Marvin Häuser
Cc: Bob Feng, Liming Gao, Yuwei Chen, Vitaly Cheptsov
[-- Attachment #1: Type: text/plain, Size: 61427 bytes --]
> On Aug 11, 2021, at 1:11 AM, Marvin Häuser <mhaeuser@posteo.de> wrote:
>
> On 10/08/2021 23:58, Andrew Fish wrote:
>>
>>> On Aug 10, 2021, at 2:30 PM, Marvin Häuser <mhaeuser@posteo.de> wrote:
>>>
>>> On 10/08/2021 21:35, Andrew Fish via groups.io wrote:
>>>>
>>>>> On Aug 10, 2021, at 1:27 AM, Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>> wrote:
>>>>>
>>>>> On 10/08/2021 06:19, Andrew Fish via groups.io <http://groups.io> wrote:
>>>>>>
>>>>>>> On Aug 9, 2021, at 2:51 AM, Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>> wrote:
>>>>>>>
>>>>>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3318 <https://bugzilla.tianocore.org/show_bug.cgi?id=3318> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318 <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>>
>>>>>>>
>>>>>>> Different toolchains of the EDK II build system may generate ELF or
>>>>>>> Mach-O files, which use the ".rodata" naming convention, or PE/COFF
>>>>>>> files, which use the ".rdata" naming convention. Section permissions
>>>>>>> are chosen based on this name per file format by NASM. To harden
>>>>>>> image permission security, and to save space by avoiding both
>>>>>>> ".rdata" and ".rodata" sections being emitted, expose the appropriate
>>>>>>> name as a preprocessor constant.
>>>>>>>
>>>>>>> Cc: Bob Feng <bob.c.feng@intel.com <mailto:bob.c.feng@intel.com> <mailto:bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>>>
>>>>>>> Cc: Liming Gao <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> <mailto:gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>>>
>>>>>>> Cc: Yuwei Chen <yuwei.chen@intel.com <mailto:yuwei.chen@intel.com> <mailto:yuwei.chen@intel.com <mailto:yuwei.chen@intel.com>>>
>>>>>>> Cc: Vitaly Cheptsov <vit9696@protonmail.com <mailto:vit9696@protonmail.com> <mailto:vit9696@protonmail.com <mailto:vit9696@protonmail.com>>>
>>>>>>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>>
>>>>>>> ---
>>>>>>> BaseTools/Conf/tools_def.template | 172 ++++++++++----------
>>>>>>> 1 file changed, 86 insertions(+), 86 deletions(-)
>>>>>>>
>>>>>>> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
>>>>>>> index 2e6b382ab623..84d464916c4d 100755
>>>>>>> --- a/BaseTools/Conf/tools_def.template
>>>>>>> +++ b/BaseTools/Conf/tools_def.template
>>>>>>> @@ -463,9 +463,9 @@ NOOPT_VS2008_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>> RELEASE_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>
>>>>>>> NOOPT_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>
>>>>>>> -RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>
>>>>>>> -NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>
>>>>>>> + DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -495,9 +495,9 @@ NOOPT_VS2008_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>> RELEASE_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>
>>>>>>> NOOPT_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>
>>>>>>> -RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>
>>>>>>> -NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>
>>>>>>> + DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -574,9 +574,9 @@ NOOPT_VS2008x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>> RELEASE_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>
>>>>>>> NOOPT_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>
>>>>>>> -RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>
>>>>>>> -NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>
>>>>>>> + DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -605,9 +605,9 @@ NOOPT_VS2008x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>> RELEASE_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>
>>>>>>> NOOPT_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>
>>>>>>> -RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>
>>>>>>> -NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>
>>>>>>> + DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -688,9 +688,9 @@ NOOPT_VS2010_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>> RELEASE_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>
>>>>>>> NOOPT_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>
>>>>>>> -RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>
>>>>>>> -NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>
>>>>>>> + DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -720,9 +720,9 @@ NOOPT_VS2010_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>> RELEASE_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>
>>>>>>> NOOPT_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>
>>>>>>> -RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>
>>>>>>> -NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>
>>>>>>> + DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -799,9 +799,9 @@ NOOPT_VS2010x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>> RELEASE_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>
>>>>>>> NOOPT_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>
>>>>>>> -RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>
>>>>>>> -NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>
>>>>>>> + DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -831,9 +831,9 @@ NOOPT_VS2010x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>> RELEASE_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>
>>>>>>> NOOPT_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>
>>>>>>> -RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>
>>>>>>> -NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>
>>>>>>> + DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -913,9 +913,9 @@ NOOPT_VS2012_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>> RELEASE_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>
>>>>>>> NOOPT_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>
>>>>>>> -RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>
>>>>>>> -NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>
>>>>>>> + DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -945,9 +945,9 @@ NOOPT_VS2012_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>> RELEASE_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>
>>>>>>> NOOPT_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>
>>>>>>> -RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>
>>>>>>> -NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>
>>>>>>> + DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -1024,9 +1024,9 @@ NOOPT_VS2012x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>> RELEASE_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>
>>>>>>> NOOPT_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>
>>>>>>> -RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>
>>>>>>> -NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>
>>>>>>> + DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -1056,9 +1056,9 @@ NOOPT_VS2012x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>> RELEASE_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>
>>>>>>> NOOPT_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>
>>>>>>> -RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>
>>>>>>> -NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>
>>>>>>> + DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -1138,9 +1138,9 @@ NOOPT_VS2013_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>> RELEASE_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>
>>>>>>> NOOPT_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>
>>>>>>> -RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>
>>>>>>> -NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>
>>>>>>> + DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -1170,9 +1170,9 @@ NOOPT_VS2013_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>> RELEASE_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>
>>>>>>> NOOPT_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>
>>>>>>> -RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>
>>>>>>> -NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>
>>>>>>> + DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -1249,9 +1249,9 @@ NOOPT_VS2013x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>> RELEASE_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>
>>>>>>> NOOPT_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>
>>>>>>> -RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>
>>>>>>> -NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>
>>>>>>> + DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -1281,9 +1281,9 @@ NOOPT_VS2013x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>> RELEASE_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>
>>>>>>> NOOPT_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>
>>>>>>> -RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>
>>>>>>> -NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>
>>>>>>> + DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -1364,9 +1364,9 @@ NOOPT_VS2015_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>> RELEASE_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>
>>>>>>> NOOPT_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>
>>>>>>> -RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>
>>>>>>> -NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>
>>>>>>> + DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -1396,9 +1396,9 @@ NOOPT_VS2015_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>> RELEASE_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>
>>>>>>> NOOPT_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>
>>>>>>> -RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>
>>>>>>> -NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>
>>>>>>> + DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -1476,9 +1476,9 @@ NOOPT_VS2015x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>> RELEASE_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>
>>>>>>> NOOPT_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>
>>>>>>> -RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>
>>>>>>> -NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>
>>>>>>> + DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -1508,9 +1508,9 @@ NOOPT_VS2015x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>> RELEASE_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>
>>>>>>> NOOPT_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>
>>>>>>> -RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>
>>>>>>> -NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>
>>>>>>> + DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -1586,9 +1586,9 @@ NOOPT_VS2017_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>>>>> RELEASE_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>
>>>>>>> NOOPT_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>
>>>>>>> -RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>
>>>>>>> -NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>
>>>>>>> + DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -1616,9 +1616,9 @@ NOOPT_VS2017_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>> RELEASE_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>
>>>>>>> NOOPT_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>
>>>>>>> -RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>
>>>>>>> -NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>
>>>>>>> + DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -1744,9 +1744,9 @@ NOOPT_VS2019_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>>>>> RELEASE_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>
>>>>>>> NOOPT_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>
>>>>>>> -RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>
>>>>>>> -NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>
>>>>>>> + DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -1774,9 +1774,9 @@ NOOPT_VS2019_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>> RELEASE_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>
>>>>>>> NOOPT_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>
>>>>>>> -RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>
>>>>>>> -NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>
>>>>>>> + DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> +NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>
>>>>>>> RELEASE_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>
>>>>>>> @@ -2030,7 +2030,7 @@ DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include A
>>>>>>> *_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
>>>>>>>
>>>>>>> *_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>
>>>>>>> *_GCC48_IA32_OBJCOPY_FLAGS =
>>>>>>>
>>>>>>> -*_GCC48_IA32_NASM_FLAGS = -f elf32
>>>>>>>
>>>>>>> +*_GCC48_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
>>>>>>>
>>>>>>> RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable
>>>>>>>
>>>>>>> @@ -2058,7 +2058,7 @@ RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>>>>> *_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
>>>>>>>
>>>>>>> *_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>
>>>>>>> *_GCC48_X64_OBJCOPY_FLAGS =
>>>>>>>
>>>>>>> -*_GCC48_X64_NASM_FLAGS = -f elf64
>>>>>>>
>>>>>>> +*_GCC48_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
>>>>>>>
>>>>>>> RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable
>>>>>>>
>>>>>>> @@ -2170,7 +2170,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
>>>>>>> *_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
>>>>>>>
>>>>>>> *_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>
>>>>>>> *_GCC49_IA32_OBJCOPY_FLAGS =
>>>>>>>
>>>>>>> -*_GCC49_IA32_NASM_FLAGS = -f elf32
>>>>>>>
>>>>>>> +*_GCC49_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
>>>>>>>
>>>>>>> RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>>>>
>>>>>>> @@ -2198,7 +2198,7 @@ RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>>>>> *_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
>>>>>>>
>>>>>>> *_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>
>>>>>>> *_GCC49_X64_OBJCOPY_FLAGS =
>>>>>>>
>>>>>>> -*_GCC49_X64_NASM_FLAGS = -f elf64
>>>>>>>
>>>>>>> +*_GCC49_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
>>>>>>>
>>>>>>> RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>>>>
>>>>>>> @@ -2316,7 +2316,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
>>>>>>> *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
>>>>>>>
>>>>>>> *_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>
>>>>>>> *_GCC5_IA32_OBJCOPY_FLAGS =
>>>>>>>
>>>>>>> -*_GCC5_IA32_NASM_FLAGS = -f elf32
>>>>>>>
>>>>>>> +*_GCC5_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Os
>>>>>>>
>>>>>>> DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
>>>>>>>
>>>>>>> @@ -2348,7 +2348,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,
>>>>>>> *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
>>>>>>>
>>>>>>> *_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>
>>>>>>> *_GCC5_X64_OBJCOPY_FLAGS =
>>>>>>>
>>>>>>> -*_GCC5_X64_NASM_FLAGS = -f elf64
>>>>>>>
>>>>>>> +*_GCC5_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO -Os
>>>>>>>
>>>>>>> DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
>>>>>>>
>>>>>>> @@ -2589,7 +2589,7 @@ DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNIN
>>>>>>> *_CLANG38_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>>>>
>>>>>>> *_CLANG38_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>
>>>>>>> *_CLANG38_IA32_OBJCOPY_FLAGS =
>>>>>>>
>>>>>>> -*_CLANG38_IA32_NASM_FLAGS = -f elf32
>>>>>>>
>>>>>>> +*_CLANG38_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>>
>>>>>>> *_CLANG38_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>>
>>>>>>> *_CLANG38_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>>
>>>>>>> *_CLANG38_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>>
>>>>>>> @@ -2626,7 +2626,7 @@ NOOPT_CLANG38_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -O0
>>>>>>> *_CLANG38_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
>>>>>>>
>>>>>>> *_CLANG38_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>
>>>>>>> *_CLANG38_X64_OBJCOPY_FLAGS =
>>>>>>>
>>>>>>> -*_CLANG38_X64_NASM_FLAGS = -f elf64
>>>>>>>
>>>>>>> +*_CLANG38_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>>
>>>>>>> *_CLANG38_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>>
>>>>>>> *_CLANG38_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>>
>>>>>>> *_CLANG38_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>>
>>>>>>> @@ -2777,7 +2777,7 @@ DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARN
>>>>>>> *_CLANGPDB_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32 -fno-lto DEF(CLANGPDB_IA32_TARGET)
>>>>>>>
>>>>>>> *_CLANGPDB_IA32_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m32 -march=i386 DEF(CLANGPDB_IA32_TARGET)
>>>>>>>
>>>>>>> *_CLANGPDB_IA32_OBJCOPY_FLAGS =
>>>>>>>
>>>>>>> -*_CLANGPDB_IA32_NASM_FLAGS = -f win32
>>>>>>>
>>>>>>> +*_CLANGPDB_IA32_NASM_FLAGS = -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> *_CLANGPDB_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>>>>
>>>>>>> *_CLANGPDB_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>>>>
>>>>>>> *_CLANGPDB_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>>>>
>>>>>>> @@ -2811,7 +2811,7 @@ NOOPT_CLANGPDB_IA32_DLINK2_FLAGS =
>>>>>>> *_CLANGPDB_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64 -fno-lto DEF(CLANGPDB_X64_TARGET)
>>>>>>>
>>>>>>> *_CLANGPDB_X64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m64 DEF(CLANGPDB_X64_TARGET)
>>>>>>>
>>>>>>> *_CLANGPDB_X64_OBJCOPY_FLAGS =
>>>>>>>
>>>>>>> -*_CLANGPDB_X64_NASM_FLAGS = -f win64
>>>>>>>
>>>>>>> +*_CLANGPDB_X64_NASM_FLAGS = -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>
>>>>>>> *_CLANGPDB_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>>>>
>>>>>>> *_CLANGPDB_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>>>>
>>>>>>> *_CLANGPDB_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>>>>
>>>>>>> @@ -2878,7 +2878,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
>>>>>>> *_CLANGDWARF_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>>>>
>>>>>>> *_CLANGDWARF_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>
>>>>>>> *_CLANGDWARF_IA32_OBJCOPY_FLAGS =
>>>>>>>
>>>>>>> -*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32
>>>>>>>
>>>>>>> +*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>>
>>>>>>> *_CLANGDWARF_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>>
>>>>>>> *_CLANGDWARF_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>>
>>>>>>> *_CLANGDWARF_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>>
>>>>>>> @@ -2914,7 +2914,7 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -
>>>>>>> *_CLANGDWARF_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
>>>>>>>
>>>>>>> *_CLANGDWARF_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>
>>>>>>> *_CLANGDWARF_X64_OBJCOPY_FLAGS =
>>>>>>>
>>>>>>> -*_CLANGDWARF_X64_NASM_FLAGS = -f elf64
>>>>>>>
>>>>>>> +*_CLANGDWARF_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>>
>>>>>>> *_CLANGDWARF_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>>
>>>>>>> *_CLANGDWARF_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>>
>>>>>>> *_CLANGDWARF_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>>
>>>>>>> @@ -2985,7 +2985,7 @@ RELEASE_XCODE5_IA32_DLINK_FLAGS = -arch i386 -u _$(IMAGE_ENTRY_POINT) -e _$
>>>>>>> DEBUG_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>>>>
>>>>>>> NOOPT_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>>>>
>>>>>>> RELEASE_XCODE5_IA32_ASM_FLAGS = -arch i386
>>>>>>>
>>>>>>> - *_XCODE5_IA32_NASM_FLAGS = -f macho32
>>>>>>>
>>>>>>> + *_XCODE5_IA32_NASM_FLAGS = -f macho32 -DRODATA_SECTION_NAME=.rodata
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> An EFI Mach-O file does not contain a .rodata section. A Mach-O contains a __DATA segment that is broken up into sections. For a typical EFI image there are __const, __data, __bss sections in the __DATA segment [1].
>>>>> Yes, and ".rodata" is almost a synonym for "__DATA,__const", with a small exception [1]. Maybe it'd be clearer if the macro was renamed to "NASM_RODATA_SECTION_NAME", to indicate this is not just a "raw" name, but NASM gives it a semantic meaning?
>>>>>
>>>>>> The mtoc [2] tool used to convert mach-O to PE/COFF converts the entire __DATA segment (__const, __data, and __bss) into the .data section. Thus adding any kind of new data section is a no-op at best.
>>>>> This is a part I missed, because I do not have an Xcode toolchain at hand, so thanks for investigating. However this, in my opinion, is a flaw with Mach-O/mtoc and not with my patch. It seems like the only difference between __TEXT,__const and __DATA,__const is whether the data is targeted by a relocation or not. Such a concept does not exist for PE/COFF (and I think not even for ELF, but I'm not too familiar with it), thus the logical PE/COFF section __DATA,__const should be merged into is .rdata (and .rdata may or may not be merged into .text in an earlier step, I assume transitivity). I could change the macro definition to explicitly declare __TEXT,__const, but that would still put the compiler-emitted data in the wrong section. Does Xcode provide anything remotely similar to GNU linker scripts which we can use to move the section?
>>>>>
>>>>> Please also note that .rodata is used for Xcode-based toolchains already (in fact, all toolchains, and this is the issue), I'm not regressing anything. I just expected it to work fine as-is. This patch mainly fixed PE/COFF-based toolchains, which get both .rdata from the compiler and .rodata with RX permissions from NASM, because ".rodata" only has a semantic meaning for ELF and Mach-O outputs, but not for PE/COFF.
>>>>>
>>>>>> If you want something to be read only for Xcode/clang you are better off putting it in the __TEXT section [3]. The __TEXT section is read only and for X64 can not even contain relocations.
>>>>> Well, this kind of is an issue. We would need to introduce an arbitrary constraint on the relocation part that holds only for Xcode-based toolchains. Does the compiler emit an error when data in __TEXT,__const is targeted by a relocation?
>>>> The Xcode linker emits a fatal error on X64 for a relocation in the __TEXT section, everything needs to be RIP relative and the compiler does that for free. We generally only run into this for hand coded assembler and the fix is to use RIP relative addressing in the assembly.
>>> Good, thanks for confirming! Still, this would be a bit of an awkward constraints for Xcode only.
>>>
>> It is a physics problem we can’t fix, so I end up writing some patches to fix other peoples assembler from time to time. The CI building with Xcode helps with this a lot.
>
> (I think all open ends of the other threads are in here too, so let's drop them and go on only here?)
>
> Right, ok, thanks!
>
>>>>> Also see above regarding compiler-emitted __DATA,__const.
>>>>>
>>>> OK so the current nasm `SECTION .rodata`[1] gets mapped to __TEXT,__const[2] for Xcode clang, and this is done by nasm (I dumped the object file). GenFw and mtoc only run on executables, also they tend to be conservative as they need to keep the layout the same and the relative layout between sections the same, but in this case it is nasm placing the data in the text section.
>>>>
>>>> So what I’d like to see in the patch is to define RODATA_SECTION_NAME to match what is actually happening. So for XCODE that would be `__TEXT,__const` not `.rodata`.
>>> We can do that, but what to do about compiler-emitted __DATA,__const?
>> Sorry I don’t understand what RODATA_SECTION_NAME has to do with the compiler? I thought it was for nasm?
>
> Yes, it is for NASM. My point is, the actual issue is not that my macro uses __DATA,__const, but that __DATA,__const is not merged into .text, but into .data. Fixing the macro fixes where the NASM definitions go, but what about the C definitions? I cannot test it, as I said, because I don't have an Xcode machine, but let's say we have a stupid example like this:
>
> volatile UINT32 a;
> volatile UINT32 *CONST p = &a;
>
In this case p ends up in a __DATA__,__const section since &a requires a relocation.
> The value of p is constant, so it can be placed in a constant data section. p points to a global variable, so if the compiler does not manage to somehow turn this into relative addressing (let's assume it does not), it needs to generate a relocation. This means the compiler cannot put it in __TEXT,__const, so it has to put it in __DATA,__const (of course it could put it in other __DATA sections, but let's assume the compiler agrees this should be read-only). The very same issue will arise and no matter the choice of the compiler, this will end up in .data. Do you agree? Or do we have some guarantee that Apple Clang cannot emit __DATA,__const?
I don’t see your bigger point. The compiler is free to implement as it sees fit. Which section some code ends up in is more of an implementation detail for the compiler, and we can’t really depend on that?
>
>>>> We should double check what is happening for ELF on x86, ARM, RiskV, etc. and do the same thing. I assume all the tools that generate PE/COFF directly are good with .rodata?
>>> They are not, that is the whole point of the patch in its current shape. .rodata is valid for ELF and Mach-O, PE/COFF needs .rdata.
>>>
>>>> I think it is likely as simple as dumping the EFL object file in objdump or gdb for the given toolchain (like my Xcode example).
>>>>
>>>> TL;DR It looks to me like nasm does some SECTION translations under the hood to make code portable, and I’d like to make sure we capture those in the new NASM_RODATA_SECTION_NAME. If some one is doing a security review having NASM_RODATA_SECTION_NAME is going to imply that a .rodata section is being used by that specific toolchain, and I think that is much worse than the current “magic” behavior in nasm. We are much better off explaining what is really happening, since it is not very obvious.
>>> I feel like I'm too tired to get the point. Do you mean you want comments whenever this section name is used? Or comments in tools_def?
>>>
>> I think I’d settle for a more descriptive commit comment that better defines what the define means like I mentioned in the other mail.
>
> Hmm no, we can do that too, but in that case I really want comments in the code. tools_def is not really documented at all, maybe it is time to introduce an example comment so at least new things get commented? Maybe just the start of a macro list. Relying on "git blame" to figure out simple things is rather awful.
>
> One more thing from another thread: Yes, the new macro should refer to object file section naming. I want this patch to get object file sections proper and sound. From there on we can fix the linking stage to emit proper and sound executables in a later patch.
>
OK then please refactor the commit message to make it clear that this patch is to get the correct section in the object files, and work is still need to get this into executable images.
For Xcode you can make it __DATA__,__const since that is the closest thing to read only data and I think that is your intent.
GenFW is part of EDKII BaseTools and mtoc is part of the open source CCTOOLS project and both those tools would need to be modified to create a .rodata section in PE/COFF.
Thanks,
Andrew Fish
> Best regards,
> Marvin
>
>>
>> Thanks,
>>
>> Andrew Fish
>>
>>> Best regards,
>>> Marvin
>>>
>>>> [1] https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14 <https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14>
>>>>
>>>> [2] $otool -V -s __TEXT __constBuild/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>>>> Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
>>>> Contents of (__TEXT,__const) section
>>>> 0000001d 7f 03 80 1f 00 00
>>>>
>>>> $ otool -l Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>>>> Build/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
>>>> Load command 0
>>>> cmd LC_SEGMENT_64
>>>> cmdsize 232
>>>> segname
>>>> vmaddr 0x0000000000000000
>>>> vmsize 0x0000000000000026
>>>> fileoff 288
>>>> filesize 38
>>>> maxprot 0x00000007
>>>> initprot 0x00000007
>>>> nsects 2
>>>> flags 0x0
>>>> Section
>>>> sectname __text
>>>> segname __TEXT
>>>> addr 0x0000000000000000
>>>> size 0x000000000000001d
>>>> offset 288
>>>> align 2^0 (1)
>>>> reloff 328
>>>> nreloc 2
>>>> flags 0x80000500
>>>> reserved1 0
>>>> reserved2 0
>>>> Section
>>>> sectname __const
>>>> segname __TEXT
>>>> addr 0x000000000000001d
>>>> size 0x0000000000000006
>>>> offset 320
>>>> align 2^0 (1)
>>>> reloff 0
>>>> nreloc 0
>>>> flags 0x00000000
>>>> reserved1 0
>>>> reserved2 0
>>>> Load command 1
>>>> cmd LC_SYMTAB
>>>> cmdsize 24
>>>> symoff 344
>>>> nsyms 3
>>>> stroff 392
>>>> strsize 63
>>>>
>>>> Thanks,
>>>>
>>>> Andrew Fish
>>>>
>>>>
>>>>> Thanks for your notes and insight!
>>>>>
>>>>> Best regards,
>>>>> Marvin
>>>>>
>>>>>
>>>>> [1]
>>>>> "For compatibility with other Unix platforms, the following standard names are also supported:
>>>>> [...]
>>>>> .rodata = __DATA,__const data
>>>>> [...]
>>>>> If the .rodata section contains no relocations, it is instead put into the __TEXT,__const section unless this section has already been specified explicitly."
>>>>> https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html <https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html>
>>>>>
>>>>>> [1] otool -lh DxeCore.dll
>>>>>> ...
>>>>>> Load command 1
>>>>>> cmd LC_SEGMENT_64
>>>>>> cmdsize 312
>>>>>> segname __DATA
>>>>>> vmaddr 0x000000000002b000
>>>>>> vmsize 0x0000000000147000
>>>>>> fileoff 180224
>>>>>> filesize 8192
>>>>>> maxprot 0x00000003
>>>>>> initprot 0x00000003
>>>>>> nsects 3
>>>>>> flags 0x0
>>>>>> Section
>>>>>> sectname __const
>>>>>> segname __DATA
>>>>>> addr 0x000000000002b000
>>>>>> size 0x0000000000000718
>>>>>> offset 180224
>>>>>> align 2^4 (16)
>>>>>> reloff 0
>>>>>> nreloc 0
>>>>>> flags 0x00000000
>>>>>> reserved1 0
>>>>>> reserved2 0
>>>>>> Section
>>>>>> sectname __data
>>>>>> segname __DATA
>>>>>> addr 0x000000000002b720
>>>>>> size 0x00000000000014f0
>>>>>> offset 182048
>>>>>> align 2^4 (16)
>>>>>> reloff 0
>>>>>> nreloc 0
>>>>>> flags 0x00000000
>>>>>> reserved1 0
>>>>>> reserved2 0
>>>>>> Section
>>>>>> sectname __bss
>>>>>> segname __DATA
>>>>>> addr 0x000000000002cc10
>>>>>> size 0x0000000000144e11
>>>>>> offset 0
>>>>>> align 2^4 (16)
>>>>>> reloff 0
>>>>>> nreloc 0
>>>>>> flags 0x00000001
>>>>>> reserved1 0
>>>>>> reserved2 0
>>>>>> …
>>>>>>
>>>>>> [2] https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html>
>>>>>>
>>>>>> [3] otool more output…
>>>>>> Load command 0
>>>>>> cmd LC_SEGMENT_64
>>>>>> cmdsize 392
>>>>>> segname __TEXT
>>>>>> vmaddr 0x0000000000000240
>>>>>> vmsize 0x00000000000296c0
>>>>>> fileoff 1184
>>>>>> filesize 169664
>>>>>> maxprot 0x00000005
>>>>>> initprot 0x00000005
>>>>>> nsects 4
>>>>>> flags 0x0
>>>>>> Section
>>>>>> sectname __text
>>>>>> segname __TEXT
>>>>>> addr 0x0000000000000240
>>>>>> size 0x000000000002489f
>>>>>> offset 1184
>>>>>> align 2^3 (8)
>>>>>> reloff 0
>>>>>> nreloc 0
>>>>>> flags 0x80000400
>>>>>> reserved1 0
>>>>>> reserved2 0
>>>>>> Section
>>>>>> sectname __cstring
>>>>>> segname __TEXT
>>>>>> addr 0x0000000000024ae0
>>>>>> size 0x000000000000496d
>>>>>> offset 150848
>>>>>> align 2^4 (16)
>>>>>> reloff 0
>>>>>> nreloc 0
>>>>>> flags 0x00000002
>>>>>> reserved1 0
>>>>>> reserved2 0
>>>>>> Section
>>>>>> sectname __ustring
>>>>>> segname __TEXT
>>>>>> addr 0x000000000002944e
>>>>>> size 0x0000000000000048
>>>>>> offset 169646
>>>>>> align 2^1 (2)
>>>>>> reloff 0
>>>>>> nreloc 0
>>>>>> flags 0x00000000
>>>>>> reserved1 0
>>>>>> reserved2 0
>>>>>> Section
>>>>>> sectname __const
>>>>>> segname __TEXT
>>>>>> addr 0x00000000000294a0
>>>>>> size 0x0000000000000448
>>>>>> offset 169728
>>>>>> align 2^4 (16)
>>>>>> reloff 0
>>>>>> nreloc 0
>>>>>> flags 0x00000000
>>>>>> reserved1 0
>>>>>> reserved2 0
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Andrew Fish
>>>>>>
>>>>>>>
>>>>>>> DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
>>>>>>>
>>>>>>> @@ -3003,7 +3003,7 @@ RELEASE_XCODE5_X64_DLINK_FLAGS = -arch x86_64 -u _$(IMAGE_ENTRY_POINT) -e _
>>>>>>> DEBUG_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>>>>
>>>>>>> NOOPT_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>>>>
>>>>>>> RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64
>>>>>>>
>>>>>>> - *_XCODE5_X64_NASM_FLAGS = -f macho64
>>>>>>>
>>>>>>> + *_XCODE5_X64_NASM_FLAGS = -f macho64 -DRODATA_SECTION_NAME=.rodata
>>>>>>>
>>>>>>> *_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h
>>>>>>>
>>>>>>> *_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include $(MODULE_NAME)StrDefs.h
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> 2.31.1
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>
>>>
>>>
>>>
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 95661 bytes --]
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/2] SecurityPkg/DxeImageVerificationLib: Fix certificate lookup algorithm
2021-08-09 9:51 ` [PATCH v2 1/2] SecurityPkg/DxeImageVerificationLib: Fix certificate lookup algorithm Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 2/2] SecurityPkg/SecureBootConfigDxe: " Marvin Häuser
@ 2021-08-12 1:11 ` Min Xu
1 sibling, 0 replies; 42+ messages in thread
From: Min Xu @ 2021-08-12 1:11 UTC (permalink / raw)
To: devel@edk2.groups.io, mhaeuser@posteo.de
Cc: Yao, Jiewen, Wang, Jian J, Vitaly Cheptsov
On August 9, 2021 5:51 PM, Marvin Häuser wrote:
> The current certificate lookup code does not check the bounds of the
> authentication data before accessing it. Abort if the header cannot fit. Also,
> the lookup code aborts once the authetication data is smaller than an
> algorithm's OID size. As OIDs are variably-sized, this may cause unexpected
> authentication failure due to the early error-exit.
>
> Additionally move the two-byte encoding check out of the loop as the data is
> invariant.
>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Min Xu <min.m.xu@intel.com>
> Cc: Vitaly Cheptsov <vit9696@protonmail.com>
> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
> ---
> SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c | 43
> +++++++++++---------
> 1 file changed, 23 insertions(+), 20 deletions(-)
>
> diff --git
> a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
> b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
> index c48861cd6496..6615099baafb 100644
> --- a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
> +++ b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLi
> +++ b.c
> @@ -624,30 +624,33 @@ HashPeImageByType ( {
>
> UINT8 Index;
>
>
>
> + if (AuthDataSize < 32) {
>
> + return EFI_UNSUPPORTED;
>
> + }
>
> + //
>
> + // Check the Hash algorithm in PE/COFF Authenticode.
>
> + // According to PKCS#7 Definition:
>
> + // SignedData ::= SEQUENCE {
>
> + // version Version,
>
> + // digestAlgorithms DigestAlgorithmIdentifiers,
>
> + // contentInfo ContentInfo,
>
> + // .... }
>
> + // The DigestAlgorithmIdentifiers can be used to determine the hash
> algorithm in PE/COFF hashing
>
> + // This field has the fixed offset (+32) in final Authenticode ASN.1 data.
>
> + // Fixed offset (+32) is calculated based on two bytes of length encoding.
>
> + //
>
> + if ((*(AuthData + 1) & TWO_BYTE_ENCODE) != TWO_BYTE_ENCODE) {
>
> + //
>
> + // Only support two bytes of Long Form of Length Encoding.
>
> + //
>
> + return EFI_UNSUPPORTED;
>
> + }
>
> +
>
> for (Index = 0; Index < HASHALG_MAX; Index++) {
>
> - //
>
> - // Check the Hash algorithm in PE/COFF Authenticode.
>
> - // According to PKCS#7 Definition:
>
> - // SignedData ::= SEQUENCE {
>
> - // version Version,
>
> - // digestAlgorithms DigestAlgorithmIdentifiers,
>
> - // contentInfo ContentInfo,
>
> - // .... }
>
> - // The DigestAlgorithmIdentifiers can be used to determine the hash
> algorithm in PE/COFF hashing
>
> - // This field has the fixed offset (+32) in final Authenticode ASN.1 data.
>
> - // Fixed offset (+32) is calculated based on two bytes of length encoding.
>
> - //
>
> - if ((*(AuthData + 1) & TWO_BYTE_ENCODE) != TWO_BYTE_ENCODE) {
>
> - //
>
> - // Only support two bytes of Long Form of Length Encoding.
>
> - //
>
> + if (AuthDataSize - 32 < mHash[Index].OidLength) {
>
> continue;
>
> }
>
>
>
> - if (AuthDataSize < 32 + mHash[Index].OidLength) {
>
> - return EFI_UNSUPPORTED;
>
> - }
>
> -
>
> if (CompareMem (AuthData + 32, mHash[Index].OidValue,
> mHash[Index].OidLength) == 0) {
>
> break;
>
> }
>
> --
> 2.31.1
Reviewed-by: Min Xu <min.m.xu@intel.com>
Thanks!
Xu, Min
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 2/2] SecurityPkg/SecureBootConfigDxe: Fix certificate lookup algorithm
2021-08-09 9:51 ` [PATCH v2 2/2] SecurityPkg/SecureBootConfigDxe: " Marvin Häuser
@ 2021-08-12 1:12 ` Min Xu
0 siblings, 0 replies; 42+ messages in thread
From: Min Xu @ 2021-08-12 1:12 UTC (permalink / raw)
To: devel@edk2.groups.io, mhaeuser@posteo.de
Cc: Yao, Jiewen, Wang, Jian J, Vitaly Cheptsov
On August 9, 2021 5:51 PM, Marvin Häuser wrote:
> The current certificate lookup code does not check the bounds of the
> authentication data before accessing it. Abort if the header cannot fit, and
> proceed to the next hashing algortihm if the OID of the current one exceeds the
> authentication data bounds.
>
> Additionally move the two-byte encoding check out of the loop as the data is
> invariant.
>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Min Xu <min.m.xu@intel.com>
> Cc: Vitaly Cheptsov <vit9696@protonmail.com>
> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
> ---
>
> SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigIm
> pl.c | 45 ++++++++++++--------
> 1 file changed, 28 insertions(+), 17 deletions(-)
>
> diff --git
> a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigI
> mpl.c
> b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigI
> mpl.c
> index 65a8188d6d03..fd7629f61862 100644
> ---
> a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigI
> mpl.c
> +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootCo
> +++ nfigImpl.c
> @@ -1969,30 +1969,41 @@ HashPeImageByType ( {
>
> UINT8 Index;
>
> WIN_CERTIFICATE_EFI_PKCS *PkcsCertData;
>
> + UINT32 AuthDataSize;
>
>
>
> PkcsCertData = (WIN_CERTIFICATE_EFI_PKCS *) (mImageBase + mSecDataDir-
> >Offset);
>
> + if (PkcsCertData->Hdr.dwLength <= sizeof (PkcsCertData->Hdr)) {
>
> + return EFI_UNSUPPORTED;
>
> + }
>
> +
>
> + AuthDataSize = PkcsCertData->Hdr.dwLength - sizeof
> + (PkcsCertData->Hdr);
>
> + if (AuthDataSize < 32) {
>
> + return EFI_UNSUPPORTED;
>
> + }
>
> + //
>
> + // Check the Hash algorithm in PE/COFF Authenticode.
>
> + // According to PKCS#7 Definition:
>
> + // SignedData ::= SEQUENCE {
>
> + // version Version,
>
> + // digestAlgorithms DigestAlgorithmIdentifiers,
>
> + // contentInfo ContentInfo,
>
> + // .... }
>
> + // The DigestAlgorithmIdentifiers can be used to determine the hash
> algorithm in PE/COFF hashing
>
> + // This field has the fixed offset (+32) in final Authenticode ASN.1 data.
>
> + // Fixed offset (+32) is calculated based on two bytes of length encoding.
>
> + //
>
> + if ((*(PkcsCertData->CertData + 1) & TWO_BYTE_ENCODE) !=
> + TWO_BYTE_ENCODE) {
>
> + //
>
> + // Only support two bytes of Long Form of Length Encoding.
>
> + //
>
> + return EFI_UNSUPPORTED;
>
> + }
>
>
>
> for (Index = 0; Index < HASHALG_MAX; Index++) {
>
> - //
>
> - // Check the Hash algorithm in PE/COFF Authenticode.
>
> - // According to PKCS#7 Definition:
>
> - // SignedData ::= SEQUENCE {
>
> - // version Version,
>
> - // digestAlgorithms DigestAlgorithmIdentifiers,
>
> - // contentInfo ContentInfo,
>
> - // .... }
>
> - // The DigestAlgorithmIdentifiers can be used to determine the hash
> algorithm in PE/COFF hashing
>
> - // This field has the fixed offset (+32) in final Authenticode ASN.1 data.
>
> - // Fixed offset (+32) is calculated based on two bytes of length encoding.
>
> - //
>
> - if ((*(PkcsCertData->CertData + 1) & TWO_BYTE_ENCODE) !=
> TWO_BYTE_ENCODE) {
>
> - //
>
> - // Only support two bytes of Long Form of Length Encoding.
>
> - //
>
> + if (AuthDataSize - 32 < mHash[Index].OidLength) {
>
> continue;
>
> }
>
>
>
> - //
>
> if (CompareMem (PkcsCertData->CertData + 32, mHash[Index].OidValue,
> mHash[Index].OidLength) == 0) {
>
> break;
>
> }
>
> --
> 2.31.1
Reviewed-by: Min Xu <min.m.xu@intel.com>
Thanks!
Xu, Min
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain
2021-08-11 17:19 ` Andrew Fish
@ 2021-08-12 7:26 ` Marvin Häuser
2021-08-12 20:25 ` Marvin Häuser
` (2 more replies)
0 siblings, 3 replies; 42+ messages in thread
From: Marvin Häuser @ 2021-08-12 7:26 UTC (permalink / raw)
To: Andrew Fish, edk2-devel-groups-io
Cc: Bob Feng, Liming Gao, Yuwei Chen, Vitaly Cheptsov
On 11/08/2021 19:19, Andrew Fish wrote:
>
>
>> On Aug 11, 2021, at 1:11 AM, Marvin Häuser <mhaeuser@posteo.de
>> <mailto:mhaeuser@posteo.de>> wrote:
>>
>> On 10/08/2021 23:58, Andrew Fish wrote:
>>>
>>>> On Aug 10, 2021, at 2:30 PM, Marvin Häuser <mhaeuser@posteo.de
>>>> <mailto:mhaeuser@posteo.de>> wrote:
>>>>
>>>> On 10/08/2021 21:35, Andrew Fish via groups.io <http://groups.io>
>>>> wrote:
>>>>>
>>>>>> On Aug 10, 2021, at 1:27 AM, Marvin Häuser <mhaeuser@posteo.de
>>>>>> <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de
>>>>>> <mailto:mhaeuser@posteo.de>>> wrote:
>>>>>>
>>>>>> On 10/08/2021 06:19, Andrew Fish via groups.io <http://groups.io>
>>>>>> <http://groups.io <http://groups.io>> wrote:
>>>>>>>
>>>>>>>> On Aug 9, 2021, at 2:51 AM, Marvin Häuser <mhaeuser@posteo.de
>>>>>>>> <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de
>>>>>>>> <mailto:mhaeuser@posteo.de>> <mailto:mhaeuser@posteo.de
>>>>>>>> <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de
>>>>>>>> <mailto:mhaeuser@posteo.de>>>> wrote:
>>>>>>>>
>>>>>>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3318
>>>>>>>> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>
>>>>>>>> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318
>>>>>>>> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>>
>>>>>>>> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318
>>>>>>>> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>
>>>>>>>> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318
>>>>>>>> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>>>
>>>>>>>>
>>>>>>>> Different toolchains of the EDK II build system may generate ELF or
>>>>>>>> Mach-O files, which use the ".rodata" naming convention, or PE/COFF
>>>>>>>> files, which use the ".rdata" naming convention. Section
>>>>>>>> permissions
>>>>>>>> are chosen based on this name per file format by NASM. To harden
>>>>>>>> image permission security, and to save space by avoiding both
>>>>>>>> ".rdata" and ".rodata" sections being emitted, expose the
>>>>>>>> appropriate
>>>>>>>> name as a preprocessor constant.
>>>>>>>>
>>>>>>>> Cc: Bob Feng <bob.c.feng@intel.com
>>>>>>>> <mailto:bob.c.feng@intel.com> <mailto:bob.c.feng@intel.com
>>>>>>>> <mailto:bob.c.feng@intel.com>> <mailto:bob.c.feng@intel.com
>>>>>>>> <mailto:bob.c.feng@intel.com> <mailto:bob.c.feng@intel.com
>>>>>>>> <mailto:bob.c.feng@intel.com>>>>
>>>>>>>> Cc: Liming Gao <gaoliming@byosoft.com.cn
>>>>>>>> <mailto:gaoliming@byosoft.com.cn>
>>>>>>>> <mailto:gaoliming@byosoft.com.cn
>>>>>>>> <mailto:gaoliming@byosoft.com.cn>>
>>>>>>>> <mailto:gaoliming@byosoft.com.cn
>>>>>>>> <mailto:gaoliming@byosoft.com.cn>
>>>>>>>> <mailto:gaoliming@byosoft.com.cn
>>>>>>>> <mailto:gaoliming@byosoft.com.cn>>>>
>>>>>>>> Cc: Yuwei Chen <yuwei.chen@intel.com
>>>>>>>> <mailto:yuwei.chen@intel.com> <mailto:yuwei.chen@intel.com
>>>>>>>> <mailto:yuwei.chen@intel.com>> <mailto:yuwei.chen@intel.com
>>>>>>>> <mailto:yuwei.chen@intel.com> <mailto:yuwei.chen@intel.com
>>>>>>>> <mailto:yuwei.chen@intel.com>>>>
>>>>>>>> Cc: Vitaly Cheptsov <vit9696@protonmail.com
>>>>>>>> <mailto:vit9696@protonmail.com> <mailto:vit9696@protonmail.com
>>>>>>>> <mailto:vit9696@protonmail.com>> <mailto:vit9696@protonmail.com
>>>>>>>> <mailto:vit9696@protonmail.com> <mailto:vit9696@protonmail.com
>>>>>>>> <mailto:vit9696@protonmail.com>>>>
>>>>>>>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de
>>>>>>>> <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de
>>>>>>>> <mailto:mhaeuser@posteo.de>> <mailto:mhaeuser@posteo.de
>>>>>>>> <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de
>>>>>>>> <mailto:mhaeuser@posteo.de>>>>
>>>>>>>> ---
>>>>>>>> BaseTools/Conf/tools_def.template | 172 ++++++++++----------
>>>>>>>> 1 file changed, 86 insertions(+), 86 deletions(-)
>>>>>>>>
>>>>>>>> diff --git a/BaseTools/Conf/tools_def.template
>>>>>>>> b/BaseTools/Conf/tools_def.template
>>>>>>>> index 2e6b382ab623..84d464916c4d 100755
>>>>>>>> --- a/BaseTools/Conf/tools_def.template
>>>>>>>> +++ b/BaseTools/Conf/tools_def.template
>>>>>>>> @@ -463,9 +463,9 @@ NOOPT_VS2008_IA32_CC_FLAGS = /nologo
>>>>>>>> /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>> RELEASE_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>
>>>>>>>> -NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -495,9 +495,9 @@ NOOPT_VS2008_X64_CC_FLAGS = /nologo
>>>>>>>> /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>> RELEASE_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>
>>>>>>>> -NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -574,9 +574,9 @@ NOOPT_VS2008x86_IA32_CC_FLAGS =
>>>>>>>> /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>> RELEASE_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>
>>>>>>>> -NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -605,9 +605,9 @@ NOOPT_VS2008x86_X64_CC_FLAGS =
>>>>>>>> /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>> RELEASE_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>
>>>>>>>> -NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -688,9 +688,9 @@ NOOPT_VS2010_IA32_CC_FLAGS = /nologo
>>>>>>>> /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>> RELEASE_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>
>>>>>>>> -NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -720,9 +720,9 @@ NOOPT_VS2010_X64_CC_FLAGS = /nologo
>>>>>>>> /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>> RELEASE_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>
>>>>>>>> -NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -799,9 +799,9 @@ NOOPT_VS2010x86_IA32_CC_FLAGS =
>>>>>>>> /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>> RELEASE_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>
>>>>>>>> -NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -831,9 +831,9 @@ NOOPT_VS2010x86_X64_CC_FLAGS =
>>>>>>>> /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>> RELEASE_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>
>>>>>>>> -NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -913,9 +913,9 @@ NOOPT_VS2012_IA32_CC_FLAGS = /nologo
>>>>>>>> /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>>> RELEASE_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>
>>>>>>>> -NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -945,9 +945,9 @@ NOOPT_VS2012_X64_CC_FLAGS = /nologo
>>>>>>>> /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>> RELEASE_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>
>>>>>>>> -NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -1024,9 +1024,9 @@ NOOPT_VS2012x86_IA32_CC_FLAGS =
>>>>>>>> /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>>> RELEASE_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>
>>>>>>>> -NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -1056,9 +1056,9 @@ NOOPT_VS2012x86_X64_CC_FLAGS =
>>>>>>>> /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>> RELEASE_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>
>>>>>>>> -NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -1138,9 +1138,9 @@ NOOPT_VS2013_IA32_CC_FLAGS =
>>>>>>>> /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>>> RELEASE_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>
>>>>>>>> -NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -1170,9 +1170,9 @@ NOOPT_VS2013_X64_CC_FLAGS = /nologo
>>>>>>>> /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>> RELEASE_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>
>>>>>>>> -NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -1249,9 +1249,9 @@ NOOPT_VS2013x86_IA32_CC_FLAGS =
>>>>>>>> /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>>> RELEASE_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>
>>>>>>>> -NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -1281,9 +1281,9 @@ NOOPT_VS2013x86_X64_CC_FLAGS =
>>>>>>>> /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>> RELEASE_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>
>>>>>>>> -NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -1364,9 +1364,9 @@ NOOPT_VS2015_IA32_CC_FLAGS =
>>>>>>>> /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>>> RELEASE_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>
>>>>>>>> -NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -1396,9 +1396,9 @@ NOOPT_VS2015_X64_CC_FLAGS = /nologo
>>>>>>>> /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>> RELEASE_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>
>>>>>>>> -NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -1476,9 +1476,9 @@ NOOPT_VS2015x86_IA32_CC_FLAGS =
>>>>>>>> /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>>> RELEASE_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx
>>>>>>>> /coff /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>
>>>>>>>> -NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -1508,9 +1508,9 @@ NOOPT_VS2015x86_X64_CC_FLAGS =
>>>>>>>> /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>> RELEASE_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>
>>>>>>>> -NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -1586,9 +1586,9 @@ NOOPT_VS2017_IA32_CC_FLAGS = /nologo
>>>>>>>> /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>>>>>> RELEASE_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>>>>>> /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>
>>>>>>>> -NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -1616,9 +1616,9 @@ NOOPT_VS2017_X64_CC_FLAGS = /nologo
>>>>>>>> /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>> RELEASE_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>
>>>>>>>> -NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10
>>>>>>>> /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64
>>>>>>>> /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>>>>>>>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER
>>>>>>>> /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -1744,9 +1744,9 @@ NOOPT_VS2019_IA32_CC_FLAGS = /nologo
>>>>>>>> /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>>>>>> RELEASE_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff
>>>>>>>> /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>
>>>>>>>> -NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -1774,9 +1774,9 @@ NOOPT_VS2019_X64_CC_FLAGS = /nologo
>>>>>>>> /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>> RELEASE_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>
>>>>>>>> NOOPT_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>
>>>>>>>> -RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>
>>>>>>>> -NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>
>>>>>>>> + DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> +NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32
>>>>>>>> /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL
>>>>>>>> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
>>>>>>>> /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>
>>>>>>>> RELEASE_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
>>>>>>>> /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10
>>>>>>>> /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64
>>>>>>>> /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
>>>>>>>> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER
>>>>>>>> /MERGE:.rdata=.data
>>>>>>>>
>>>>>>>> @@ -2030,7 +2030,7 @@ DEFINE GCC_PP_FLAGS
>>>>>>>> = -E -x assembler-with-cpp -include A
>>>>>>>> *_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
>>>>>>>>
>>>>>>>> *_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>>
>>>>>>>> *_GCC48_IA32_OBJCOPY_FLAGS =
>>>>>>>>
>>>>>>>> -*_GCC48_IA32_NASM_FLAGS = -f elf32
>>>>>>>>
>>>>>>>> +*_GCC48_IA32_NASM_FLAGS = -f elf32
>>>>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
>>>>>>>>
>>>>>>>> RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS)
>>>>>>>> -Os -Wno-unused-but-set-variable
>>>>>>>>
>>>>>>>> @@ -2058,7 +2058,7 @@ RELEASE_GCC48_IA32_CC_FLAGS =
>>>>>>>> DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>>>>>> *_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
>>>>>>>>
>>>>>>>> *_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>>
>>>>>>>> *_GCC48_X64_OBJCOPY_FLAGS =
>>>>>>>>
>>>>>>>> -*_GCC48_X64_NASM_FLAGS = -f elf64
>>>>>>>>
>>>>>>>> +*_GCC48_X64_NASM_FLAGS = -f elf64
>>>>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
>>>>>>>>
>>>>>>>> RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
>>>>>>>> -Wno-unused-but-set-variable
>>>>>>>>
>>>>>>>> @@ -2170,7 +2170,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS =
>>>>>>>> DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
>>>>>>>> *_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
>>>>>>>>
>>>>>>>> *_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>>
>>>>>>>> *_GCC49_IA32_OBJCOPY_FLAGS =
>>>>>>>>
>>>>>>>> -*_GCC49_IA32_NASM_FLAGS = -f elf32
>>>>>>>>
>>>>>>>> +*_GCC49_IA32_NASM_FLAGS = -f elf32
>>>>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
>>>>>>>>
>>>>>>>> RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS)
>>>>>>>> -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>>>>>
>>>>>>>> @@ -2198,7 +2198,7 @@ RELEASE_GCC49_IA32_CC_FLAGS =
>>>>>>>> DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>>>>>> *_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
>>>>>>>>
>>>>>>>> *_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>>
>>>>>>>> *_GCC49_X64_OBJCOPY_FLAGS =
>>>>>>>>
>>>>>>>> -*_GCC49_X64_NASM_FLAGS = -f elf64
>>>>>>>>
>>>>>>>> +*_GCC49_X64_NASM_FLAGS = -f elf64
>>>>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
>>>>>>>>
>>>>>>>> RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
>>>>>>>> -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>>>>>
>>>>>>>> @@ -2316,7 +2316,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z
>>>>>>>> common-page-size=0x20
>>>>>>>> *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS)
>>>>>>>> -no-pie
>>>>>>>>
>>>>>>>> *_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>>
>>>>>>>> *_GCC5_IA32_OBJCOPY_FLAGS =
>>>>>>>>
>>>>>>>> -*_GCC5_IA32_NASM_FLAGS = -f elf32
>>>>>>>>
>>>>>>>> +*_GCC5_IA32_NASM_FLAGS = -f elf32
>>>>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS)
>>>>>>>> -flto -Os
>>>>>>>>
>>>>>>>> DEBUG_GCC5_IA32_DLINK_FLAGS =
>>>>>>>> DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os
>>>>>>>> -Wl,-m,elf_i386,--oformat=elf32-i386
>>>>>>>>
>>>>>>>> @@ -2348,7 +2348,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS =
>>>>>>>> DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,
>>>>>>>> *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
>>>>>>>>
>>>>>>>> *_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>>
>>>>>>>> *_GCC5_X64_OBJCOPY_FLAGS =
>>>>>>>>
>>>>>>>> -*_GCC5_X64_NASM_FLAGS = -f elf64
>>>>>>>>
>>>>>>>> +*_GCC5_X64_NASM_FLAGS = -f elf64
>>>>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto
>>>>>>>> -DUSING_LTO -Os
>>>>>>>>
>>>>>>>> DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS)
>>>>>>>> -flto -Os
>>>>>>>>
>>>>>>>> @@ -2589,7 +2589,7 @@ DEFINE CLANG38_ALL_CC_FLAGS =
>>>>>>>> DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNIN
>>>>>>>> *_CLANG38_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32
>>>>>>>> -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>>>>>
>>>>>>>> *_CLANG38_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>>
>>>>>>>> *_CLANG38_IA32_OBJCOPY_FLAGS =
>>>>>>>>
>>>>>>>> -*_CLANG38_IA32_NASM_FLAGS = -f elf32
>>>>>>>>
>>>>>>>> +*_CLANG38_IA32_NASM_FLAGS = -f elf32
>>>>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>>>>
>>>>>>>> *_CLANG38_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS)
>>>>>>>> DEF(CLANG38_IA32_TARGET)
>>>>>>>>
>>>>>>>> *_CLANG38_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>>>>>>>> DEF(CLANG38_IA32_TARGET)
>>>>>>>>
>>>>>>>> *_CLANG38_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>>>>>>>> DEF(CLANG38_IA32_TARGET)
>>>>>>>>
>>>>>>>> @@ -2626,7 +2626,7 @@ NOOPT_CLANG38_IA32_DLINK2_FLAGS =
>>>>>>>> DEF(GCC5_IA32_DLINK2_FLAGS) -O0
>>>>>>>> *_CLANG38_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64
>>>>>>>> DEF(CLANG38_X64_TARGET)
>>>>>>>>
>>>>>>>> *_CLANG38_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>>
>>>>>>>> *_CLANG38_X64_OBJCOPY_FLAGS =
>>>>>>>>
>>>>>>>> -*_CLANG38_X64_NASM_FLAGS = -f elf64
>>>>>>>>
>>>>>>>> +*_CLANG38_X64_NASM_FLAGS = -f elf64
>>>>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>>>>
>>>>>>>> *_CLANG38_X64_PP_FLAGS = DEF(GCC_PP_FLAGS)
>>>>>>>> DEF(CLANG38_X64_TARGET)
>>>>>>>>
>>>>>>>> *_CLANG38_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>>>>>>>> DEF(CLANG38_X64_TARGET)
>>>>>>>>
>>>>>>>> *_CLANG38_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>>>>>>>> DEF(CLANG38_X64_TARGET)
>>>>>>>>
>>>>>>>> @@ -2777,7 +2777,7 @@ DEFINE CLANGPDB_ALL_CC_FLAGS =
>>>>>>>> DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARN
>>>>>>>> *_CLANGPDB_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
>>>>>>>> -m32 -fno-lto DEF(CLANGPDB_IA32_TARGET)
>>>>>>>>
>>>>>>>> *_CLANGPDB_IA32_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m32
>>>>>>>> -march=i386 DEF(CLANGPDB_IA32_TARGET)
>>>>>>>>
>>>>>>>> *_CLANGPDB_IA32_OBJCOPY_FLAGS =
>>>>>>>>
>>>>>>>> -*_CLANGPDB_IA32_NASM_FLAGS = -f win32
>>>>>>>>
>>>>>>>> +*_CLANGPDB_IA32_NASM_FLAGS = -f win32
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> *_CLANGPDB_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS)
>>>>>>>> DEF(CLANGPDB_IA32_TARGET)
>>>>>>>>
>>>>>>>> *_CLANGPDB_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>>>>>>>> DEF(CLANGPDB_IA32_TARGET)
>>>>>>>>
>>>>>>>> *_CLANGPDB_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>>>>>>>> DEF(CLANGPDB_IA32_TARGET)
>>>>>>>>
>>>>>>>> @@ -2811,7 +2811,7 @@ NOOPT_CLANGPDB_IA32_DLINK2_FLAGS =
>>>>>>>> *_CLANGPDB_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64
>>>>>>>> -fno-lto DEF(CLANGPDB_X64_TARGET)
>>>>>>>>
>>>>>>>> *_CLANGPDB_X64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m64
>>>>>>>> DEF(CLANGPDB_X64_TARGET)
>>>>>>>>
>>>>>>>> *_CLANGPDB_X64_OBJCOPY_FLAGS =
>>>>>>>>
>>>>>>>> -*_CLANGPDB_X64_NASM_FLAGS = -f win64
>>>>>>>>
>>>>>>>> +*_CLANGPDB_X64_NASM_FLAGS = -f win64
>>>>>>>> -DRODATA_SECTION_NAME=.rdata
>>>>>>>>
>>>>>>>> *_CLANGPDB_X64_PP_FLAGS = DEF(GCC_PP_FLAGS)
>>>>>>>> DEF(CLANGPDB_X64_TARGET)
>>>>>>>>
>>>>>>>> *_CLANGPDB_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>>>>>>>> DEF(CLANGPDB_X64_TARGET)
>>>>>>>>
>>>>>>>> *_CLANGPDB_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>>>>>>>> DEF(CLANGPDB_X64_TARGET)
>>>>>>>>
>>>>>>>> @@ -2878,7 +2878,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS
>>>>>>>> = -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
>>>>>>>> *_CLANGDWARF_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS)
>>>>>>>> -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>>>>>
>>>>>>>> *_CLANGDWARF_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>>
>>>>>>>> *_CLANGDWARF_IA32_OBJCOPY_FLAGS =
>>>>>>>>
>>>>>>>> -*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32
>>>>>>>>
>>>>>>>> +*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32
>>>>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>>>>
>>>>>>>> *_CLANGDWARF_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS)
>>>>>>>> DEF(CLANG38_IA32_TARGET)
>>>>>>>>
>>>>>>>> *_CLANGDWARF_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>>>>>>>> DEF(CLANG38_IA32_TARGET)
>>>>>>>>
>>>>>>>> *_CLANGDWARF_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>>>>>>>> DEF(CLANG38_IA32_TARGET)
>>>>>>>>
>>>>>>>> @@ -2914,7 +2914,7 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS =
>>>>>>>> DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -
>>>>>>>> *_CLANGDWARF_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS)
>>>>>>>> -m64 DEF(CLANG38_X64_TARGET)
>>>>>>>>
>>>>>>>> *_CLANGDWARF_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>>
>>>>>>>> *_CLANGDWARF_X64_OBJCOPY_FLAGS =
>>>>>>>>
>>>>>>>> -*_CLANGDWARF_X64_NASM_FLAGS = -f elf64
>>>>>>>>
>>>>>>>> +*_CLANGDWARF_X64_NASM_FLAGS = -f elf64
>>>>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>>>>
>>>>>>>> *_CLANGDWARF_X64_PP_FLAGS = DEF(GCC_PP_FLAGS)
>>>>>>>> DEF(CLANG38_X64_TARGET)
>>>>>>>>
>>>>>>>> *_CLANGDWARF_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
>>>>>>>> DEF(CLANG38_X64_TARGET)
>>>>>>>>
>>>>>>>> *_CLANGDWARF_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
>>>>>>>> DEF(CLANG38_X64_TARGET)
>>>>>>>>
>>>>>>>> @@ -2985,7 +2985,7 @@ RELEASE_XCODE5_IA32_DLINK_FLAGS =
>>>>>>>> -arch i386 -u _$(IMAGE_ENTRY_POINT) -e _$
>>>>>>>> DEBUG_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>>>>>
>>>>>>>> NOOPT_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>>>>>
>>>>>>>> RELEASE_XCODE5_IA32_ASM_FLAGS = -arch i386
>>>>>>>>
>>>>>>>> - *_XCODE5_IA32_NASM_FLAGS = -f macho32
>>>>>>>>
>>>>>>>> + *_XCODE5_IA32_NASM_FLAGS = -f macho32
>>>>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> An EFI Mach-O file does not contain a .rodata section. A Mach-O
>>>>>>> contains a __DATA segment that is broken up into sections. For a
>>>>>>> typical EFI image there are __const, __data, __bss sections in
>>>>>>> the __DATA segment [1].
>>>>>> Yes, and ".rodata" is almost a synonym for "__DATA,__const", with
>>>>>> a small exception [1]. Maybe it'd be clearer if the macro was
>>>>>> renamed to "NASM_RODATA_SECTION_NAME", to indicate this is not
>>>>>> just a "raw" name, but NASM gives it a semantic meaning?
>>>>>>
>>>>>>> The mtoc [2] tool used to convert mach-O to PE/COFF converts the
>>>>>>> entire __DATA segment (__const, __data, and __bss) into the
>>>>>>> .data section. Thus adding any kind of new data section is a
>>>>>>> no-op at best.
>>>>>> This is a part I missed, because I do not have an Xcode toolchain
>>>>>> at hand, so thanks for investigating. However this, in my
>>>>>> opinion, is a flaw with Mach-O/mtoc and not with my patch. It
>>>>>> seems like the only difference between __TEXT,__const and
>>>>>> __DATA,__const is whether the data is targeted by a relocation or
>>>>>> not. Such a concept does not exist for PE/COFF (and I think not
>>>>>> even for ELF, but I'm not too familiar with it), thus the logical
>>>>>> PE/COFF section __DATA,__const should be merged into is .rdata
>>>>>> (and .rdata may or may not be merged into .text in an earlier
>>>>>> step, I assume transitivity). I could change the macro definition
>>>>>> to explicitly declare __TEXT,__const, but that would still put
>>>>>> the compiler-emitted data in the wrong section. Does Xcode
>>>>>> provide anything remotely similar to GNU linker scripts which we
>>>>>> can use to move the section?
>>>>>>
>>>>>> Please also note that .rodata is used for Xcode-based toolchains
>>>>>> already (in fact, all toolchains, and this is the issue), I'm not
>>>>>> regressing anything. I just expected it to work fine as-is. This
>>>>>> patch mainly fixed PE/COFF-based toolchains, which get both
>>>>>> .rdata from the compiler and .rodata with RX permissions from
>>>>>> NASM, because ".rodata" only has a semantic meaning for ELF and
>>>>>> Mach-O outputs, but not for PE/COFF.
>>>>>>
>>>>>>> If you want something to be read only for Xcode/clang you are
>>>>>>> better off putting it in the __TEXT section [3]. The __TEXT
>>>>>>> section is read only and for X64 can not even contain relocations.
>>>>>> Well, this kind of is an issue. We would need to introduce an
>>>>>> arbitrary constraint on the relocation part that holds only for
>>>>>> Xcode-based toolchains. Does the compiler emit an error when data
>>>>>> in __TEXT,__const is targeted by a relocation?
>>>>> The Xcode linker emits a fatal error on X64 for a relocation in
>>>>> the __TEXT section, everything needs to be RIP relative and the
>>>>> compiler does that for free. We generally only run into this for
>>>>> hand coded assembler and the fix is to use RIP relative addressing
>>>>> in the assembly.
>>>> Good, thanks for confirming! Still, this would be a bit of an
>>>> awkward constraints for Xcode only.
>>>>
>>> It is a physics problem we can’t fix, so I end up writing some
>>> patches to fix other peoples assembler from time to time. The CI
>>> building with Xcode helps with this a lot.
>>
>> (I think all open ends of the other threads are in here too, so let's
>> drop them and go on only here?)
>>
>> Right, ok, thanks!
>>
>>>>>> Also see above regarding compiler-emitted __DATA,__const.
>>>>>>
>>>>> OK so the current nasm `SECTION .rodata`[1] gets mapped to
>>>>> __TEXT,__const[2] for Xcode clang, and this is done by nasm (I
>>>>> dumped the object file). GenFw and mtoc only run on executables,
>>>>> also they tend to be conservative as they need to keep the layout
>>>>> the same and the relative layout between sections the same, but in
>>>>> this case it is nasm placing the data in the text section.
>>>>>
>>>>> So what I’d like to see in the patch is to define
>>>>> RODATA_SECTION_NAME to match what is actually happening. So for
>>>>> XCODE that would be `__TEXT,__const` not `.rodata`.
>>>> We can do that, but what to do about compiler-emitted __DATA,__const?
>>> Sorry I don’t understand what RODATA_SECTION_NAME has to do with the
>>> compiler? I thought it was for nasm?
>>
>> Yes, it is for NASM. My point is, the actual issue is not that my
>> macro uses __DATA,__const, but that __DATA,__const is not merged into
>> .text, but into .data. Fixing the macro fixes where the NASM
>> definitions go, but what about the C definitions? I cannot test it,
>> as I said, because I don't have an Xcode machine, but let's say we
>> have a stupid example like this:
>>
>> volatile UINT32 a;
>> volatile UINT32 *CONST p = &a;
>>
>
> In this case p ends up in a __DATA__,__const section since &a requires
> a relocation.
OK, good, thanks!
>
>
>> The value of p is constant, so it can be placed in a constant data
>> section. p points to a global variable, so if the compiler does not
>> manage to somehow turn this into relative addressing (let's assume it
>> does not), it needs to generate a relocation. This means the compiler
>> cannot put it in __TEXT,__const, so it has to put it in
>> __DATA,__const (of course it could put it in other __DATA sections,
>> but let's assume the compiler agrees this should be read-only). The
>> very same issue will arise and no matter the choice of the compiler,
>> this will end up in .data. Do you agree? Or do we have some guarantee
>> that Apple Clang cannot emit __DATA,__const?
>
> I don’t see your bigger point. The compiler is free to implement as it
> sees fit. Which section some code ends up in is more of an
> implementation detail for the compiler, and we can’t really depend on
> that?
Your point, rightfully, was that things that we request to be read-only
(may) end up being read-write. My issue is that, if the compiler
requests this pointer to be read-only (it may not, but also it may), our
PE executable does not honour it either. __DATA,__const is a section for
constant data, and we put it into a read-write section. The bigger point
is, whenever the compile stack wants something read-only (be that NASM
or be that Apple Clang, anything really), we should actually ensure it
is read-only. I can do that for only NASM by forcing the __TEXT,__const
section name (at the cost of prohibiting relocs), but I do not know how
to do it for Apple Clang. At worst we could take a hacked-ish solution,
where all Mach-O segments are converted to PE/COFF sections - with the
exception of the __DATA,__const section, which, if aligned on a segment
alignment boundary, can be inserted between the two other parts .data is
split into. I read in the XNU source that the ARM protection code does
something roughly like this [1], but I'm really far from well-versed in
the deep details of macOS.
Sorry for this not being "integrated" in above text, but I found two
more things while looking for citation 1.
1) Mach-O sections can be renamed, including the preceding segment name
[2]. According to the very next line, the example actually creates a new
segment. Does it allow merging into another, existing segment? What if I
did something like:
-Wl,-rename_section,__DATA,__const,__TEXT,__const2
or even
-Wl,-rename_section,__DATA,__const,__TEXT,__const
i.e. can it merge two sections together? if __DATA,__const had data with
relocs, would the renaming trigger the "no relocs" error of __TEXT, or
does that happen before section renaming? Any chance it can be turned off?
1.1) Actually, for the standalone .rodata section, we can just rename it
to __DATA_CONST,__const, as I have seen elsewhere in XNU. No hacked-ish
solution needed. :)
2) We actually can force the compiler to put data in the constant data
segment [3]. This is of course not used in EDK II, and probably neither
portable nor necessary, but an interesting detail. I really think we
should honour it either way.
I will likely try to get my hands on some sort of Apple development
environment soon, but I cannot promise much right now. I think it really
is better if I can test through all toolchains myself. If you release
Apple Clang for Linux, I also won't complain of course. :)
>
>>
>>>>> We should double check what is happening for ELF on x86, ARM,
>>>>> RiskV, etc. and do the same thing. I assume all the tools that
>>>>> generate PE/COFF directly are good with .rodata?
>>>> They are not, that is the whole point of the patch in its current
>>>> shape. .rodata is valid for ELF and Mach-O, PE/COFF needs .rdata.
>>>>
>>>>> I think it is likely as simple as dumping the EFL object file in
>>>>> objdump or gdb for the given toolchain (like my Xcode example).
>>>>>
>>>>> TL;DR It looks to me like nasm does some SECTION translations
>>>>> under the hood to make code portable, and I’d like to make sure we
>>>>> capture those in the new NASM_RODATA_SECTION_NAME. If some one is
>>>>> doing a security review having NASM_RODATA_SECTION_NAME is going
>>>>> to imply that a .rodata section is being used by that specific
>>>>> toolchain, and I think that is much worse than the current “magic”
>>>>> behavior in nasm. We are much better off explaining what is really
>>>>> happening, since it is not very obvious.
>>>> I feel like I'm too tired to get the point. Do you mean you want
>>>> comments whenever this section name is used? Or comments in tools_def?
>>>>
>>> I think I’d settle for a more descriptive commit comment that better
>>> defines what the define means like I mentioned in the other mail.
>>
>> Hmm no, we can do that too, but in that case I really want comments
>> in the code. tools_def is not really documented at all, maybe it is
>> time to introduce an example comment so at least new things get
>> commented? Maybe just the start of a macro list. Relying on "git
>> blame" to figure out simple things is rather awful.
>>
>> One more thing from another thread: Yes, the new macro should refer
>> to object file section naming. I want this patch to get object file
>> sections proper and sound. From there on we can fix the linking stage
>> to emit proper and sound executables in a later patch.
>>
>
> OK then please refactor the commit message to make it clear that this
> patch is to get the correct section in the object files, and work is
> still need to get this into executable images.
Sure.
>
> For Xcode you can make it __DATA__,__const since that is the closest
> thing to read only data and I think that is your intent.
I would like to do that, but only if we can ensure __DATA,__const is
merged into .text, or is a separate RNX section.
>
> GenFW is part of EDKII BaseTools and mtoc is part of the open source
> CCTOOLS project and both those tools would need to be modified to
> create a .rodata section in PE/COFF.
Yes, that should not be a big problem. Remaining issues for me:
1) How to merge __DATA,__const into .text, or how to emit a standalone
.rodata section, for Xcode-based toolchains? (Some ideas above, will
ping Vitaly soon as well)
2) How to submit modified mtoc? Any chance it could be maintained in EDK
II like GenFw? (Would be nice if you could provide some insight)
3) How to merge .rdata into .text for MSVC? (I will try to research this
soon-ish, but no promises)
4) How to design a toggle for the platform maintainer to choose between
.text merge and standalone .rodata?
Please note that I'm not asking you to research any of those questions
(but 2) would be nice :) ), this is merely a summary of open points till
the second stage (correct executables, not just correct object sections)
can be properly approached.
Thanks for your time and insight!
Best regards,
Marvin
[1]
https://github.com/apple/darwin-xnu/blob/a1babec6b135d1f35b2590a1990af3c5c5393479/osfmk/arm/arm_vm_init.c#L318-L324
[2]
https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/makedefs/MakeInc.def#L578
[3]
https://github.com/apple/darwin-xnu/blob/8f02f2a044b9bb1ad951987ef5bab20ec9486310/libsa/lastkerneldataconst.c#L48
>
> Thanks,
>
> Andrew Fish
>
>> Best regards,
>> Marvin
>>
>>>
>>> Thanks,
>>>
>>> Andrew Fish
>>>
>>>> Best regards,
>>>> Marvin
>>>>
>>>>> [1]
>>>>> https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14
>>>>> <https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14>
>>>>> <https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14
>>>>> <https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14>>
>>>>>
>>>>> [2] $otool -V -s __TEXT
>>>>> __constBuild/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>>>>> Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
>>>>> Contents of (__TEXT,__const) section
>>>>> 0000001d 7f 03 80 1f 00 00
>>>>>
>>>>> $ otool -l
>>>>> Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>>>>> Build/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
>>>>> Load command 0
>>>>> cmd LC_SEGMENT_64
>>>>> cmdsize 232
>>>>> segname
>>>>> vmaddr 0x0000000000000000
>>>>> vmsize 0x0000000000000026
>>>>> fileoff 288
>>>>> filesize 38
>>>>> maxprot 0x00000007
>>>>> initprot 0x00000007
>>>>> nsects 2
>>>>> flags 0x0
>>>>> Section
>>>>> sectname __text
>>>>> segname __TEXT
>>>>> addr 0x0000000000000000
>>>>> size 0x000000000000001d
>>>>> offset 288
>>>>> align 2^0 (1)
>>>>> reloff 328
>>>>> nreloc 2
>>>>> flags 0x80000500
>>>>> reserved1 0
>>>>> reserved2 0
>>>>> Section
>>>>> sectname __const
>>>>> segname __TEXT
>>>>> addr 0x000000000000001d
>>>>> size 0x0000000000000006
>>>>> offset 320
>>>>> align 2^0 (1)
>>>>> reloff 0
>>>>> nreloc 0
>>>>> flags 0x00000000
>>>>> reserved1 0
>>>>> reserved2 0
>>>>> Load command 1
>>>>> cmd LC_SYMTAB
>>>>> cmdsize 24
>>>>> symoff 344
>>>>> nsyms 3
>>>>> stroff 392
>>>>> strsize 63
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Andrew Fish
>>>>>
>>>>>
>>>>>> Thanks for your notes and insight!
>>>>>>
>>>>>> Best regards,
>>>>>> Marvin
>>>>>>
>>>>>>
>>>>>> [1]
>>>>>> "For compatibility with other Unix platforms, the following
>>>>>> standard names are also supported:
>>>>>> [...]
>>>>>> .rodata = __DATA,__const data
>>>>>> [...]
>>>>>> If the .rodata section contains no relocations, it is instead put
>>>>>> into the __TEXT,__const section unless this section has already
>>>>>> been specified explicitly."
>>>>>> https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html
>>>>>> <https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html>
>>>>>> <https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html
>>>>>> <https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html>>
>>>>>>
>>>>>>> [1] otool -lh DxeCore.dll
>>>>>>> ...
>>>>>>> Load command 1
>>>>>>> cmd LC_SEGMENT_64
>>>>>>> cmdsize 312
>>>>>>> segname __DATA
>>>>>>> vmaddr 0x000000000002b000
>>>>>>> vmsize 0x0000000000147000
>>>>>>> fileoff 180224
>>>>>>> filesize 8192
>>>>>>> maxprot 0x00000003
>>>>>>> initprot 0x00000003
>>>>>>> nsects 3
>>>>>>> flags 0x0
>>>>>>> Section
>>>>>>> sectname __const
>>>>>>> segname __DATA
>>>>>>> addr 0x000000000002b000
>>>>>>> size 0x0000000000000718
>>>>>>> offset 180224
>>>>>>> align 2^4 (16)
>>>>>>> reloff 0
>>>>>>> nreloc 0
>>>>>>> flags 0x00000000
>>>>>>> reserved1 0
>>>>>>> reserved2 0
>>>>>>> Section
>>>>>>> sectname __data
>>>>>>> segname __DATA
>>>>>>> addr 0x000000000002b720
>>>>>>> size 0x00000000000014f0
>>>>>>> offset 182048
>>>>>>> align 2^4 (16)
>>>>>>> reloff 0
>>>>>>> nreloc 0
>>>>>>> flags 0x00000000
>>>>>>> reserved1 0
>>>>>>> reserved2 0
>>>>>>> Section
>>>>>>> sectname __bss
>>>>>>> segname __DATA
>>>>>>> addr 0x000000000002cc10
>>>>>>> size 0x0000000000144e11
>>>>>>> offset 0
>>>>>>> align 2^4 (16)
>>>>>>> reloff 0
>>>>>>> nreloc 0
>>>>>>> flags 0x00000001
>>>>>>> reserved1 0
>>>>>>> reserved2 0
>>>>>>> …
>>>>>>>
>>>>>>> [2]
>>>>>>> https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html
>>>>>>> <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html>
>>>>>>> <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html
>>>>>>> <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html>>
>>>>>>>
>>>>>>> [3] otool more output…
>>>>>>> Load command 0
>>>>>>> cmd LC_SEGMENT_64
>>>>>>> cmdsize 392
>>>>>>> segname __TEXT
>>>>>>> vmaddr 0x0000000000000240
>>>>>>> vmsize 0x00000000000296c0
>>>>>>> fileoff 1184
>>>>>>> filesize 169664
>>>>>>> maxprot 0x00000005
>>>>>>> initprot 0x00000005
>>>>>>> nsects 4
>>>>>>> flags 0x0
>>>>>>> Section
>>>>>>> sectname __text
>>>>>>> segname __TEXT
>>>>>>> addr 0x0000000000000240
>>>>>>> size 0x000000000002489f
>>>>>>> offset 1184
>>>>>>> align 2^3 (8)
>>>>>>> reloff 0
>>>>>>> nreloc 0
>>>>>>> flags 0x80000400
>>>>>>> reserved1 0
>>>>>>> reserved2 0
>>>>>>> Section
>>>>>>> sectname __cstring
>>>>>>> segname __TEXT
>>>>>>> addr 0x0000000000024ae0
>>>>>>> size 0x000000000000496d
>>>>>>> offset 150848
>>>>>>> align 2^4 (16)
>>>>>>> reloff 0
>>>>>>> nreloc 0
>>>>>>> flags 0x00000002
>>>>>>> reserved1 0
>>>>>>> reserved2 0
>>>>>>> Section
>>>>>>> sectname __ustring
>>>>>>> segname __TEXT
>>>>>>> addr 0x000000000002944e
>>>>>>> size 0x0000000000000048
>>>>>>> offset 169646
>>>>>>> align 2^1 (2)
>>>>>>> reloff 0
>>>>>>> nreloc 0
>>>>>>> flags 0x00000000
>>>>>>> reserved1 0
>>>>>>> reserved2 0
>>>>>>> Section
>>>>>>> sectname __const
>>>>>>> segname __TEXT
>>>>>>> addr 0x00000000000294a0
>>>>>>> size 0x0000000000000448
>>>>>>> offset 169728
>>>>>>> align 2^4 (16)
>>>>>>> reloff 0
>>>>>>> nreloc 0
>>>>>>> flags 0x00000000
>>>>>>> reserved1 0
>>>>>>> reserved2 0
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Andrew Fish
>>>>>>>
>>>>>>>>
>>>>>>>> DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os
>>>>>>>> -Wall -Werror -include AutoGen.h -funsigned-char
>>>>>>>> -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks
>>>>>>>> -mdynamic-no-pic -mno-implicit-float -mms-bitfields
>>>>>>>> -msoft-float -Wno-unused-parameter -Wno-missing-braces
>>>>>>>> -Wno-missing-field-initializers -Wno-tautological-compare
>>>>>>>> -Wno-sign-compare -Wno-varargs
>>>>>>>> -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang
>>>>>>>> $(PLATFORM_FLAGS)
>>>>>>>>
>>>>>>>> @@ -3003,7 +3003,7 @@ RELEASE_XCODE5_X64_DLINK_FLAGS =
>>>>>>>> -arch x86_64 -u _$(IMAGE_ENTRY_POINT) -e _
>>>>>>>> DEBUG_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>>>>>
>>>>>>>> NOOPT_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>>>>>
>>>>>>>> RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64
>>>>>>>>
>>>>>>>> - *_XCODE5_X64_NASM_FLAGS = -f macho64
>>>>>>>>
>>>>>>>> + *_XCODE5_X64_NASM_FLAGS = -f macho64
>>>>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>>>>
>>>>>>>> *_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp -include
>>>>>>>> AutoGen.h
>>>>>>>>
>>>>>>>> *_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include
>>>>>>>> $(MODULE_NAME)StrDefs.h
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> 2.31.1
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>
>>>>
>>>>
>>>>
>>
>>
>>
>>
>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain
2021-08-12 7:26 ` Marvin Häuser
@ 2021-08-12 20:25 ` Marvin Häuser
2021-08-12 22:53 ` Andrew Fish
[not found] ` <169AB0F8BD9C50BA.13770@groups.io>
2 siblings, 0 replies; 42+ messages in thread
From: Marvin Häuser @ 2021-08-12 20:25 UTC (permalink / raw)
To: Andrew Fish, edk2-devel-groups-io
Cc: Bob Feng, Liming Gao, Yuwei Chen, Vitaly Cheptsov
On 12/08/2021 09:26, Marvin Häuser wrote:
>>> The value of p is constant, so it can be placed in a constant data
>>> section. p points to a global variable, so if the compiler does not
>>> manage to somehow turn this into relative addressing (let's assume
>>> it does not), it needs to generate a relocation. This means the
>>> compiler cannot put it in __TEXT,__const, so it has to put it in
>>> __DATA,__const (of course it could put it in other __DATA sections,
>>> but let's assume the compiler agrees this should be read-only). The
>>> very same issue will arise and no matter the choice of the compiler,
>>> this will end up in .data. Do you agree? Or do we have some
>>> guarantee that Apple Clang cannot emit __DATA,__const?
>>
>> I don’t see your bigger point. The compiler is free to implement as
>> it sees fit. Which section some code ends up in is more of an
>> implementation detail for the compiler, and we can’t really depend on
>> that?
>
> Your point, rightfully, was that things that we request to be
> read-only (may) end up being read-write. My issue is that, if the
> compiler requests this pointer to be read-only (it may not, but also
> it may), our PE executable does not honour it either. __DATA,__const
> is a section for constant data, and we put it into a read-write
> section. The bigger point is, whenever the compile stack wants
> something read-only (be that NASM or be that Apple Clang, anything
> really), we should actually ensure it is read-only. I can do that for
> only NASM by forcing the __TEXT,__const section name (at the cost of
> prohibiting relocs), but I do not know how to do it for Apple Clang.
> At worst we could take a hacked-ish solution, where all Mach-O
> segments are converted to PE/COFF sections - with the exception of the
> __DATA,__const section, which, if aligned on a segment alignment
> boundary, can be inserted between the two other parts .data is split
> into. I read in the XNU source that the ARM protection code does
> something roughly like this [1], but I'm really far from well-versed
> in the deep details of macOS.
>
> Sorry for this not being "integrated" in above text, but I found two
> more things while looking for citation 1.
>
> 1) Mach-O sections can be renamed, including the preceding segment
> name [2]. According to the very next line, the example actually
> creates a new segment. Does it allow merging into another, existing
> segment? What if I did something like:
>
> -Wl,-rename_section,__DATA,__const,__TEXT,__const2
>
> or even
>
> -Wl,-rename_section,__DATA,__const,__TEXT,__const
(I cut the upper part of the quote to make some room...)
Both worked as expected.
>
> i.e. can it merge two sections together? if __DATA,__const had data
> with relocs, would the renaming trigger the "no relocs" error of
> __TEXT, or does that happen before section renaming? Any chance it can
> be turned off?
As feared, the error triggers. However I found a seemingly
not-so-well-known flag for Apple ld64 to disable it: "-read_only_relocs
suppress". In fact, it is already used for IA32 builds, but not for X64
builds? [1]
I also noticed the extent of the XCODE5 "exceptions", e.g. duplicated
files [2]. The files seem to be out-of-sync, but interestingly the
XCODE5 version is the one that is more current and used in other
toolchain builds as well.
So, maybe we can do the following?
1) Pass "-read_only_relocs suppress" for X64 and clean up any
XCODE5-specific workarounds for text relocations.
2) Use neither "__TEXT,__const" nor "__DATA,__const" for
NASM_RODATA_SECTION_NAME, but "__DATA_CONST,__const". Give it RNX
permissions.
3) Case-distinct between "generate standalone .rodata" and "merge
.rodata into .text".
3.1) case 1: Rename "__TEXT,__const" and "__TEXT,__cstring" to
"__DATA_CONST,__text_const" and "__DATA_CONST,__cstring" respectively.
3.2) case 2: Rename "__DATA_CONST,__const" to "__TEXT,__data_const".
Rationales:
1) There is no such concept in PE/COFF, we can discard it and align with
PE/COFF and ELF toolchains. Allows ".rodata" merge into ".text".
2) There is no pre-existing segment for read-only data, so we create our
own with a naming convention taken from XNU.
3.1) Both former sections do not contain executable code, so we properly
enforce the separation introduced in 2). Choose unique names to not
reduce the object file separation.
3.2) Merge ".rodata" into ".text" in the same way ELF toolchains do.
Saves space and we get to keep read-only.
I can test both cases work fine soon.
>
> 1.1) Actually, for the standalone .rodata section, we can just rename
> it to __DATA_CONST,__const, as I have seen elsewhere in XNU. No
> hacked-ish solution needed. :)
>
> 2) We actually can force the compiler to put data in the constant data
> segment [3]. This is of course not used in EDK II, and probably
> neither portable nor necessary, but an interesting detail. I really
> think we should honour it either way.
>
> I will likely try to get my hands on some sort of Apple development
> environment soon, but I cannot promise much right now. I think it
> really is better if I can test through all toolchains myself. If you
> release Apple Clang for Linux, I also won't complain of course. :)
I found a port of Apple ld64 for Linux. I get it's not "the real deal",
but all observed behaviour matches what I've seen so far from Apple
Xcode. Actually boots OVMF. :)
A side note, seems like even latest mtoc gives .data RWX no matter what?
Ouch...
Best regards,
Marvin
[1]
https://github.com/tianocore/edk2/blob/master/BaseTools/Conf/tools_def.template#L2980-L2982
[2]
https://github.com/tianocore/edk2/blob/0a6b303dcedb7af238ad485d545802befb797b3a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/Xcode5ExceptionHandlerAsm.nasm
https://github.com/tianocore/edk2/blob/0a6b303dcedb7af238ad485d545802befb797b3a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm
>
>>
>>>
>>>>>> We should double check what is happening for ELF on x86, ARM,
>>>>>> RiskV, etc. and do the same thing. I assume all the tools that
>>>>>> generate PE/COFF directly are good with .rodata?
>>>>> They are not, that is the whole point of the patch in its current
>>>>> shape. .rodata is valid for ELF and Mach-O, PE/COFF needs .rdata.
>>>>>
>>>>>> I think it is likely as simple as dumping the EFL object file in
>>>>>> objdump or gdb for the given toolchain (like my Xcode example).
>>>>>>
>>>>>> TL;DR It looks to me like nasm does some SECTION translations
>>>>>> under the hood to make code portable, and I’d like to make sure
>>>>>> we capture those in the new NASM_RODATA_SECTION_NAME. If some one
>>>>>> is doing a security review having NASM_RODATA_SECTION_NAME is
>>>>>> going to imply that a .rodata section is being used by that
>>>>>> specific toolchain, and I think that is much worse than the
>>>>>> current “magic” behavior in nasm. We are much better off
>>>>>> explaining what is really happening, since it is not very obvious.
>>>>> I feel like I'm too tired to get the point. Do you mean you want
>>>>> comments whenever this section name is used? Or comments in
>>>>> tools_def?
>>>>>
>>>> I think I’d settle for a more descriptive commit comment that
>>>> better defines what the define means like I mentioned in the other
>>>> mail.
>>>
>>> Hmm no, we can do that too, but in that case I really want comments
>>> in the code. tools_def is not really documented at all, maybe it is
>>> time to introduce an example comment so at least new things get
>>> commented? Maybe just the start of a macro list. Relying on "git
>>> blame" to figure out simple things is rather awful.
>>>
>>> One more thing from another thread: Yes, the new macro should refer
>>> to object file section naming. I want this patch to get object file
>>> sections proper and sound. From there on we can fix the linking
>>> stage to emit proper and sound executables in a later patch.
>>>
>>
>> OK then please refactor the commit message to make it clear that this
>> patch is to get the correct section in the object files, and work is
>> still need to get this into executable images.
>
> Sure.
>
>>
>> For Xcode you can make it __DATA__,__const since that is the closest
>> thing to read only data and I think that is your intent.
>
> I would like to do that, but only if we can ensure __DATA,__const is
> merged into .text, or is a separate RNX section.
>
>>
>> GenFW is part of EDKII BaseTools and mtoc is part of the open source
>> CCTOOLS project and both those tools would need to be modified to
>> create a .rodata section in PE/COFF.
>
> Yes, that should not be a big problem. Remaining issues for me:
> 1) How to merge __DATA,__const into .text, or how to emit a standalone
> .rodata section, for Xcode-based toolchains? (Some ideas above, will
> ping Vitaly soon as well)
> 2) How to submit modified mtoc? Any chance it could be maintained in
> EDK II like GenFw? (Would be nice if you could provide some insight)
> 3) How to merge .rdata into .text for MSVC? (I will try to research
> this soon-ish, but no promises)
> 4) How to design a toggle for the platform maintainer to choose
> between .text merge and standalone .rodata?
>
> Please note that I'm not asking you to research any of those questions
> (but 2) would be nice :) ), this is merely a summary of open points
> till the second stage (correct executables, not just correct object
> sections) can be properly approached.
>
> Thanks for your time and insight!
>
> Best regards,
> Marvin
>
>
> [1]
> https://github.com/apple/darwin-xnu/blob/a1babec6b135d1f35b2590a1990af3c5c5393479/osfmk/arm/arm_vm_init.c#L318-L324
>
> [2]
> https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/makedefs/MakeInc.def#L578
>
> [3]
> https://github.com/apple/darwin-xnu/blob/8f02f2a044b9bb1ad951987ef5bab20ec9486310/libsa/lastkerneldataconst.c#L48
>
>>
>> Thanks,
>>
>> Andrew Fish
>>
>>> Best regards,
>>> Marvin
>>>
>>>>
>>>> Thanks,
>>>>
>>>> Andrew Fish
>>>>
>>>>> Best regards,
>>>>> Marvin
>>>>>
>>>>>> [1]
>>>>>> https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14
>>>>>> <https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14>
>>>>>> <https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14
>>>>>> <https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14>>
>>>>>>
>>>>>>
>>>>>> [2] $otool -V -s __TEXT
>>>>>> __constBuild/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>>>>>> Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
>>>>>>
>>>>>> Contents of (__TEXT,__const) section
>>>>>> 0000001d 7f 03 80 1f 00 00
>>>>>>
>>>>>> $ otool -l
>>>>>> Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>>>>>> Build/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
>>>>>>
>>>>>> Load command 0
>>>>>> cmd LC_SEGMENT_64
>>>>>> cmdsize 232
>>>>>> segname
>>>>>> vmaddr 0x0000000000000000
>>>>>> vmsize 0x0000000000000026
>>>>>> fileoff 288
>>>>>> filesize 38
>>>>>> maxprot 0x00000007
>>>>>> initprot 0x00000007
>>>>>> nsects 2
>>>>>> flags 0x0
>>>>>> Section
>>>>>> sectname __text
>>>>>> segname __TEXT
>>>>>> addr 0x0000000000000000
>>>>>> size 0x000000000000001d
>>>>>> offset 288
>>>>>> align 2^0 (1)
>>>>>> reloff 328
>>>>>> nreloc 2
>>>>>> flags 0x80000500
>>>>>> reserved1 0
>>>>>> reserved2 0
>>>>>> Section
>>>>>> sectname __const
>>>>>> segname __TEXT
>>>>>> addr 0x000000000000001d
>>>>>> size 0x0000000000000006
>>>>>> offset 320
>>>>>> align 2^0 (1)
>>>>>> reloff 0
>>>>>> nreloc 0
>>>>>> flags 0x00000000
>>>>>> reserved1 0
>>>>>> reserved2 0
>>>>>> Load command 1
>>>>>> cmd LC_SYMTAB
>>>>>> cmdsize 24
>>>>>> symoff 344
>>>>>> nsyms 3
>>>>>> stroff 392
>>>>>> strsize 63
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Andrew Fish
>>>>>>
>>>>>>
>>>>>>> Thanks for your notes and insight!
>>>>>>>
>>>>>>> Best regards,
>>>>>>> Marvin
>>>>>>>
>>>>>>>
>>>>>>> [1]
>>>>>>> "For compatibility with other Unix platforms, the following
>>>>>>> standard names are also supported:
>>>>>>> [...]
>>>>>>> .rodata = __DATA,__const data
>>>>>>> [...]
>>>>>>> If the .rodata section contains no relocations, it is instead
>>>>>>> put into the __TEXT,__const section unless this section has
>>>>>>> already been specified explicitly."
>>>>>>> https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html
>>>>>>> <https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html>
>>>>>>> <https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html
>>>>>>> <https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html>>
>>>>>>>
>>>>>>>> [1] otool -lh DxeCore.dll
>>>>>>>> ...
>>>>>>>> Load command 1
>>>>>>>> cmd LC_SEGMENT_64
>>>>>>>> cmdsize 312
>>>>>>>> segname __DATA
>>>>>>>> vmaddr 0x000000000002b000
>>>>>>>> vmsize 0x0000000000147000
>>>>>>>> fileoff 180224
>>>>>>>> filesize 8192
>>>>>>>> maxprot 0x00000003
>>>>>>>> initprot 0x00000003
>>>>>>>> nsects 3
>>>>>>>> flags 0x0
>>>>>>>> Section
>>>>>>>> sectname __const
>>>>>>>> segname __DATA
>>>>>>>> addr 0x000000000002b000
>>>>>>>> size 0x0000000000000718
>>>>>>>> offset 180224
>>>>>>>> align 2^4 (16)
>>>>>>>> reloff 0
>>>>>>>> nreloc 0
>>>>>>>> flags 0x00000000
>>>>>>>> reserved1 0
>>>>>>>> reserved2 0
>>>>>>>> Section
>>>>>>>> sectname __data
>>>>>>>> segname __DATA
>>>>>>>> addr 0x000000000002b720
>>>>>>>> size 0x00000000000014f0
>>>>>>>> offset 182048
>>>>>>>> align 2^4 (16)
>>>>>>>> reloff 0
>>>>>>>> nreloc 0
>>>>>>>> flags 0x00000000
>>>>>>>> reserved1 0
>>>>>>>> reserved2 0
>>>>>>>> Section
>>>>>>>> sectname __bss
>>>>>>>> segname __DATA
>>>>>>>> addr 0x000000000002cc10
>>>>>>>> size 0x0000000000144e11
>>>>>>>> offset 0
>>>>>>>> align 2^4 (16)
>>>>>>>> reloff 0
>>>>>>>> nreloc 0
>>>>>>>> flags 0x00000001
>>>>>>>> reserved1 0
>>>>>>>> reserved2 0
>>>>>>>> …
>>>>>>>>
>>>>>>>> [2]
>>>>>>>> https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html
>>>>>>>> <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html>
>>>>>>>> <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html
>>>>>>>> <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html>>
>>>>>>>>
>>>>>>>>
>>>>>>>> [3] otool more output…
>>>>>>>> Load command 0
>>>>>>>> cmd LC_SEGMENT_64
>>>>>>>> cmdsize 392
>>>>>>>> segname __TEXT
>>>>>>>> vmaddr 0x0000000000000240
>>>>>>>> vmsize 0x00000000000296c0
>>>>>>>> fileoff 1184
>>>>>>>> filesize 169664
>>>>>>>> maxprot 0x00000005
>>>>>>>> initprot 0x00000005
>>>>>>>> nsects 4
>>>>>>>> flags 0x0
>>>>>>>> Section
>>>>>>>> sectname __text
>>>>>>>> segname __TEXT
>>>>>>>> addr 0x0000000000000240
>>>>>>>> size 0x000000000002489f
>>>>>>>> offset 1184
>>>>>>>> align 2^3 (8)
>>>>>>>> reloff 0
>>>>>>>> nreloc 0
>>>>>>>> flags 0x80000400
>>>>>>>> reserved1 0
>>>>>>>> reserved2 0
>>>>>>>> Section
>>>>>>>> sectname __cstring
>>>>>>>> segname __TEXT
>>>>>>>> addr 0x0000000000024ae0
>>>>>>>> size 0x000000000000496d
>>>>>>>> offset 150848
>>>>>>>> align 2^4 (16)
>>>>>>>> reloff 0
>>>>>>>> nreloc 0
>>>>>>>> flags 0x00000002
>>>>>>>> reserved1 0
>>>>>>>> reserved2 0
>>>>>>>> Section
>>>>>>>> sectname __ustring
>>>>>>>> segname __TEXT
>>>>>>>> addr 0x000000000002944e
>>>>>>>> size 0x0000000000000048
>>>>>>>> offset 169646
>>>>>>>> align 2^1 (2)
>>>>>>>> reloff 0
>>>>>>>> nreloc 0
>>>>>>>> flags 0x00000000
>>>>>>>> reserved1 0
>>>>>>>> reserved2 0
>>>>>>>> Section
>>>>>>>> sectname __const
>>>>>>>> segname __TEXT
>>>>>>>> addr 0x00000000000294a0
>>>>>>>> size 0x0000000000000448
>>>>>>>> offset 169728
>>>>>>>> align 2^4 (16)
>>>>>>>> reloff 0
>>>>>>>> nreloc 0
>>>>>>>> flags 0x00000000
>>>>>>>> reserved1 0
>>>>>>>> reserved2 0
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> Andrew Fish
>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os
>>>>>>>>> -Wall -Werror -include AutoGen.h -funsigned-char
>>>>>>>>> -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks
>>>>>>>>> -mdynamic-no-pic -mno-implicit-float -mms-bitfields
>>>>>>>>> -msoft-float -Wno-unused-parameter -Wno-missing-braces
>>>>>>>>> -Wno-missing-field-initializers -Wno-tautological-compare
>>>>>>>>> -Wno-sign-compare -Wno-varargs
>>>>>>>>> -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang
>>>>>>>>> $(PLATFORM_FLAGS)
>>>>>>>>>
>>>>>>>>> @@ -3003,7 +3003,7 @@ RELEASE_XCODE5_X64_DLINK_FLAGS =
>>>>>>>>> -arch x86_64 -u _$(IMAGE_ENTRY_POINT) -e _
>>>>>>>>> DEBUG_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>>>>>>
>>>>>>>>> NOOPT_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>>>>>>
>>>>>>>>> RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64
>>>>>>>>>
>>>>>>>>> - *_XCODE5_X64_NASM_FLAGS = -f macho64
>>>>>>>>>
>>>>>>>>> + *_XCODE5_X64_NASM_FLAGS = -f macho64
>>>>>>>>> -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>
>>>>>>>>> *_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp
>>>>>>>>> -include AutoGen.h
>>>>>>>>>
>>>>>>>>> *_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include
>>>>>>>>> $(MODULE_NAME)StrDefs.h
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> 2.31.1
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>>>
>>>
>>
>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain
2021-08-12 7:26 ` Marvin Häuser
2021-08-12 20:25 ` Marvin Häuser
@ 2021-08-12 22:53 ` Andrew Fish
[not found] ` <169AB0F8BD9C50BA.13770@groups.io>
2 siblings, 0 replies; 42+ messages in thread
From: Andrew Fish @ 2021-08-12 22:53 UTC (permalink / raw)
To: Marvin Häuser
Cc: edk2-devel-groups-io, Bob Feng, Liming Gao, Yuwei Chen,
Vitaly Cheptsov
> On Aug 12, 2021, at 12:26 AM, Marvin Häuser <mhaeuser@posteo.de> wrote:
>
> On 11/08/2021 19:19, Andrew Fish wrote:
>>
>>
>>> On Aug 11, 2021, at 1:11 AM, Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>> wrote:
>>>
>>> On 10/08/2021 23:58, Andrew Fish wrote:
>>>>
>>>>> On Aug 10, 2021, at 2:30 PM, Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>> wrote:
>>>>>
>>>>> On 10/08/2021 21:35, Andrew Fish via groups.io <http://groups.io> wrote:
>>>>>>
>>>>>>> On Aug 10, 2021, at 1:27 AM, Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>> wrote:
>>>>>>>
>>>>>>> On 10/08/2021 06:19, Andrew Fish via groups.io <http://groups.io> <http://groups.io <http://groups.io>> wrote:
>>>>>>>>
>>>>>>>>> On Aug 9, 2021, at 2:51 AM, Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>>> wrote:
>>>>>>>>>
>>>>>>>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3318 <https://bugzilla.tianocore.org/show_bug.cgi?id=3318> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318 <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318 <https://bugzilla.tianocore.org/show_bug.cgi?id=3318> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318 <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>>>
>>>>>>>>>
>>>>>>>>> Different toolchains of the EDK II build system may generate ELF or
>>>>>>>>> Mach-O files, which use the ".rodata" naming convention, or PE/COFF
>>>>>>>>> files, which use the ".rdata" naming convention. Section permissions
>>>>>>>>> are chosen based on this name per file format by NASM. To harden
>>>>>>>>> image permission security, and to save space by avoiding both
>>>>>>>>> ".rdata" and ".rodata" sections being emitted, expose the appropriate
>>>>>>>>> name as a preprocessor constant.
>>>>>>>>>
>>>>>>>>> Cc: Bob Feng <bob.c.feng@intel.com <mailto:bob.c.feng@intel.com> <mailto:bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>> <mailto:bob.c.feng@intel.com <mailto:bob.c.feng@intel.com> <mailto:bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>>>>
>>>>>>>>> Cc: Liming Gao <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> <mailto:gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>> <mailto:gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> <mailto:gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>>>>
>>>>>>>>> Cc: Yuwei Chen <yuwei.chen@intel.com <mailto:yuwei.chen@intel.com> <mailto:yuwei.chen@intel.com <mailto:yuwei.chen@intel.com>> <mailto:yuwei.chen@intel.com <mailto:yuwei.chen@intel.com> <mailto:yuwei.chen@intel.com <mailto:yuwei.chen@intel.com>>>>
>>>>>>>>> Cc: Vitaly Cheptsov <vit9696@protonmail.com <mailto:vit9696@protonmail.com> <mailto:vit9696@protonmail.com <mailto:vit9696@protonmail.com>> <mailto:vit9696@protonmail.com <mailto:vit9696@protonmail.com> <mailto:vit9696@protonmail.com <mailto:vit9696@protonmail.com>>>>
>>>>>>>>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>>>
>>>>>>>>> ---
>>>>>>>>> BaseTools/Conf/tools_def.template | 172 ++++++++++----------
>>>>>>>>> 1 file changed, 86 insertions(+), 86 deletions(-)
>>>>>>>>>
>>>>>>>>> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
>>>>>>>>> index 2e6b382ab623..84d464916c4d 100755
>>>>>>>>> --- a/BaseTools/Conf/tools_def.template
>>>>>>>>> +++ b/BaseTools/Conf/tools_def.template
>>>>>>>>> @@ -463,9 +463,9 @@ NOOPT_VS2008_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>>> RELEASE_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -495,9 +495,9 @@ NOOPT_VS2008_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>>> RELEASE_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -574,9 +574,9 @@ NOOPT_VS2008x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>>> RELEASE_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -605,9 +605,9 @@ NOOPT_VS2008x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>>> RELEASE_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -688,9 +688,9 @@ NOOPT_VS2010_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>>> RELEASE_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -720,9 +720,9 @@ NOOPT_VS2010_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>>> RELEASE_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -799,9 +799,9 @@ NOOPT_VS2010x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>>> RELEASE_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -831,9 +831,9 @@ NOOPT_VS2010x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>>> RELEASE_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -913,9 +913,9 @@ NOOPT_VS2012_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>>>> RELEASE_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -945,9 +945,9 @@ NOOPT_VS2012_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>>> RELEASE_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -1024,9 +1024,9 @@ NOOPT_VS2012x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>>>> RELEASE_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -1056,9 +1056,9 @@ NOOPT_VS2012x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>>> RELEASE_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -1138,9 +1138,9 @@ NOOPT_VS2013_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>>>> RELEASE_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -1170,9 +1170,9 @@ NOOPT_VS2013_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>>> RELEASE_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -1249,9 +1249,9 @@ NOOPT_VS2013x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>>>> RELEASE_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -1281,9 +1281,9 @@ NOOPT_VS2013x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>>> RELEASE_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -1364,9 +1364,9 @@ NOOPT_VS2015_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>>>> RELEASE_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -1396,9 +1396,9 @@ NOOPT_VS2015_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>>> RELEASE_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -1476,9 +1476,9 @@ NOOPT_VS2015x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>>>> RELEASE_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -1508,9 +1508,9 @@ NOOPT_VS2015x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>>> RELEASE_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -1586,9 +1586,9 @@ NOOPT_VS2017_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>>>>>>> RELEASE_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -1616,9 +1616,9 @@ NOOPT_VS2017_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>>> RELEASE_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -1744,9 +1744,9 @@ NOOPT_VS2019_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>>>>>>> RELEASE_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -1774,9 +1774,9 @@ NOOPT_VS2019_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>>> RELEASE_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>
>>>>>>>>> NOOPT_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> - DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>
>>>>>>>>> -RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>
>>>>>>>>> -NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>
>>>>>>>>> + DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> +NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>
>>>>>>>>> RELEASE_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>
>>>>>>>>> @@ -2030,7 +2030,7 @@ DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include A
>>>>>>>>> *_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
>>>>>>>>>
>>>>>>>>> *_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>>>
>>>>>>>>> *_GCC48_IA32_OBJCOPY_FLAGS =
>>>>>>>>>
>>>>>>>>> -*_GCC48_IA32_NASM_FLAGS = -f elf32
>>>>>>>>>
>>>>>>>>> +*_GCC48_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
>>>>>>>>>
>>>>>>>>> RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable
>>>>>>>>>
>>>>>>>>> @@ -2058,7 +2058,7 @@ RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>>>>>>> *_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
>>>>>>>>>
>>>>>>>>> *_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>>>
>>>>>>>>> *_GCC48_X64_OBJCOPY_FLAGS =
>>>>>>>>>
>>>>>>>>> -*_GCC48_X64_NASM_FLAGS = -f elf64
>>>>>>>>>
>>>>>>>>> +*_GCC48_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
>>>>>>>>>
>>>>>>>>> RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable
>>>>>>>>>
>>>>>>>>> @@ -2170,7 +2170,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
>>>>>>>>> *_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
>>>>>>>>>
>>>>>>>>> *_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>>>
>>>>>>>>> *_GCC49_IA32_OBJCOPY_FLAGS =
>>>>>>>>>
>>>>>>>>> -*_GCC49_IA32_NASM_FLAGS = -f elf32
>>>>>>>>>
>>>>>>>>> +*_GCC49_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
>>>>>>>>>
>>>>>>>>> RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>>>>>>
>>>>>>>>> @@ -2198,7 +2198,7 @@ RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>>>>>>> *_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
>>>>>>>>>
>>>>>>>>> *_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>>>
>>>>>>>>> *_GCC49_X64_OBJCOPY_FLAGS =
>>>>>>>>>
>>>>>>>>> -*_GCC49_X64_NASM_FLAGS = -f elf64
>>>>>>>>>
>>>>>>>>> +*_GCC49_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
>>>>>>>>>
>>>>>>>>> RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>>>>>>
>>>>>>>>> @@ -2316,7 +2316,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
>>>>>>>>> *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
>>>>>>>>>
>>>>>>>>> *_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>>>
>>>>>>>>> *_GCC5_IA32_OBJCOPY_FLAGS =
>>>>>>>>>
>>>>>>>>> -*_GCC5_IA32_NASM_FLAGS = -f elf32
>>>>>>>>>
>>>>>>>>> +*_GCC5_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Os
>>>>>>>>>
>>>>>>>>> DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
>>>>>>>>>
>>>>>>>>> @@ -2348,7 +2348,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,
>>>>>>>>> *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
>>>>>>>>>
>>>>>>>>> *_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>>>
>>>>>>>>> *_GCC5_X64_OBJCOPY_FLAGS =
>>>>>>>>>
>>>>>>>>> -*_GCC5_X64_NASM_FLAGS = -f elf64
>>>>>>>>>
>>>>>>>>> +*_GCC5_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO -Os
>>>>>>>>>
>>>>>>>>> DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
>>>>>>>>>
>>>>>>>>> @@ -2589,7 +2589,7 @@ DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNIN
>>>>>>>>> *_CLANG38_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANG38_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>>>
>>>>>>>>> *_CLANG38_IA32_OBJCOPY_FLAGS =
>>>>>>>>>
>>>>>>>>> -*_CLANG38_IA32_NASM_FLAGS = -f elf32
>>>>>>>>>
>>>>>>>>> +*_CLANG38_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>
>>>>>>>>> *_CLANG38_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANG38_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANG38_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>>>>
>>>>>>>>> @@ -2626,7 +2626,7 @@ NOOPT_CLANG38_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -O0
>>>>>>>>> *_CLANG38_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANG38_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>>>
>>>>>>>>> *_CLANG38_X64_OBJCOPY_FLAGS =
>>>>>>>>>
>>>>>>>>> -*_CLANG38_X64_NASM_FLAGS = -f elf64
>>>>>>>>>
>>>>>>>>> +*_CLANG38_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>
>>>>>>>>> *_CLANG38_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANG38_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANG38_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>>>>
>>>>>>>>> @@ -2777,7 +2777,7 @@ DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARN
>>>>>>>>> *_CLANGPDB_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32 -fno-lto DEF(CLANGPDB_IA32_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANGPDB_IA32_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m32 -march=i386 DEF(CLANGPDB_IA32_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANGPDB_IA32_OBJCOPY_FLAGS =
>>>>>>>>>
>>>>>>>>> -*_CLANGPDB_IA32_NASM_FLAGS = -f win32
>>>>>>>>>
>>>>>>>>> +*_CLANGPDB_IA32_NASM_FLAGS = -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> *_CLANGPDB_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANGPDB_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANGPDB_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>>>>>>
>>>>>>>>> @@ -2811,7 +2811,7 @@ NOOPT_CLANGPDB_IA32_DLINK2_FLAGS =
>>>>>>>>> *_CLANGPDB_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64 -fno-lto DEF(CLANGPDB_X64_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANGPDB_X64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m64 DEF(CLANGPDB_X64_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANGPDB_X64_OBJCOPY_FLAGS =
>>>>>>>>>
>>>>>>>>> -*_CLANGPDB_X64_NASM_FLAGS = -f win64
>>>>>>>>>
>>>>>>>>> +*_CLANGPDB_X64_NASM_FLAGS = -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>
>>>>>>>>> *_CLANGPDB_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANGPDB_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANGPDB_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>>>>>>
>>>>>>>>> @@ -2878,7 +2878,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
>>>>>>>>> *_CLANGDWARF_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANGDWARF_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>>>
>>>>>>>>> *_CLANGDWARF_IA32_OBJCOPY_FLAGS =
>>>>>>>>>
>>>>>>>>> -*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32
>>>>>>>>>
>>>>>>>>> +*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>
>>>>>>>>> *_CLANGDWARF_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANGDWARF_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANGDWARF_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>>>>
>>>>>>>>> @@ -2914,7 +2914,7 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -
>>>>>>>>> *_CLANGDWARF_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANGDWARF_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>>>
>>>>>>>>> *_CLANGDWARF_X64_OBJCOPY_FLAGS =
>>>>>>>>>
>>>>>>>>> -*_CLANGDWARF_X64_NASM_FLAGS = -f elf64
>>>>>>>>>
>>>>>>>>> +*_CLANGDWARF_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>
>>>>>>>>> *_CLANGDWARF_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANGDWARF_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>>>>
>>>>>>>>> *_CLANGDWARF_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>>>>
>>>>>>>>> @@ -2985,7 +2985,7 @@ RELEASE_XCODE5_IA32_DLINK_FLAGS = -arch i386 -u _$(IMAGE_ENTRY_POINT) -e _$
>>>>>>>>> DEBUG_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>>>>>>
>>>>>>>>> NOOPT_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>>>>>>
>>>>>>>>> RELEASE_XCODE5_IA32_ASM_FLAGS = -arch i386
>>>>>>>>>
>>>>>>>>> - *_XCODE5_IA32_NASM_FLAGS = -f macho32
>>>>>>>>>
>>>>>>>>> + *_XCODE5_IA32_NASM_FLAGS = -f macho32 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> An EFI Mach-O file does not contain a .rodata section. A Mach-O contains a __DATA segment that is broken up into sections. For a typical EFI image there are __const, __data, __bss sections in the __DATA segment [1].
>>>>>>> Yes, and ".rodata" is almost a synonym for "__DATA,__const", with a small exception [1]. Maybe it'd be clearer if the macro was renamed to "NASM_RODATA_SECTION_NAME", to indicate this is not just a "raw" name, but NASM gives it a semantic meaning?
>>>>>>>
>>>>>>>> The mtoc [2] tool used to convert mach-O to PE/COFF converts the entire __DATA segment (__const, __data, and __bss) into the .data section. Thus adding any kind of new data section is a no-op at best.
>>>>>>> This is a part I missed, because I do not have an Xcode toolchain at hand, so thanks for investigating. However this, in my opinion, is a flaw with Mach-O/mtoc and not with my patch. It seems like the only difference between __TEXT,__const and __DATA,__const is whether the data is targeted by a relocation or not. Such a concept does not exist for PE/COFF (and I think not even for ELF, but I'm not too familiar with it), thus the logical PE/COFF section __DATA,__const should be merged into is .rdata (and .rdata may or may not be merged into .text in an earlier step, I assume transitivity). I could change the macro definition to explicitly declare __TEXT,__const, but that would still put the compiler-emitted data in the wrong section. Does Xcode provide anything remotely similar to GNU linker scripts which we can use to move the section?
>>>>>>>
>>>>>>> Please also note that .rodata is used for Xcode-based toolchains already (in fact, all toolchains, and this is the issue), I'm not regressing anything. I just expected it to work fine as-is. This patch mainly fixed PE/COFF-based toolchains, which get both .rdata from the compiler and .rodata with RX permissions from NASM, because ".rodata" only has a semantic meaning for ELF and Mach-O outputs, but not for PE/COFF.
>>>>>>>
>>>>>>>> If you want something to be read only for Xcode/clang you are better off putting it in the __TEXT section [3]. The __TEXT section is read only and for X64 can not even contain relocations.
>>>>>>> Well, this kind of is an issue. We would need to introduce an arbitrary constraint on the relocation part that holds only for Xcode-based toolchains. Does the compiler emit an error when data in __TEXT,__const is targeted by a relocation?
>>>>>> The Xcode linker emits a fatal error on X64 for a relocation in the __TEXT section, everything needs to be RIP relative and the compiler does that for free. We generally only run into this for hand coded assembler and the fix is to use RIP relative addressing in the assembly.
>>>>> Good, thanks for confirming! Still, this would be a bit of an awkward constraints for Xcode only.
>>>>>
>>>> It is a physics problem we can’t fix, so I end up writing some patches to fix other peoples assembler from time to time. The CI building with Xcode helps with this a lot.
>>>
>>> (I think all open ends of the other threads are in here too, so let's drop them and go on only here?)
>>>
>>> Right, ok, thanks!
>>>
>>>>>>> Also see above regarding compiler-emitted __DATA,__const.
>>>>>>>
>>>>>> OK so the current nasm `SECTION .rodata`[1] gets mapped to __TEXT,__const[2] for Xcode clang, and this is done by nasm (I dumped the object file). GenFw and mtoc only run on executables, also they tend to be conservative as they need to keep the layout the same and the relative layout between sections the same, but in this case it is nasm placing the data in the text section.
>>>>>>
>>>>>> So what I’d like to see in the patch is to define RODATA_SECTION_NAME to match what is actually happening. So for XCODE that would be `__TEXT,__const` not `.rodata`.
>>>>> We can do that, but what to do about compiler-emitted __DATA,__const?
>>>> Sorry I don’t understand what RODATA_SECTION_NAME has to do with the compiler? I thought it was for nasm?
>>>
>>> Yes, it is for NASM. My point is, the actual issue is not that my macro uses __DATA,__const, but that __DATA,__const is not merged into .text, but into .data. Fixing the macro fixes where the NASM definitions go, but what about the C definitions? I cannot test it, as I said, because I don't have an Xcode machine, but let's say we have a stupid example like this:
>>>
>>> volatile UINT32 a;
>>> volatile UINT32 *CONST p = &a;
>>>
>>
>> In this case p ends up in a __DATA__,__const section since &a requires a relocation.
>
> OK, good, thanks!
>
>>
>>
>>> The value of p is constant, so it can be placed in a constant data section. p points to a global variable, so if the compiler does not manage to somehow turn this into relative addressing (let's assume it does not), it needs to generate a relocation. This means the compiler cannot put it in __TEXT,__const, so it has to put it in __DATA,__const (of course it could put it in other __DATA sections, but let's assume the compiler agrees this should be read-only). The very same issue will arise and no matter the choice of the compiler, this will end up in .data. Do you agree? Or do we have some guarantee that Apple Clang cannot emit __DATA,__const?
>>
>> I don’t see your bigger point. The compiler is free to implement as it sees fit. Which section some code ends up in is more of an implementation detail for the compiler, and we can’t really depend on that?
>
> Your point, rightfully, was that things that we request to be read-only (may) end up being read-write. My issue is that, if the compiler requests this pointer to be read-only (it may not, but also it may), our PE executable does not honour it either. __DATA,__const is a section for constant data, and we put it into a read-write section. The bigger point is, whenever the compile stack wants something read-only (be that NASM or be that Apple Clang, anything really), we should actually ensure it is read-only. I can do that for only NASM by forcing the __TEXT,__const section name (at the cost of prohibiting relocs), but I do not know how to do it for Apple Clang. At worst we could take a hacked-ish solution, where all Mach-O segments are converted to PE/COFF sections - with the exception of the __DATA,__const section, which, if aligned on a segment alignment boundary, can be inserted between the two other parts .data is split into. I read in the XNU source that the ARM protection code does something roughly like this [1], but I'm really far from well-versed in the deep details of macOS.
>
> Sorry for this not being "integrated" in above text, but I found two more things while looking for citation 1.
>
> 1) Mach-O sections can be renamed, including the preceding segment name [2]. According to the very next line, the example actually creates a new segment. Does it allow merging into another, existing segment? What if I did something like:
>
> -Wl,-rename_section,__DATA,__const,__TEXT,__const2
>
> or even
>
> -Wl,-rename_section,__DATA,__const,__TEXT,__const
>
> i.e. can it merge two sections together? if __DATA,__const had data with relocs, would the renaming trigger the "no relocs" error of __TEXT, or does that happen before section renaming? Any chance it can be turned off?
>
> 1.1) Actually, for the standalone .rodata section, we can just rename it to __DATA_CONST,__const, as I have seen elsewhere in XNU. No hacked-ish solution needed. :)
>
> 2) We actually can force the compiler to put data in the constant data segment [3]. This is of course not used in EDK II, and probably neither portable nor necessary, but an interesting detail. I really think we should honour it either way.
>
> I will likely try to get my hands on some sort of Apple development environment soon, but I cannot promise much right now. I think it really is better if I can test through all toolchains myself. If you release Apple Clang for Linux, I also won't complain of course. :)
>
When I ask compiler questions to my compiler peeps they sometime answer via: https://godbolt.org. You can pas -emit-llvm, -S, or actually run code all from the webpage. It lets you compare the output of lots of versions of clang and compare it with other compilers too. You might find that useful for your research.
For EFI/EDKII clang is mostly just clang (strange triple for x86_64). It is ld64 that is macOS specific, and there is not cross version of ld64 that I know about.
FYI I worked really closely with the owner of ld64, Nick, when we got EFI working. What looks like the strange set of args is what is required to make ld64 “do the right thing”. The biggest portability issue with ld64 is it does not support the GCC ld linker scripts.
I think I’ve forgotten to mention one, relevant, historical point. One of the reasons that sections got collapsed together was to save size. This is the same reason you see the page size/section alignment set to 0x20 (32 bytes). 32 bytes was the smallest alignment the VC++ would support back in the day. In recent times the runtime code got converted to 4K section alignment so the OS could provide better page based protection. That ended up not being too bad as all that code is stored compressed, and it compresses well. Usually the biggest size risk is PEI as it is common for chunks of that code to run directly from ROM, and you would be surprised how much complexity can be involved in turning on DRAM, and that makes for larger PEIMs.
Thanks,
Andrew Fish
>>
>>>
>>>>>> We should double check what is happening for ELF on x86, ARM, RiskV, etc. and do the same thing. I assume all the tools that generate PE/COFF directly are good with .rodata?
>>>>> They are not, that is the whole point of the patch in its current shape. .rodata is valid for ELF and Mach-O, PE/COFF needs .rdata.
>>>>>
>>>>>> I think it is likely as simple as dumping the EFL object file in objdump or gdb for the given toolchain (like my Xcode example).
>>>>>>
>>>>>> TL;DR It looks to me like nasm does some SECTION translations under the hood to make code portable, and I’d like to make sure we capture those in the new NASM_RODATA_SECTION_NAME. If some one is doing a security review having NASM_RODATA_SECTION_NAME is going to imply that a .rodata section is being used by that specific toolchain, and I think that is much worse than the current “magic” behavior in nasm. We are much better off explaining what is really happening, since it is not very obvious.
>>>>> I feel like I'm too tired to get the point. Do you mean you want comments whenever this section name is used? Or comments in tools_def?
>>>>>
>>>> I think I’d settle for a more descriptive commit comment that better defines what the define means like I mentioned in the other mail.
>>>
>>> Hmm no, we can do that too, but in that case I really want comments in the code. tools_def is not really documented at all, maybe it is time to introduce an example comment so at least new things get commented? Maybe just the start of a macro list. Relying on "git blame" to figure out simple things is rather awful.
>>>
>>> One more thing from another thread: Yes, the new macro should refer to object file section naming. I want this patch to get object file sections proper and sound. From there on we can fix the linking stage to emit proper and sound executables in a later patch.
>>>
>>
>> OK then please refactor the commit message to make it clear that this patch is to get the correct section in the object files, and work is still need to get this into executable images.
>
> Sure.
>
>>
>> For Xcode you can make it __DATA__,__const since that is the closest thing to read only data and I think that is your intent.
>
> I would like to do that, but only if we can ensure __DATA,__const is merged into .text, or is a separate RNX section.
>
>>
>> GenFW is part of EDKII BaseTools and mtoc is part of the open source CCTOOLS project and both those tools would need to be modified to create a .rodata section in PE/COFF.
>
> Yes, that should not be a big problem. Remaining issues for me:
> 1) How to merge __DATA,__const into .text, or how to emit a standalone .rodata section, for Xcode-based toolchains? (Some ideas above, will ping Vitaly soon as well)
> 2) How to submit modified mtoc? Any chance it could be maintained in EDK II like GenFw? (Would be nice if you could provide some insight)
> 3) How to merge .rdata into .text for MSVC? (I will try to research this soon-ish, but no promises)
> 4) How to design a toggle for the platform maintainer to choose between .text merge and standalone .rodata?
>
> Please note that I'm not asking you to research any of those questions (but 2) would be nice :) ), this is merely a summary of open points till the second stage (correct executables, not just correct object sections) can be properly approached.
>
> Thanks for your time and insight!
>
> Best regards,
> Marvin
>
>
> [1] https://github.com/apple/darwin-xnu/blob/a1babec6b135d1f35b2590a1990af3c5c5393479/osfmk/arm/arm_vm_init.c#L318-L324
>
> [2] https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/makedefs/MakeInc.def#L578
>
> [3] https://github.com/apple/darwin-xnu/blob/8f02f2a044b9bb1ad951987ef5bab20ec9486310/libsa/lastkerneldataconst.c#L48
>
>>
>> Thanks,
>>
>> Andrew Fish
>>
>>> Best regards,
>>> Marvin
>>>
>>>>
>>>> Thanks,
>>>>
>>>> Andrew Fish
>>>>
>>>>> Best regards,
>>>>> Marvin
>>>>>
>>>>>> [1] https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14 <https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14> <https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14 <https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14>>
>>>>>>
>>>>>> [2] $otool -V -s __TEXT __constBuild/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>>>>>> Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
>>>>>> Contents of (__TEXT,__const) section
>>>>>> 0000001d 7f 03 80 1f 00 00
>>>>>>
>>>>>> $ otool -l Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>>>>>> Build/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
>>>>>> Load command 0
>>>>>> cmd LC_SEGMENT_64
>>>>>> cmdsize 232
>>>>>> segname
>>>>>> vmaddr 0x0000000000000000
>>>>>> vmsize 0x0000000000000026
>>>>>> fileoff 288
>>>>>> filesize 38
>>>>>> maxprot 0x00000007
>>>>>> initprot 0x00000007
>>>>>> nsects 2
>>>>>> flags 0x0
>>>>>> Section
>>>>>> sectname __text
>>>>>> segname __TEXT
>>>>>> addr 0x0000000000000000
>>>>>> size 0x000000000000001d
>>>>>> offset 288
>>>>>> align 2^0 (1)
>>>>>> reloff 328
>>>>>> nreloc 2
>>>>>> flags 0x80000500
>>>>>> reserved1 0
>>>>>> reserved2 0
>>>>>> Section
>>>>>> sectname __const
>>>>>> segname __TEXT
>>>>>> addr 0x000000000000001d
>>>>>> size 0x0000000000000006
>>>>>> offset 320
>>>>>> align 2^0 (1)
>>>>>> reloff 0
>>>>>> nreloc 0
>>>>>> flags 0x00000000
>>>>>> reserved1 0
>>>>>> reserved2 0
>>>>>> Load command 1
>>>>>> cmd LC_SYMTAB
>>>>>> cmdsize 24
>>>>>> symoff 344
>>>>>> nsyms 3
>>>>>> stroff 392
>>>>>> strsize 63
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Andrew Fish
>>>>>>
>>>>>>
>>>>>>> Thanks for your notes and insight!
>>>>>>>
>>>>>>> Best regards,
>>>>>>> Marvin
>>>>>>>
>>>>>>>
>>>>>>> [1]
>>>>>>> "For compatibility with other Unix platforms, the following standard names are also supported:
>>>>>>> [...]
>>>>>>> .rodata = __DATA,__const data
>>>>>>> [...]
>>>>>>> If the .rodata section contains no relocations, it is instead put into the __TEXT,__const section unless this section has already been specified explicitly."
>>>>>>> https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html <https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html> <https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html <https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html>>
>>>>>>>
>>>>>>>> [1] otool -lh DxeCore.dll
>>>>>>>> ...
>>>>>>>> Load command 1
>>>>>>>> cmd LC_SEGMENT_64
>>>>>>>> cmdsize 312
>>>>>>>> segname __DATA
>>>>>>>> vmaddr 0x000000000002b000
>>>>>>>> vmsize 0x0000000000147000
>>>>>>>> fileoff 180224
>>>>>>>> filesize 8192
>>>>>>>> maxprot 0x00000003
>>>>>>>> initprot 0x00000003
>>>>>>>> nsects 3
>>>>>>>> flags 0x0
>>>>>>>> Section
>>>>>>>> sectname __const
>>>>>>>> segname __DATA
>>>>>>>> addr 0x000000000002b000
>>>>>>>> size 0x0000000000000718
>>>>>>>> offset 180224
>>>>>>>> align 2^4 (16)
>>>>>>>> reloff 0
>>>>>>>> nreloc 0
>>>>>>>> flags 0x00000000
>>>>>>>> reserved1 0
>>>>>>>> reserved2 0
>>>>>>>> Section
>>>>>>>> sectname __data
>>>>>>>> segname __DATA
>>>>>>>> addr 0x000000000002b720
>>>>>>>> size 0x00000000000014f0
>>>>>>>> offset 182048
>>>>>>>> align 2^4 (16)
>>>>>>>> reloff 0
>>>>>>>> nreloc 0
>>>>>>>> flags 0x00000000
>>>>>>>> reserved1 0
>>>>>>>> reserved2 0
>>>>>>>> Section
>>>>>>>> sectname __bss
>>>>>>>> segname __DATA
>>>>>>>> addr 0x000000000002cc10
>>>>>>>> size 0x0000000000144e11
>>>>>>>> offset 0
>>>>>>>> align 2^4 (16)
>>>>>>>> reloff 0
>>>>>>>> nreloc 0
>>>>>>>> flags 0x00000001
>>>>>>>> reserved1 0
>>>>>>>> reserved2 0
>>>>>>>> …
>>>>>>>>
>>>>>>>> [2] https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html> <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html>>
>>>>>>>>
>>>>>>>> [3] otool more output…
>>>>>>>> Load command 0
>>>>>>>> cmd LC_SEGMENT_64
>>>>>>>> cmdsize 392
>>>>>>>> segname __TEXT
>>>>>>>> vmaddr 0x0000000000000240
>>>>>>>> vmsize 0x00000000000296c0
>>>>>>>> fileoff 1184
>>>>>>>> filesize 169664
>>>>>>>> maxprot 0x00000005
>>>>>>>> initprot 0x00000005
>>>>>>>> nsects 4
>>>>>>>> flags 0x0
>>>>>>>> Section
>>>>>>>> sectname __text
>>>>>>>> segname __TEXT
>>>>>>>> addr 0x0000000000000240
>>>>>>>> size 0x000000000002489f
>>>>>>>> offset 1184
>>>>>>>> align 2^3 (8)
>>>>>>>> reloff 0
>>>>>>>> nreloc 0
>>>>>>>> flags 0x80000400
>>>>>>>> reserved1 0
>>>>>>>> reserved2 0
>>>>>>>> Section
>>>>>>>> sectname __cstring
>>>>>>>> segname __TEXT
>>>>>>>> addr 0x0000000000024ae0
>>>>>>>> size 0x000000000000496d
>>>>>>>> offset 150848
>>>>>>>> align 2^4 (16)
>>>>>>>> reloff 0
>>>>>>>> nreloc 0
>>>>>>>> flags 0x00000002
>>>>>>>> reserved1 0
>>>>>>>> reserved2 0
>>>>>>>> Section
>>>>>>>> sectname __ustring
>>>>>>>> segname __TEXT
>>>>>>>> addr 0x000000000002944e
>>>>>>>> size 0x0000000000000048
>>>>>>>> offset 169646
>>>>>>>> align 2^1 (2)
>>>>>>>> reloff 0
>>>>>>>> nreloc 0
>>>>>>>> flags 0x00000000
>>>>>>>> reserved1 0
>>>>>>>> reserved2 0
>>>>>>>> Section
>>>>>>>> sectname __const
>>>>>>>> segname __TEXT
>>>>>>>> addr 0x00000000000294a0
>>>>>>>> size 0x0000000000000448
>>>>>>>> offset 169728
>>>>>>>> align 2^4 (16)
>>>>>>>> reloff 0
>>>>>>>> nreloc 0
>>>>>>>> flags 0x00000000
>>>>>>>> reserved1 0
>>>>>>>> reserved2 0
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> Andrew Fish
>>>>>>>>
>>>>>>>>>
>>>>>>>>> DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
>>>>>>>>>
>>>>>>>>> @@ -3003,7 +3003,7 @@ RELEASE_XCODE5_X64_DLINK_FLAGS = -arch x86_64 -u _$(IMAGE_ENTRY_POINT) -e _
>>>>>>>>> DEBUG_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>>>>>>
>>>>>>>>> NOOPT_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>>>>>>
>>>>>>>>> RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64
>>>>>>>>>
>>>>>>>>> - *_XCODE5_X64_NASM_FLAGS = -f macho64
>>>>>>>>>
>>>>>>>>> + *_XCODE5_X64_NASM_FLAGS = -f macho64 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>
>>>>>>>>> *_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h
>>>>>>>>>
>>>>>>>>> *_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include $(MODULE_NAME)StrDefs.h
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> 2.31.1
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>>>
>>>
>>
>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 4/7] ArmPkg/DefaultExceptionHandlerLib: Check DebugImageInfoTable type safely
2021-08-09 21:19 ` Marvin Häuser
@ 2021-08-16 9:50 ` Ard Biesheuvel
0 siblings, 0 replies; 42+ messages in thread
From: Ard Biesheuvel @ 2021-08-16 9:50 UTC (permalink / raw)
To: Marvin Häuser
Cc: edk2-devel-groups-io, Leif Lindholm, Ard Biesheuvel,
Vitaly Cheptsov
On Mon, 9 Aug 2021 at 23:19, Marvin Häuser <mhaeuser@posteo.de> wrote:
>
> On 09/08/2021 14:40, Marvin Häuser wrote:
> > On 09/08/2021 13:55, Ard Biesheuvel wrote:
> >> On Mon, 9 Aug 2021 at 11:51, Marvin Häuser <mhaeuser@posteo.de> wrote:
> >>> C does not allow casting to or dereferencing incompatible pointer
> >>> types. Use the ImageInfoType member of the union first to determine
> >>> the data type before dereferencing NormalImage.
> >>>
> >>> Cc: Leif Lindholm <leif@nuviainc.com>
> >>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> >>> Cc: Vitaly Cheptsov <vit9696@protonmail.com>
> >>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
> >> Hi Marvin,
> >>
> >> Could you please organize your patches into a consistent series,
> >> include a cover letter and cc me on everything?
> >
> > Hey Ard,
> >
> > It's a series and there is a cover letter at:
> > https://edk2.groups.io/g/devel/topic/patch_v2_0_7_fix_various/84764899?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,84764899
> > The mails from yesterday can certainly be discarded, for some reason
> > format-patch did not number the patches without the argument.
> > The mails from today are numbered and there is a cover letter, but for
> > some reason the threading is all wrong in Thunderbird for me. All
> > subsequent patches have the "In-Reply-To" header in the patch files, I
> > think it is supposed to work off of that? Is threading broken for you
> > as well? Any idea what could have gone wrong?
>
> Today I learned two things.
>
> 1) Both format-patch and send-email support threading individually, and
> they don't cooperate [1].
>
> 2) Groups.io does not like patch sets [2].
>
> *Sigh*. Sorry.
>
No worries.
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain
[not found] ` <169AB0F8BD9C50BA.13770@groups.io>
@ 2021-08-16 21:13 ` Andrew Fish
0 siblings, 0 replies; 42+ messages in thread
From: Andrew Fish @ 2021-08-16 21:13 UTC (permalink / raw)
To: edk2-devel-groups-io, Andrew Fish
Cc: Marvin Häuser, Bob Feng, Liming Gao, Yuwei Chen,
Vitaly Cheptsov
[-- Attachment #1: Type: text/plain, Size: 73164 bytes --]
Just ran across this today and wanted to share. The NASM Chapter 7 [1] defines the behavior for .rodata for ELF and mach-O .
So the behavior is well defined. From
7.8.1 macho extensions to the SECTION Directive
...
The default is data, unless the section name is __text or __bss in which case the default is text or bss, respectively.
For compatibility with other Unix platforms, the following standard names are also supported:
.text = __TEXT,__text text
.rodata = __DATA,__const data
.data = __DATA,__data data
.bss = __DATA,__bss bss
If the .rodata section contains no relocations, it is instead put into the __TEXT,__const section unless this section has already been specified explicitly. However, it is probably better to specify __TEXT,__const and__DATA,__const explicitly as appropriate.
[1] https://www.nasm.us/xdoc/2.13.02rc3/html/nasmdoc7.html
> On Aug 12, 2021, at 3:53 PM, Andrew Fish via groups.io <afish=apple.com@groups.io> wrote:
>
>
>
>> On Aug 12, 2021, at 12:26 AM, Marvin Häuser <mhaeuser@posteo.de> wrote:
>>
>> On 11/08/2021 19:19, Andrew Fish wrote:
>>>
>>>
>>>> On Aug 11, 2021, at 1:11 AM, Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>> wrote:
>>>>
>>>> On 10/08/2021 23:58, Andrew Fish wrote:
>>>>>
>>>>>> On Aug 10, 2021, at 2:30 PM, Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>> wrote:
>>>>>>
>>>>>> On 10/08/2021 21:35, Andrew Fish via groups.io <http://groups.io> wrote:
>>>>>>>
>>>>>>>> On Aug 10, 2021, at 1:27 AM, Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>> wrote:
>>>>>>>>
>>>>>>>> On 10/08/2021 06:19, Andrew Fish via groups.io <http://groups.io> <http://groups.io <http://groups.io>> wrote:
>>>>>>>>>
>>>>>>>>>> On Aug 9, 2021, at 2:51 AM, Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3318 <https://bugzilla.tianocore.org/show_bug.cgi?id=3318> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318 <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318 <https://bugzilla.tianocore.org/show_bug.cgi?id=3318> <https://bugzilla.tianocore.org/show_bug.cgi?id=3318 <https://bugzilla.tianocore.org/show_bug.cgi?id=3318>>>
>>>>>>>>>>
>>>>>>>>>> Different toolchains of the EDK II build system may generate ELF or
>>>>>>>>>> Mach-O files, which use the ".rodata" naming convention, or PE/COFF
>>>>>>>>>> files, which use the ".rdata" naming convention. Section permissions
>>>>>>>>>> are chosen based on this name per file format by NASM. To harden
>>>>>>>>>> image permission security, and to save space by avoiding both
>>>>>>>>>> ".rdata" and ".rodata" sections being emitted, expose the appropriate
>>>>>>>>>> name as a preprocessor constant.
>>>>>>>>>>
>>>>>>>>>> Cc: Bob Feng <bob.c.feng@intel.com <mailto:bob.c.feng@intel.com> <mailto:bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>> <mailto:bob.c.feng@intel.com <mailto:bob.c.feng@intel.com> <mailto:bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>>>>
>>>>>>>>>> Cc: Liming Gao <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> <mailto:gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>> <mailto:gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> <mailto:gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>>>>
>>>>>>>>>> Cc: Yuwei Chen <yuwei.chen@intel.com <mailto:yuwei.chen@intel.com> <mailto:yuwei.chen@intel.com <mailto:yuwei.chen@intel.com>> <mailto:yuwei.chen@intel.com <mailto:yuwei.chen@intel.com> <mailto:yuwei.chen@intel.com <mailto:yuwei.chen@intel.com>>>>
>>>>>>>>>> Cc: Vitaly Cheptsov <vit9696@protonmail.com <mailto:vit9696@protonmail.com> <mailto:vit9696@protonmail.com <mailto:vit9696@protonmail.com>> <mailto:vit9696@protonmail.com <mailto:vit9696@protonmail.com> <mailto:vit9696@protonmail.com <mailto:vit9696@protonmail.com>>>>
>>>>>>>>>> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de> <mailto:mhaeuser@posteo.de <mailto:mhaeuser@posteo.de>>>>
>>>>>>>>>> ---
>>>>>>>>>> BaseTools/Conf/tools_def.template | 172 ++++++++++----------
>>>>>>>>>> 1 file changed, 86 insertions(+), 86 deletions(-)
>>>>>>>>>>
>>>>>>>>>> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
>>>>>>>>>> index 2e6b382ab623..84d464916c4d 100755
>>>>>>>>>> --- a/BaseTools/Conf/tools_def.template
>>>>>>>>>> +++ b/BaseTools/Conf/tools_def.template
>>>>>>>>>> @@ -463,9 +463,9 @@ NOOPT_VS2008_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>>>> RELEASE_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2008_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2008_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -495,9 +495,9 @@ NOOPT_VS2008_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>>>> RELEASE_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2008_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2008_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2008_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -574,9 +574,9 @@ NOOPT_VS2008x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>>>> RELEASE_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2008x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2008x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -605,9 +605,9 @@ NOOPT_VS2008x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>>>> RELEASE_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2008x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2008x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -688,9 +688,9 @@ NOOPT_VS2010_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>>>> RELEASE_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2010_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2010_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -720,9 +720,9 @@ NOOPT_VS2010_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>>>> RELEASE_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2010_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2010_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2010_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -799,9 +799,9 @@ NOOPT_VS2010x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>>>> RELEASE_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2010x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2010x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -831,9 +831,9 @@ NOOPT_VS2010x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>>>> RELEASE_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2010x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2010x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -913,9 +913,9 @@ NOOPT_VS2012_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>>>>> RELEASE_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2012_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2012_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2012_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -945,9 +945,9 @@ NOOPT_VS2012_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>>>> RELEASE_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2012_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2012_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2012_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2012_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -1024,9 +1024,9 @@ NOOPT_VS2012x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>>>>> RELEASE_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2012x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2012x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2012x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -1056,9 +1056,9 @@ NOOPT_VS2012x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>>>> RELEASE_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2012x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2012x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2012x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -1138,9 +1138,9 @@ NOOPT_VS2013_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>>>>> RELEASE_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2013_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2013_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2013_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2013_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -1170,9 +1170,9 @@ NOOPT_VS2013_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>>>> RELEASE_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2013_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2013_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2013_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2013_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -1249,9 +1249,9 @@ NOOPT_VS2013x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>>>>> RELEASE_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2013x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2013x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2013x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2013x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -1281,9 +1281,9 @@ NOOPT_VS2013x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>>>> RELEASE_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2013x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2013x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2013x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -1364,9 +1364,9 @@ NOOPT_VS2015_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>>>>> RELEASE_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -1396,9 +1396,9 @@ NOOPT_VS2015_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>>>> RELEASE_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -1476,9 +1476,9 @@ NOOPT_VS2015x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768
>>>>>>>>>> RELEASE_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -1508,9 +1508,9 @@ NOOPT_VS2015x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
>>>>>>>>>> RELEASE_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -1586,9 +1586,9 @@ NOOPT_VS2017_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>>>>>>>> RELEASE_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -1616,9 +1616,9 @@ NOOPT_VS2017_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>>>> RELEASE_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -1744,9 +1744,9 @@ NOOPT_VS2019_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D
>>>>>>>>>> RELEASE_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -1774,9 +1774,9 @@ NOOPT_VS2019_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /G
>>>>>>>>>> RELEASE_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
>>>>>>>>>>
>>>>>>>>>> NOOPT_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> - DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g
>>>>>>>>>>
>>>>>>>>>> -RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64
>>>>>>>>>>
>>>>>>>>>> -NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g
>>>>>>>>>>
>>>>>>>>>> + DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> +NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
>>>>>>>>>>
>>>>>>>>>> RELEASE_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
>>>>>>>>>>
>>>>>>>>>> @@ -2030,7 +2030,7 @@ DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include A
>>>>>>>>>> *_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
>>>>>>>>>>
>>>>>>>>>> *_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>>>>
>>>>>>>>>> *_GCC48_IA32_OBJCOPY_FLAGS =
>>>>>>>>>>
>>>>>>>>>> -*_GCC48_IA32_NASM_FLAGS = -f elf32
>>>>>>>>>>
>>>>>>>>>> +*_GCC48_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
>>>>>>>>>>
>>>>>>>>>> RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable
>>>>>>>>>>
>>>>>>>>>> @@ -2058,7 +2058,7 @@ RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>>>>>>>> *_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
>>>>>>>>>>
>>>>>>>>>> *_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>>>>
>>>>>>>>>> *_GCC48_X64_OBJCOPY_FLAGS =
>>>>>>>>>>
>>>>>>>>>> -*_GCC48_X64_NASM_FLAGS = -f elf64
>>>>>>>>>>
>>>>>>>>>> +*_GCC48_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
>>>>>>>>>>
>>>>>>>>>> RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable
>>>>>>>>>>
>>>>>>>>>> @@ -2170,7 +2170,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
>>>>>>>>>> *_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
>>>>>>>>>>
>>>>>>>>>> *_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>>>>
>>>>>>>>>> *_GCC49_IA32_OBJCOPY_FLAGS =
>>>>>>>>>>
>>>>>>>>>> -*_GCC49_IA32_NASM_FLAGS = -f elf32
>>>>>>>>>>
>>>>>>>>>> +*_GCC49_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
>>>>>>>>>>
>>>>>>>>>> RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>>>>>>>
>>>>>>>>>> @@ -2198,7 +2198,7 @@ RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but
>>>>>>>>>> *_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
>>>>>>>>>>
>>>>>>>>>> *_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>>>>
>>>>>>>>>> *_GCC49_X64_OBJCOPY_FLAGS =
>>>>>>>>>>
>>>>>>>>>> -*_GCC49_X64_NASM_FLAGS = -f elf64
>>>>>>>>>>
>>>>>>>>>> +*_GCC49_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
>>>>>>>>>>
>>>>>>>>>> RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
>>>>>>>>>>
>>>>>>>>>> @@ -2316,7 +2316,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
>>>>>>>>>> *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
>>>>>>>>>>
>>>>>>>>>> *_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>>>>
>>>>>>>>>> *_GCC5_IA32_OBJCOPY_FLAGS =
>>>>>>>>>>
>>>>>>>>>> -*_GCC5_IA32_NASM_FLAGS = -f elf32
>>>>>>>>>>
>>>>>>>>>> +*_GCC5_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Os
>>>>>>>>>>
>>>>>>>>>> DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
>>>>>>>>>>
>>>>>>>>>> @@ -2348,7 +2348,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,
>>>>>>>>>> *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
>>>>>>>>>>
>>>>>>>>>> *_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>>>>
>>>>>>>>>> *_GCC5_X64_OBJCOPY_FLAGS =
>>>>>>>>>>
>>>>>>>>>> -*_GCC5_X64_NASM_FLAGS = -f elf64
>>>>>>>>>>
>>>>>>>>>> +*_GCC5_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO -Os
>>>>>>>>>>
>>>>>>>>>> DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
>>>>>>>>>>
>>>>>>>>>> @@ -2589,7 +2589,7 @@ DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNIN
>>>>>>>>>> *_CLANG38_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANG38_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>>>>
>>>>>>>>>> *_CLANG38_IA32_OBJCOPY_FLAGS =
>>>>>>>>>>
>>>>>>>>>> -*_CLANG38_IA32_NASM_FLAGS = -f elf32
>>>>>>>>>>
>>>>>>>>>> +*_CLANG38_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>>
>>>>>>>>>> *_CLANG38_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANG38_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANG38_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>>>>>
>>>>>>>>>> @@ -2626,7 +2626,7 @@ NOOPT_CLANG38_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -O0
>>>>>>>>>> *_CLANG38_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANG38_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>>>>
>>>>>>>>>> *_CLANG38_X64_OBJCOPY_FLAGS =
>>>>>>>>>>
>>>>>>>>>> -*_CLANG38_X64_NASM_FLAGS = -f elf64
>>>>>>>>>>
>>>>>>>>>> +*_CLANG38_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>>
>>>>>>>>>> *_CLANG38_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANG38_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANG38_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>>>>>
>>>>>>>>>> @@ -2777,7 +2777,7 @@ DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARN
>>>>>>>>>> *_CLANGPDB_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32 -fno-lto DEF(CLANGPDB_IA32_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANGPDB_IA32_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m32 -march=i386 DEF(CLANGPDB_IA32_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANGPDB_IA32_OBJCOPY_FLAGS =
>>>>>>>>>>
>>>>>>>>>> -*_CLANGPDB_IA32_NASM_FLAGS = -f win32
>>>>>>>>>>
>>>>>>>>>> +*_CLANGPDB_IA32_NASM_FLAGS = -f win32 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> *_CLANGPDB_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANGPDB_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANGPDB_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>>>>>>>>>>
>>>>>>>>>> @@ -2811,7 +2811,7 @@ NOOPT_CLANGPDB_IA32_DLINK2_FLAGS =
>>>>>>>>>> *_CLANGPDB_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64 -fno-lto DEF(CLANGPDB_X64_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANGPDB_X64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m64 DEF(CLANGPDB_X64_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANGPDB_X64_OBJCOPY_FLAGS =
>>>>>>>>>>
>>>>>>>>>> -*_CLANGPDB_X64_NASM_FLAGS = -f win64
>>>>>>>>>>
>>>>>>>>>> +*_CLANGPDB_X64_NASM_FLAGS = -f win64 -DRODATA_SECTION_NAME=.rdata
>>>>>>>>>>
>>>>>>>>>> *_CLANGPDB_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANGPDB_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANGPDB_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
>>>>>>>>>>
>>>>>>>>>> @@ -2878,7 +2878,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
>>>>>>>>>> *_CLANGDWARF_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANG38_IA32_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANGDWARF_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
>>>>>>>>>>
>>>>>>>>>> *_CLANGDWARF_IA32_OBJCOPY_FLAGS =
>>>>>>>>>>
>>>>>>>>>> -*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32
>>>>>>>>>>
>>>>>>>>>> +*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>>
>>>>>>>>>> *_CLANGDWARF_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANGDWARF_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANGDWARF_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>>>>>>>>>>
>>>>>>>>>> @@ -2914,7 +2914,7 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -
>>>>>>>>>> *_CLANGDWARF_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG38_X64_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANGDWARF_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
>>>>>>>>>>
>>>>>>>>>> *_CLANGDWARF_X64_OBJCOPY_FLAGS =
>>>>>>>>>>
>>>>>>>>>> -*_CLANGDWARF_X64_NASM_FLAGS = -f elf64
>>>>>>>>>>
>>>>>>>>>> +*_CLANGDWARF_X64_NASM_FLAGS = -f elf64 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>>
>>>>>>>>>> *_CLANGDWARF_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANGDWARF_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>>>>>
>>>>>>>>>> *_CLANGDWARF_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_X64_TARGET)
>>>>>>>>>>
>>>>>>>>>> @@ -2985,7 +2985,7 @@ RELEASE_XCODE5_IA32_DLINK_FLAGS = -arch i386 -u _$(IMAGE_ENTRY_POINT) -e _$
>>>>>>>>>> DEBUG_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>>>>>>>
>>>>>>>>>> NOOPT_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
>>>>>>>>>>
>>>>>>>>>> RELEASE_XCODE5_IA32_ASM_FLAGS = -arch i386
>>>>>>>>>>
>>>>>>>>>> - *_XCODE5_IA32_NASM_FLAGS = -f macho32
>>>>>>>>>>
>>>>>>>>>> + *_XCODE5_IA32_NASM_FLAGS = -f macho32 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> An EFI Mach-O file does not contain a .rodata section. A Mach-O contains a __DATA segment that is broken up into sections. For a typical EFI image there are __const, __data, __bss sections in the __DATA segment [1].
>>>>>>>> Yes, and ".rodata" is almost a synonym for "__DATA,__const", with a small exception [1]. Maybe it'd be clearer if the macro was renamed to "NASM_RODATA_SECTION_NAME", to indicate this is not just a "raw" name, but NASM gives it a semantic meaning?
>>>>>>>>
>>>>>>>>> The mtoc [2] tool used to convert mach-O to PE/COFF converts the entire __DATA segment (__const, __data, and __bss) into the .data section. Thus adding any kind of new data section is a no-op at best.
>>>>>>>> This is a part I missed, because I do not have an Xcode toolchain at hand, so thanks for investigating. However this, in my opinion, is a flaw with Mach-O/mtoc and not with my patch. It seems like the only difference between __TEXT,__const and __DATA,__const is whether the data is targeted by a relocation or not. Such a concept does not exist for PE/COFF (and I think not even for ELF, but I'm not too familiar with it), thus the logical PE/COFF section __DATA,__const should be merged into is .rdata (and .rdata may or may not be merged into .text in an earlier step, I assume transitivity). I could change the macro definition to explicitly declare __TEXT,__const, but that would still put the compiler-emitted data in the wrong section. Does Xcode provide anything remotely similar to GNU linker scripts which we can use to move the section?
>>>>>>>>
>>>>>>>> Please also note that .rodata is used for Xcode-based toolchains already (in fact, all toolchains, and this is the issue), I'm not regressing anything. I just expected it to work fine as-is. This patch mainly fixed PE/COFF-based toolchains, which get both .rdata from the compiler and .rodata with RX permissions from NASM, because ".rodata" only has a semantic meaning for ELF and Mach-O outputs, but not for PE/COFF.
>>>>>>>>
>>>>>>>>> If you want something to be read only for Xcode/clang you are better off putting it in the __TEXT section [3]. The __TEXT section is read only and for X64 can not even contain relocations.
>>>>>>>> Well, this kind of is an issue. We would need to introduce an arbitrary constraint on the relocation part that holds only for Xcode-based toolchains. Does the compiler emit an error when data in __TEXT,__const is targeted by a relocation?
>>>>>>> The Xcode linker emits a fatal error on X64 for a relocation in the __TEXT section, everything needs to be RIP relative and the compiler does that for free. We generally only run into this for hand coded assembler and the fix is to use RIP relative addressing in the assembly.
>>>>>> Good, thanks for confirming! Still, this would be a bit of an awkward constraints for Xcode only.
>>>>>>
>>>>> It is a physics problem we can’t fix, so I end up writing some patches to fix other peoples assembler from time to time. The CI building with Xcode helps with this a lot.
>>>>
>>>> (I think all open ends of the other threads are in here too, so let's drop them and go on only here?)
>>>>
>>>> Right, ok, thanks!
>>>>
>>>>>>>> Also see above regarding compiler-emitted __DATA,__const.
>>>>>>>>
>>>>>>> OK so the current nasm `SECTION .rodata`[1] gets mapped to __TEXT,__const[2] for Xcode clang, and this is done by nasm (I dumped the object file). GenFw and mtoc only run on executables, also they tend to be conservative as they need to keep the layout the same and the relative layout between sections the same, but in this case it is nasm placing the data in the text section.
>>>>>>>
>>>>>>> So what I’d like to see in the patch is to define RODATA_SECTION_NAME to match what is actually happening. So for XCODE that would be `__TEXT,__const` not `.rodata`.
>>>>>> We can do that, but what to do about compiler-emitted __DATA,__const?
>>>>> Sorry I don’t understand what RODATA_SECTION_NAME has to do with the compiler? I thought it was for nasm?
>>>>
>>>> Yes, it is for NASM. My point is, the actual issue is not that my macro uses __DATA,__const, but that __DATA,__const is not merged into .text, but into .data. Fixing the macro fixes where the NASM definitions go, but what about the C definitions? I cannot test it, as I said, because I don't have an Xcode machine, but let's say we have a stupid example like this:
>>>>
>>>> volatile UINT32 a;
>>>> volatile UINT32 *CONST p = &a;
>>>>
>>>
>>> In this case p ends up in a __DATA__,__const section since &a requires a relocation.
>>
>> OK, good, thanks!
>>
>>>
>>>
>>>> The value of p is constant, so it can be placed in a constant data section. p points to a global variable, so if the compiler does not manage to somehow turn this into relative addressing (let's assume it does not), it needs to generate a relocation. This means the compiler cannot put it in __TEXT,__const, so it has to put it in __DATA,__const (of course it could put it in other __DATA sections, but let's assume the compiler agrees this should be read-only). The very same issue will arise and no matter the choice of the compiler, this will end up in .data. Do you agree? Or do we have some guarantee that Apple Clang cannot emit __DATA,__const?
>>>
>>> I don’t see your bigger point. The compiler is free to implement as it sees fit. Which section some code ends up in is more of an implementation detail for the compiler, and we can’t really depend on that?
>>
>> Your point, rightfully, was that things that we request to be read-only (may) end up being read-write. My issue is that, if the compiler requests this pointer to be read-only (it may not, but also it may), our PE executable does not honour it either. __DATA,__const is a section for constant data, and we put it into a read-write section. The bigger point is, whenever the compile stack wants something read-only (be that NASM or be that Apple Clang, anything really), we should actually ensure it is read-only. I can do that for only NASM by forcing the __TEXT,__const section name (at the cost of prohibiting relocs), but I do not know how to do it for Apple Clang. At worst we could take a hacked-ish solution, where all Mach-O segments are converted to PE/COFF sections - with the exception of the __DATA,__const section, which, if aligned on a segment alignment boundary, can be inserted between the two other parts .data is split into. I read in the XNU source that the ARM protection code does something roughly like this [1], but I'm really far from well-versed in the deep details of macOS.
>>
>> Sorry for this not being "integrated" in above text, but I found two more things while looking for citation 1.
>>
>> 1) Mach-O sections can be renamed, including the preceding segment name [2]. According to the very next line, the example actually creates a new segment. Does it allow merging into another, existing segment? What if I did something like:
>>
>> -Wl,-rename_section,__DATA,__const,__TEXT,__const2
>>
>> or even
>>
>> -Wl,-rename_section,__DATA,__const,__TEXT,__const
>>
>> i.e. can it merge two sections together? if __DATA,__const had data with relocs, would the renaming trigger the "no relocs" error of __TEXT, or does that happen before section renaming? Any chance it can be turned off?
>>
>> 1.1) Actually, for the standalone .rodata section, we can just rename it to __DATA_CONST,__const, as I have seen elsewhere in XNU. No hacked-ish solution needed. :)
>>
>> 2) We actually can force the compiler to put data in the constant data segment [3]. This is of course not used in EDK II, and probably neither portable nor necessary, but an interesting detail. I really think we should honour it either way.
>>
>> I will likely try to get my hands on some sort of Apple development environment soon, but I cannot promise much right now. I think it really is better if I can test through all toolchains myself. If you release Apple Clang for Linux, I also won't complain of course. :)
>>
>
> When I ask compiler questions to my compiler peeps they sometime answer via: https://godbolt.org <https://godbolt.org/>. You can pas -emit-llvm, -S, or actually run code all from the webpage. It lets you compare the output of lots of versions of clang and compare it with other compilers too. You might find that useful for your research.
>
> For EFI/EDKII clang is mostly just clang (strange triple for x86_64). It is ld64 that is macOS specific, and there is not cross version of ld64 that I know about.
>
> FYI I worked really closely with the owner of ld64, Nick, when we got EFI working. What looks like the strange set of args is what is required to make ld64 “do the right thing”. The biggest portability issue with ld64 is it does not support the GCC ld linker scripts.
>
>
> I think I’ve forgotten to mention one, relevant, historical point. One of the reasons that sections got collapsed together was to save size. This is the same reason you see the page size/section alignment set to 0x20 (32 bytes). 32 bytes was the smallest alignment the VC++ would support back in the day. In recent times the runtime code got converted to 4K section alignment so the OS could provide better page based protection. That ended up not being too bad as all that code is stored compressed, and it compresses well. Usually the biggest size risk is PEI as it is common for chunks of that code to run directly from ROM, and you would be surprised how much complexity can be involved in turning on DRAM, and that makes for larger PEIMs.
>
> Thanks,
>
> Andrew Fish
>
>>>
>>>>
>>>>>>> We should double check what is happening for ELF on x86, ARM, RiskV, etc. and do the same thing. I assume all the tools that generate PE/COFF directly are good with .rodata?
>>>>>> They are not, that is the whole point of the patch in its current shape. .rodata is valid for ELF and Mach-O, PE/COFF needs .rdata.
>>>>>>
>>>>>>> I think it is likely as simple as dumping the EFL object file in objdump or gdb for the given toolchain (like my Xcode example).
>>>>>>>
>>>>>>> TL;DR It looks to me like nasm does some SECTION translations under the hood to make code portable, and I’d like to make sure we capture those in the new NASM_RODATA_SECTION_NAME. If some one is doing a security review having NASM_RODATA_SECTION_NAME is going to imply that a .rodata section is being used by that specific toolchain, and I think that is much worse than the current “magic” behavior in nasm. We are much better off explaining what is really happening, since it is not very obvious.
>>>>>> I feel like I'm too tired to get the point. Do you mean you want comments whenever this section name is used? Or comments in tools_def?
>>>>>>
>>>>> I think I’d settle for a more descriptive commit comment that better defines what the define means like I mentioned in the other mail.
>>>>
>>>> Hmm no, we can do that too, but in that case I really want comments in the code. tools_def is not really documented at all, maybe it is time to introduce an example comment so at least new things get commented? Maybe just the start of a macro list. Relying on "git blame" to figure out simple things is rather awful.
>>>>
>>>> One more thing from another thread: Yes, the new macro should refer to object file section naming. I want this patch to get object file sections proper and sound. From there on we can fix the linking stage to emit proper and sound executables in a later patch.
>>>>
>>>
>>> OK then please refactor the commit message to make it clear that this patch is to get the correct section in the object files, and work is still need to get this into executable images.
>>
>> Sure.
>>
>>>
>>> For Xcode you can make it __DATA__,__const since that is the closest thing to read only data and I think that is your intent.
>>
>> I would like to do that, but only if we can ensure __DATA,__const is merged into .text, or is a separate RNX section.
>>
>>>
>>> GenFW is part of EDKII BaseTools and mtoc is part of the open source CCTOOLS project and both those tools would need to be modified to create a .rodata section in PE/COFF.
>>
>> Yes, that should not be a big problem. Remaining issues for me:
>> 1) How to merge __DATA,__const into .text, or how to emit a standalone .rodata section, for Xcode-based toolchains? (Some ideas above, will ping Vitaly soon as well)
>> 2) How to submit modified mtoc? Any chance it could be maintained in EDK II like GenFw? (Would be nice if you could provide some insight)
>> 3) How to merge .rdata into .text for MSVC? (I will try to research this soon-ish, but no promises)
>> 4) How to design a toggle for the platform maintainer to choose between .text merge and standalone .rodata?
>>
>> Please note that I'm not asking you to research any of those questions (but 2) would be nice :) ), this is merely a summary of open points till the second stage (correct executables, not just correct object sections) can be properly approached.
>>
>> Thanks for your time and insight!
>>
>> Best regards,
>> Marvin
>>
>>
>> [1] https://github.com/apple/darwin-xnu/blob/a1babec6b135d1f35b2590a1990af3c5c5393479/osfmk/arm/arm_vm_init.c#L318-L324
>>
>> [2] https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/makedefs/MakeInc.def#L578
>>
>> [3] https://github.com/apple/darwin-xnu/blob/8f02f2a044b9bb1ad951987ef5bab20ec9486310/libsa/lastkerneldataconst.c#L48
>>
>>>
>>> Thanks,
>>>
>>> Andrew Fish
>>>
>>>> Best regards,
>>>> Marvin
>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Andrew Fish
>>>>>
>>>>>> Best regards,
>>>>>> Marvin
>>>>>>
>>>>>>> [1] https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14 <https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14> <https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14 <https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm#L14>>
>>>>>>>
>>>>>>> [2] $otool -V -s __TEXT __constBuild/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>>>>>>> Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
>>>>>>> Contents of (__TEXT,__const) section
>>>>>>> 0000001d 7f 03 80 1f 00 00
>>>>>>>
>>>>>>> $ otool -l Build//OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj
>>>>>>> Build/OvmfX64/DEBUG_XCODE5/X64/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib/OUTPUT/X64/InitializeFpu.obj:
>>>>>>> Load command 0
>>>>>>> cmd LC_SEGMENT_64
>>>>>>> cmdsize 232
>>>>>>> segname
>>>>>>> vmaddr 0x0000000000000000
>>>>>>> vmsize 0x0000000000000026
>>>>>>> fileoff 288
>>>>>>> filesize 38
>>>>>>> maxprot 0x00000007
>>>>>>> initprot 0x00000007
>>>>>>> nsects 2
>>>>>>> flags 0x0
>>>>>>> Section
>>>>>>> sectname __text
>>>>>>> segname __TEXT
>>>>>>> addr 0x0000000000000000
>>>>>>> size 0x000000000000001d
>>>>>>> offset 288
>>>>>>> align 2^0 (1)
>>>>>>> reloff 328
>>>>>>> nreloc 2
>>>>>>> flags 0x80000500
>>>>>>> reserved1 0
>>>>>>> reserved2 0
>>>>>>> Section
>>>>>>> sectname __const
>>>>>>> segname __TEXT
>>>>>>> addr 0x000000000000001d
>>>>>>> size 0x0000000000000006
>>>>>>> offset 320
>>>>>>> align 2^0 (1)
>>>>>>> reloff 0
>>>>>>> nreloc 0
>>>>>>> flags 0x00000000
>>>>>>> reserved1 0
>>>>>>> reserved2 0
>>>>>>> Load command 1
>>>>>>> cmd LC_SYMTAB
>>>>>>> cmdsize 24
>>>>>>> symoff 344
>>>>>>> nsyms 3
>>>>>>> stroff 392
>>>>>>> strsize 63
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Andrew Fish
>>>>>>>
>>>>>>>
>>>>>>>> Thanks for your notes and insight!
>>>>>>>>
>>>>>>>> Best regards,
>>>>>>>> Marvin
>>>>>>>>
>>>>>>>>
>>>>>>>> [1]
>>>>>>>> "For compatibility with other Unix platforms, the following standard names are also supported:
>>>>>>>> [...]
>>>>>>>> .rodata = __DATA,__const data
>>>>>>>> [...]
>>>>>>>> If the .rodata section contains no relocations, it is instead put into the __TEXT,__const section unless this section has already been specified explicitly."
>>>>>>>> https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html <https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html> <https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html <https://www.nasm.us/xdoc/2.13.01/html/nasmdoc7.html>>
>>>>>>>>
>>>>>>>>> [1] otool -lh DxeCore.dll
>>>>>>>>> ...
>>>>>>>>> Load command 1
>>>>>>>>> cmd LC_SEGMENT_64
>>>>>>>>> cmdsize 312
>>>>>>>>> segname __DATA
>>>>>>>>> vmaddr 0x000000000002b000
>>>>>>>>> vmsize 0x0000000000147000
>>>>>>>>> fileoff 180224
>>>>>>>>> filesize 8192
>>>>>>>>> maxprot 0x00000003
>>>>>>>>> initprot 0x00000003
>>>>>>>>> nsects 3
>>>>>>>>> flags 0x0
>>>>>>>>> Section
>>>>>>>>> sectname __const
>>>>>>>>> segname __DATA
>>>>>>>>> addr 0x000000000002b000
>>>>>>>>> size 0x0000000000000718
>>>>>>>>> offset 180224
>>>>>>>>> align 2^4 (16)
>>>>>>>>> reloff 0
>>>>>>>>> nreloc 0
>>>>>>>>> flags 0x00000000
>>>>>>>>> reserved1 0
>>>>>>>>> reserved2 0
>>>>>>>>> Section
>>>>>>>>> sectname __data
>>>>>>>>> segname __DATA
>>>>>>>>> addr 0x000000000002b720
>>>>>>>>> size 0x00000000000014f0
>>>>>>>>> offset 182048
>>>>>>>>> align 2^4 (16)
>>>>>>>>> reloff 0
>>>>>>>>> nreloc 0
>>>>>>>>> flags 0x00000000
>>>>>>>>> reserved1 0
>>>>>>>>> reserved2 0
>>>>>>>>> Section
>>>>>>>>> sectname __bss
>>>>>>>>> segname __DATA
>>>>>>>>> addr 0x000000000002cc10
>>>>>>>>> size 0x0000000000144e11
>>>>>>>>> offset 0
>>>>>>>>> align 2^4 (16)
>>>>>>>>> reloff 0
>>>>>>>>> nreloc 0
>>>>>>>>> flags 0x00000001
>>>>>>>>> reserved1 0
>>>>>>>>> reserved2 0
>>>>>>>>> …
>>>>>>>>>
>>>>>>>>> [2] https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html> <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html <https://opensource.apple.com/source/cctools/cctools-698/efitools/mtoc.c.auto.html>>
>>>>>>>>>
>>>>>>>>> [3] otool more output…
>>>>>>>>> Load command 0
>>>>>>>>> cmd LC_SEGMENT_64
>>>>>>>>> cmdsize 392
>>>>>>>>> segname __TEXT
>>>>>>>>> vmaddr 0x0000000000000240
>>>>>>>>> vmsize 0x00000000000296c0
>>>>>>>>> fileoff 1184
>>>>>>>>> filesize 169664
>>>>>>>>> maxprot 0x00000005
>>>>>>>>> initprot 0x00000005
>>>>>>>>> nsects 4
>>>>>>>>> flags 0x0
>>>>>>>>> Section
>>>>>>>>> sectname __text
>>>>>>>>> segname __TEXT
>>>>>>>>> addr 0x0000000000000240
>>>>>>>>> size 0x000000000002489f
>>>>>>>>> offset 1184
>>>>>>>>> align 2^3 (8)
>>>>>>>>> reloff 0
>>>>>>>>> nreloc 0
>>>>>>>>> flags 0x80000400
>>>>>>>>> reserved1 0
>>>>>>>>> reserved2 0
>>>>>>>>> Section
>>>>>>>>> sectname __cstring
>>>>>>>>> segname __TEXT
>>>>>>>>> addr 0x0000000000024ae0
>>>>>>>>> size 0x000000000000496d
>>>>>>>>> offset 150848
>>>>>>>>> align 2^4 (16)
>>>>>>>>> reloff 0
>>>>>>>>> nreloc 0
>>>>>>>>> flags 0x00000002
>>>>>>>>> reserved1 0
>>>>>>>>> reserved2 0
>>>>>>>>> Section
>>>>>>>>> sectname __ustring
>>>>>>>>> segname __TEXT
>>>>>>>>> addr 0x000000000002944e
>>>>>>>>> size 0x0000000000000048
>>>>>>>>> offset 169646
>>>>>>>>> align 2^1 (2)
>>>>>>>>> reloff 0
>>>>>>>>> nreloc 0
>>>>>>>>> flags 0x00000000
>>>>>>>>> reserved1 0
>>>>>>>>> reserved2 0
>>>>>>>>> Section
>>>>>>>>> sectname __const
>>>>>>>>> segname __TEXT
>>>>>>>>> addr 0x00000000000294a0
>>>>>>>>> size 0x0000000000000448
>>>>>>>>> offset 169728
>>>>>>>>> align 2^4 (16)
>>>>>>>>> reloff 0
>>>>>>>>> nreloc 0
>>>>>>>>> flags 0x00000000
>>>>>>>>> reserved1 0
>>>>>>>>> reserved2 0
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>> Andrew Fish
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
>>>>>>>>>>
>>>>>>>>>> @@ -3003,7 +3003,7 @@ RELEASE_XCODE5_X64_DLINK_FLAGS = -arch x86_64 -u _$(IMAGE_ENTRY_POINT) -e _
>>>>>>>>>> DEBUG_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>>>>>>>
>>>>>>>>>> NOOPT_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
>>>>>>>>>>
>>>>>>>>>> RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64
>>>>>>>>>>
>>>>>>>>>> - *_XCODE5_X64_NASM_FLAGS = -f macho64
>>>>>>>>>>
>>>>>>>>>> + *_XCODE5_X64_NASM_FLAGS = -f macho64 -DRODATA_SECTION_NAME=.rodata
>>>>>>>>>>
>>>>>>>>>> *_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h
>>>>>>>>>>
>>>>>>>>>> *_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include $(MODULE_NAME)StrDefs.h
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> 2.31.1
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 106219 bytes --]
^ permalink raw reply [flat|nested] 42+ messages in thread
end of thread, other threads:[~2021-08-16 21:13 UTC | newest]
Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-09 9:51 [PATCH v2 0/7] Fix various issues regarding DebugImageInfoTable Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 2/2] UefiCpuPkg/BaseUefiCpuLib: Use toolchain-specific rodata section name Marvin Häuser
2021-08-10 2:43 ` Ni, Ray
2021-08-10 4:40 ` [edk2-devel] " Andrew Fish
2021-08-10 8:43 ` Marvin Häuser
2021-08-10 4:19 ` [edk2-devel] [PATCH v2 1/2] BaseTools: Define the read-only data section name per toolchain Andrew Fish
2021-08-10 8:27 ` Marvin Häuser
2021-08-10 19:35 ` Andrew Fish
2021-08-10 21:30 ` Marvin Häuser
2021-08-10 21:58 ` Andrew Fish
2021-08-11 8:11 ` Marvin Häuser
2021-08-11 17:19 ` Andrew Fish
2021-08-12 7:26 ` Marvin Häuser
2021-08-12 20:25 ` Marvin Häuser
2021-08-12 22:53 ` Andrew Fish
[not found] ` <169AB0F8BD9C50BA.13770@groups.io>
2021-08-16 21:13 ` Andrew Fish
[not found] ` <169A090BBBBE12C1.15606@groups.io>
2021-08-10 19:49 ` Andrew Fish
2021-08-10 21:24 ` Marvin Häuser
2021-08-10 21:54 ` Andrew Fish
2021-08-09 9:51 ` [PATCH v2 1/7] MdeModulePkg/DxeCore: Consistent DebugImageInfoTable updates Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 1/2] MdePkg/BaseLib: Fix unaligned API prototypes Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 2/2] BaseTools/CommonLib: " Marvin Häuser
2021-08-09 16:15 ` [PATCH v2 1/2] MdePkg/BaseLib: " Michael D Kinney
2021-08-09 21:32 ` [edk2-devel] " Andrew Fish
2021-08-10 8:53 ` Marvin Häuser
2021-08-10 17:36 ` Andrew Fish
2021-08-10 21:14 ` Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 1/2] SecurityPkg/DxeImageVerificationLib: Fix certificate lookup algorithm Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 2/2] SecurityPkg/SecureBootConfigDxe: " Marvin Häuser
2021-08-12 1:12 ` [edk2-devel] " Min Xu
2021-08-12 1:11 ` [edk2-devel] [PATCH v2 1/2] SecurityPkg/DxeImageVerificationLib: " Min Xu
2021-08-09 9:51 ` [PATCH v2 2/7] MdeModulePkg/DxeCore: Fix DebugImageInfoTable size report Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 3/7] EmbeddedPkg/GdbStub: Check DebugImageInfoTable type safely Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 4/7] ArmPkg/DefaultExceptionHandlerLib: " Marvin Häuser
2021-08-09 11:55 ` Ard Biesheuvel
2021-08-09 12:40 ` [edk2-devel] " Marvin Häuser
2021-08-09 21:19 ` Marvin Häuser
2021-08-16 9:50 ` Ard Biesheuvel
2021-08-09 9:51 ` [PATCH v2 5/7] MdeModulePkg/CoreDxe: Mandatory LoadedImage for DebugImageInfoTable Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 6/7] EmbeddedPkg/GdbStub: " Marvin Häuser
2021-08-09 9:51 ` [PATCH v2 7/7] ArmPkg/DefaultExceptionHandlerLib: " Marvin Häuser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox