I'm learning reverse engineering. I trying to compile code to assembler view for better understanding. How I can disable any additional (redundancy) info in the assembler code? I want to only leave the pure assembler code
current command (windows) gcc -S .\test.c -masm=intel -O0
output:
.file "test.c"
.intel_syntax noprefix
.text
.def __main; .scl 2; .type 32; .endef
.globl main
.def main; .scl 2; .type 32; .endef
.seh_proc main
main:
push rbp
.seh_pushreg rbp
mov rbp, rsp
.seh_setframe rbp, 0
sub rsp, 32
.seh_stackalloc 32
.seh_endprologue
call __main
nop
add rsp, 32
pop rbp
ret
.seh_endproc
.ident "GCC: (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0"
This output produces redundancy info. For example, I can remove .file "test.c"
it does not affect anything.
Source:
void main() {
}