.intel_syntax noprefix
.globl _start
#if __x86_64__
.globl Main
.globl ExitProcess
#else
.globl _Main
.globl _ExitProcess@4
Main=_Main
ExitProcess=_ExitProcess@4
#endif
.text
_start:
call Main
#if __x86_64__
mov ecx, eax
#else
push eax
#endif
call ExitProcess
And can anybody tell me, if there is some compiler/linker directive to remove unused (i.e. no exported symbols) .edata section from exe filea forum about compiler would be the better place to ask
some version of gdb have a bug where they crash in assembly window. This is a known bug in gdb and should be fixed in the last versions (i think version 8.1 had the bug, but i am not sure)It's default version, provided in Code::Blocks 20.03 distribution. May be it would be good idea to change it? Is it safe to download newer version here (https://packages.msys2.org/package/mingw-w64-x86_64-gdb?repo=mingw64) or some specific version is compatible with Code::Blocks?
I was successful using gdb.exe version 8.1 with mingw 7.I'm new to this software. Where it's safe to download it? Troyans are reported by VirusTotal very often in 32bit versions of MinGW. Is it safe to download here (https://github.com/skeeto/w64devkit/releases)?
Also successful using gdb version 10 with mingw 8.1 .
All of this was used on windows 10.
I'm new to this software. Where it's safe to download it?1. https://github.com/niXman/mingw-builds-binaries - it might be considered like "original/official". It is continuation of the SourceForge https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/
Just in case: you can use 64b CB with 64b gdb with 32b code.I'm not sure about newer versions, but for old version I had to install 32bit gdb because breakpoints weren't working.
I'm not sure about newer versions, but for old version I had to install 32bit gdb because breakpoints weren't working.GDB64 start to support 32b code on Win since 11 (or10?) version.
If somebody is interested, for now problem with anti-virus is fixed via comparing my C++ code with similar ASM program, that doesn't have such problems. Looks like anti-viruses hate GetModuleHandle("KERNEL32.DLL"). It's better to use LoadLibrary/FreeLibrary instead.
Another question - why it's necessary to install 32bit gcc in order to compile for 32bit target (i.e. -m32)? Why there is no cross-compile option? According to error messages 64bit compiler can't find 32bit libraries when using -m32. So may be there is some way to configure paths instead of using 32bit compiler?
Another question - why it's necessary to install 32bit gcc in order to compile for 32bit target (i.e. -m32)? Why there is no cross-compile option? According to error messages 64bit compiler can't find 32bit libraries when using -m32. So may be there is some way to configure paths instead of using 32bit compiler?It is long story. Actually they exists, but likely you dont want them: "https://sourceforge.net/projects/mingw-w64/files/Multilib Toolchains(Targetting Win32 and Win64)/ "