R
raashid bhatt
i am compiling my c program with MSVC its just a simple program
int main()
{
int a;
++a; // INC assembly instruction
return 0; // RET instruction
}
then i compile it
cl /O1 /c sample.c
link /SUBSYSTEM:CONSOLE /ENTRY:main /NODEFAULTLIB sample.obj
i compiled the program with the removal of libc but when i disassemble
the program i dont get the INC instruction
i only get this
XOR EAX,EAX
RET
Rather than
INC ADDRESS_OF_VAR
RET
int main()
{
int a;
++a; // INC assembly instruction
return 0; // RET instruction
}
then i compile it
cl /O1 /c sample.c
link /SUBSYSTEM:CONSOLE /ENTRY:main /NODEFAULTLIB sample.obj
i compiled the program with the removal of libc but when i disassemble
the program i dont get the INC instruction
i only get this
XOR EAX,EAX
RET
Rather than
INC ADDRESS_OF_VAR
RET