What is the most straightforward way to determine which asm
a server is using? For example, I have the following C program:
int main(void) { int i = 4; return i;}
And compiled to assembly via $ gcc -S main.c
I get:
1 .file "main.c" 2 .text 3 .globl main 4 .type main, @function 5 main: 6 .LFB0: 7 .cfi_startproc 8 pushq %rbp 9 .cfi_def_cfa_offset 16 10 .cfi_offset 6, -16 11 movq %rsp, %rbp 12 .cfi_def_cfa_register 6 13 movl $4, -4(%rbp) 14 movl -4(%rbp), %eax 15 popq %rbp 16 .cfi_def_cfa 7, 8 17 ret 18 .cfi_endproc 19 .LFE0: 20 .size main, .-main 21 .ident "GCC: (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4" 22 .section .note.GNU-stack,"",@progbits
I would like to use https://godbolt.org/ to select the closest language to compile online, but I'm not sure which one I should select (or even how to figure out how I can determine that). Basically all I know is "it looks like ATT syntax". How can I figure that out?