Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove IMAGE_DEBUG_DIRECTORY from .rdata section

How can I remove IMAGE_DEBUG_DIRECTORY data from .rdata section of PE?

I am using MS Visual Studio 2015. I did check almost all compile options of project properties. But IMAGE_DEBUG_DIRECTORY data still exists in my output executable file...

like image 249
ChangUk Avatar asked Sep 04 '26 09:09

ChangUk


1 Answers

you can do this by set undocumented Linker Option /EMITPOGOPHASEINFO. so go to linker command line and insert this string (/EMITPOGOPHASEINFO) in additional options. this option suppress pgo (Profile-Guided Optimizations) section in pe

read also : Pogo aka PGO aka Profile Guided Optimization and Walkthrough: Using Profile-Guided Optimizations

and of course you must not Generate Debug Info - use /DEBUG linker option - so sure that no /DEBUG option in linker command line. or alternatively use /DEBUG:NONE /EMITPOGOPHASEINFO combination - in this case must not be IMAGE_DEBUG_DIRECTORY in pe file

like image 74
RbMm Avatar answered Sep 07 '26 03:09

RbMm



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!