我已经创建了DLL的生产版本。在使用virustotal扫描它时,我注意到报告调试信息的结果在文件中,如下所示。有人可以告诉我这个调试信息是什么,我该如何删除它?该DLL来自使用Visual Studio Community 2017构建的c ++。
在有人给我一个通用的建议之前,有一个好的做法是获得调试信息,我想说不,我不需要调试信息,也不希望其他人得到这个调试信息。
DLL的DUMPBIN /标头如下:
PE signature found
File Type: DLL
FILE HEADER VALUES
14C machine (x86)
5 number of sections
58FBCD28 time date stamp Sat Apr 22 22:37:44 2017
0 file pointer to symbol table
0 number of symbols
E0 size of optional header
2102 characteristics
Executable
32 bit word machine
DLL
OPTIONAL HEADER VALUES
10B magic # (PE32)
14.10 linker version
10800 size of code
9800 size of initialized data
0 size of uninitialized data
2E64 entry point (10002E64)
1000 base of code
12000 base of data
10000000 image base (10000000 to 1001DFFF)
1000 section alignment
200 file alignment
6.00 operating system version
0.00 image version
6.00 subsystem version
0 Win32 version
1E000 size of image
400 size of headers
0 checksum
2 subsystem (Windows GUI)
140 DLL characteristics
Dynamic base
NX compatible
100000 size of stack reserve
1000 size of stack commit
100000 size of heap reserve
1000 size of heap commit
0 loader flags
10 number of directories
17E40 [ 14C] RVA [size] of Export Directory
17F8C [ 50] RVA [size] of Import Directory
1B000 [ 1E0] RVA [size] of Resource Directory
0 [ 0] RVA [size] of Exception Directory
0 [ 0] RVA [size] of Certificates Directory
1C000 [ 11CC] RVA [size] of Base Relocation Directory
17780 [ 38] RVA [size] of Debug Directory
0 [ 0] RVA [size] of Architecture Directory
0 [ 0] RVA [size] of Global Pointer Directory
0 [ 0] RVA [size] of Thread Storage Directory
177B8 [ 40] RVA [size] of Load Configuration Directory
0 [ 0] RVA [size] of Bound Import Directory
12000 [ 188] RVA [size] of Import Address Table Directory
0 [ 0] RVA [size] of Delay Import Directory
0 [ 0] RVA [size] of COM Descriptor Directory
0 [ 0] RVA [size] of Reserved Directory
SECTION HEADER #1
.text name
1069A virtual size
1000 virtual address (10001000 to 10011699)
10800 size of raw data
400 file pointer to raw data (00000400 to 00010BFF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
60000020 flags
Code
Execute Read
SECTION HEADER #2
.rdata name
6834 virtual size
12000 virtual address (10012000 to 10018833)
6A00 size of raw data
10C00 file pointer to raw data (00010C00 to 000175FF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
40000040 flags
Initialized Data
Read Only
Debug Directories
Time Type Size RVA Pointer
-------- ------- -------- -------- --------
58FBCD28 coffgrp 264 0001782C 1642C 4C544347 (LTCG)
58FBCD28 iltcg 0 00000000 0
SECTION HEADER #3
.data name
1884 virtual size
19000 virtual address (10019000 to 1001A883)
800 size of raw data
17600 file pointer to raw data (00017600 to 00017DFF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
C0000040 flags
Initialized Data
Read Write
SECTION HEADER #4
.rsrc name
1E0 virtual size
1B000 virtual address (1001B000 to 1001B1DF)
200 size of raw data
17E00 file pointer to raw data (00017E00 to 00017FFF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
40000040 flags
Initialized Data
Read Only
SECTION HEADER #5
.reloc name
11CC virtual size
1C000 virtual address (1001C000 to 1001D1CB)
1200 size of raw data
18000 file pointer to raw data (00018000 to 000191FF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
42000040 flags
Initialized Data
Discardable
Read Only
Summary
2000 .data
7000 .rdata
2000 .reloc
1000 .rsrc
11000 .text
答案 0 :(得分:2)
要消除调试目录,请将/NOCOFFGRPINFO
完全添加到链接器命令行,并关闭链接器/优化下的链接时间代码生成(即删除/LTCG
),默认情况下为发布版本启用VS2017。