What compiler flags do I use to completely get rid of the exception handling? I don't use them at all but the compiler still generates .pdata and .xdata sections which there for exception handling only.
In your project properties set the Enable C++ Exceptions to No:
and enable the unwind semantics by specifying the /EHsc
flag:
To set this option on command line you would leave out the /EHa
, /EHsc
and /EHs
flags from the [option]
section as described in the Compiler Command-Line Syntax manual.
Further relevant MSDN reading: