linux - Minimal example to compile & run assembly with gcc? -


int main(int argc, char* argv[]) {   return 0; } 

what's shortest assembly example same can compiled executable gcc?

i came across this example there're many tags hi_temp:,.data etc,what's minimal version?

.text     .align 4     .globl main main:      pushl %ebp      movl %esp,%ebp      xorl %eax,%eax      leave      ret 

to compile , run:

$ gcc -m32 asm.s $ ./a.out 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -