I am using MSVC 2019. I have compiled a simple C++ code (Hello World...). When I compile it in release mode in x86
architecture, there is a .reloc
section, but when I compile it in x64
architecture, the .reloc
section does not exist.
What is the reason of this? I need executables with a .reloc section.
Best regards.
EDIT - 1:
C/C++ Settigs:
/permissive- /GS- /GL /W3 /Gy /Zc:wchar_t /Zi /Gm- /O2 /sdl /Fd"x64\Release\vc142.pdb" /Zc:inline /fp:precise /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /Gd /Oi /MT /FC /Fa"x64\Release\" /EHsc /nologo /Fo"x64\Release\" /Fp"x64\Release\test-reloc.pch" /diagnostics:column
Linker Settings:
/OUT:"F:\Test\x64\Release\test-reloc.exe" /MANIFEST:NO /LTCG:incremental /NXCOMPAT /PDB:"F:\Test\x64\Release\test-reloc.pdb" /DYNAMICBASE "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /FIXED:NO /MACHINE:X64 /ENTRY:"relocMain" /OPT:REF /SAFESEH:NO /INCREMENTAL:NO /PGD:"F:\Test\x64\Release\test-reloc.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:NO /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /NODEFAULTLIB /TLBID:1