gpt4 book ai didi

c++ - DLL 调试信息

转载 作者:搜寻专家 更新时间:2023-10-31 02:11:26 25 4
gpt4 key购买 nike

我已经创建了一个 DLL 的生产版本。在使用 virustotal 扫描它时,我注意到报告调试信息的结果在文件中,如下所示。有人可以告诉我这个调试信息是什么以及如何删除它吗? DLL 来自使用 Visual Studio Community 2017 构建的 c++。

在有人给我一般性建议之前,我想说的是,不,我不需要调试信息,也不希望其他任何人获得此调试信息。

enter image description here

DLL 的 DUMPBIN/header 如下:

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

最佳答案

要完全消除调试目录,请将 /NOCOFFGRPINFO 添加到链接器命令行,并在 Linker/Optimization 下关闭链接时间代码生成(即删除 /LTCG),这在 VS2017 中默认启用发布版本。

关于c++ - DLL 调试信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43569767/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com