aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthijs Lavrijsen <mattiwatti@gmail.com>2023-03-26 20:50:13 +0200
committerMatthijs Lavrijsen <mattiwatti@gmail.com>2023-03-26 20:50:13 +0200
commit383aea8793ad97011ae97648d2338cd003bd1923 (patch)
treef7e1f29fd8b88114ed4ab3c4a52e89aa938a2549
parent8b673b91c650deec5876f57da961a6727f77f6f0 (diff)
Clean up linker optionsv1.3
-rw-r--r--EfiGuard.props3
-rw-r--r--EfiGuardDxe/EfiGuardDxe.vcxproj1
-rw-r--r--EfiGuardPkg.dsc4
3 files changed, 3 insertions, 5 deletions
diff --git a/EfiGuard.props b/EfiGuard.props
index 4663324..aa2c7ce 100644
--- a/EfiGuard.props
+++ b/EfiGuard.props
@@ -57,7 +57,6 @@
<EnableCOMDATFolding />
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<BaseAddress>0</BaseAddress>
- <SectionAlignment>4096</SectionAlignment>
<SetChecksum>true</SetChecksum>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<RandomizedBaseAddress />
@@ -68,7 +67,7 @@
<UACExecutionLevel />
<UACUIAccess />
<TypeLibraryResourceID />
- <AdditionalOptions>/SECTION:.xdata,D /SECTION:.pdata,D /OPT:ICF=10 /IGNORE:4254 /IGNORE:4281 /NOVCFEATURE /NOCOFFGRPINFO /PDBALTPATH:%_PDB% %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalOptions>/ALIGN:0x200 /FILEALIGN:0x200 /SECTION:.pdata,!D /SECTION:.xdata,!D /OPT:ICF=10 /IGNORE:4254 /IGNORE:4281 /NOVCFEATURE /NOCOFFGRPINFO /PDBALTPATH:%_PDB% %(AdditionalOptions)</AdditionalOptions>
<MergeSections>.rdata=.text</MergeSections>
<LinkErrorReporting />
<ProfileGuidedDatabase />
diff --git a/EfiGuardDxe/EfiGuardDxe.vcxproj b/EfiGuardDxe/EfiGuardDxe.vcxproj
index b0e2373..0b95d46 100644
--- a/EfiGuardDxe/EfiGuardDxe.vcxproj
+++ b/EfiGuardDxe/EfiGuardDxe.vcxproj
@@ -33,7 +33,6 @@
<Link>
<AdditionalDependencies>UefiDriverEntryPoint.lib;BaseMemoryLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>EFI Runtime</SubSystem>
- <SectionAlignment>4096</SectionAlignment>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
diff --git a/EfiGuardPkg.dsc b/EfiGuardPkg.dsc
index 4c998af..49fddb3 100644
--- a/EfiGuardPkg.dsc
+++ b/EfiGuardPkg.dsc
@@ -87,8 +87,8 @@
MSFT:*_*_*_CC_FLAGS = /Qspectre-
# Use sane linker flags instead of EDK2 defaults
- MSFT:*_*_*_DLINK_FLAGS = /ALIGN:0x1000 /FILEALIGN:0x200 /SECTION:.pdata,!D /MERGE:.rdata=.text /DEBUG:FULL /NOVCFEATURE /NOCOFFGRPINFO /PDBALTPATH:%_PDB%
- INTEL:*_*_*_DLINK_FLAGS = /ALIGN:0x1000 /FILEALIGN:0x200 /SECTION:.pdata,!D /MERGE:.rdata=.text /DEBUG:FULL /NOVCFEATURE /NOCOFFGRPINFO /PDBALTPATH:%_PDB%
+ MSFT:*_*_*_DLINK_FLAGS = /ALIGN:0x1000 /FILEALIGN:0x200 /SECTION:.pdata,!D /SECTION:.xdata,!D /MERGE:.rdata=.text /DEBUG:FULL /NOVCFEATURE /NOCOFFGRPINFO /PDBALTPATH:%_PDB%
+ INTEL:*_*_*_DLINK_FLAGS = /ALIGN:0x1000 /FILEALIGN:0x200 /SECTION:.pdata,!D /SECTION:.xdata,!D /MERGE:.rdata=.text /DEBUG:FULL /NOVCFEATURE /NOCOFFGRPINFO /PDBALTPATH:%_PDB%
!if $(TOOL_CHAIN_TAG) != "XCODE5" && $(TOOL_CHAIN_TAG) != "CLANGPDB"
GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
!else if $(TOOL_CHAIN_TAG) == "CLANGPDB"