Skip to content

Commit

Permalink
Clean up linker options
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattiwatti committed Mar 26, 2023
1 parent 8b673b9 commit 383aea8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions EfiGuard.props
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
<EnableCOMDATFolding />
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<BaseAddress>0</BaseAddress>
<SectionAlignment>4096</SectionAlignment>
<SetChecksum>true</SetChecksum>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<RandomizedBaseAddress />
Expand All @@ -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 />
Expand Down
1 change: 0 additions & 1 deletion EfiGuardDxe/EfiGuardDxe.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<Link>
<AdditionalDependencies>UefiDriverEntryPoint.lib;BaseMemoryLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>EFI Runtime</SubSystem>
<SectionAlignment>4096</SectionAlignment>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions EfiGuardPkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 383aea8

Please sign in to comment.