[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Generate map files and enable integrity check



Enable linker options to generates map files, to help debugging crashdumps
Adds map files to output package
Add /INTEGRITYCHECK to linker options

https://learn.microsoft.com/en-us/cpp/build/reference/map-generate-mapfile?view=msvc-170
https://learn.microsoft.com/en-us/cpp/build/reference/mapinfo-include-information-in-mapfile?view=msvc-170
https://learn.microsoft.com/en-us/cpp/build/reference/integritycheck-require-signature-check?view=msvc-170

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxx>
---
 vs2019/xennet/xennet.vcxproj | 4 ++++
 vs2022/xennet/xennet.vcxproj | 6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/vs2019/xennet/xennet.vcxproj b/vs2019/xennet/xennet.vcxproj
index 5549d9b..cfc70b0 100644
--- a/vs2019/xennet/xennet.vcxproj
+++ b/vs2019/xennet/xennet.vcxproj
@@ -34,8 +34,11 @@
     </ResourceCompile>
     <Link>
       
<AdditionalDependencies>$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/aux_klib.lib;$(DDK_LIB_PATH)/procgrp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalOptions>/INTEGRITYCHECK 
%(AdditionalOptions)</AdditionalOptions>
       
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
       <CETCompat>true</CETCompat>
+      <GenerateMapFile>true</GenerateMapFile>
+      <MapExports>true</MapExports>
     </Link>
     <DriverSign>
       <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
@@ -68,6 +71,7 @@
 <ItemGroup>
     <FilesToPackage Include="$(TargetPath)" />
     <FilesToPackage Include="$(OutDir)$(TargetName).pdb" />
+    <FilesToPackage Include="$(OutDir)$(TargetName).map" />
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="../../src/xennet/adapter.c" />
diff --git a/vs2022/xennet/xennet.vcxproj b/vs2022/xennet/xennet.vcxproj
index 159b9a5..c97a158 100644
--- a/vs2022/xennet/xennet.vcxproj
+++ b/vs2022/xennet/xennet.vcxproj
@@ -34,8 +34,11 @@
     </ResourceCompile>
     <Link>
       
<AdditionalDependencies>$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/aux_klib.lib;$(DDK_LIB_PATH)/procgrp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalOptions>/INTEGRITYCHECK 
%(AdditionalOptions)</AdditionalOptions>
       
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
       <CETCompat>true</CETCompat>
+      <GenerateMapFile>true</GenerateMapFile>
+      <MapExports>true</MapExports>
     </Link>
     <DriverSign>
       <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
@@ -56,9 +59,10 @@
       <AdditionalOptions>/Qspectre %(AdditionalOptions)</AdditionalOptions>
     </ClCompile>
   </ItemDefinitionGroup>
-<ItemGroup>
+  <ItemGroup>
     <FilesToPackage Include="$(TargetPath)" />
     <FilesToPackage Include="$(OutDir)$(TargetName).pdb" />
+    <FilesToPackage Include="$(OutDir)$(TargetName).map" />
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="../../src/xennet/adapter.c" />
-- 
2.41.0.windows.3




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.