[floss-cec] Re: Assembling using gcc.

  • From: "Vimal Joseph" <vimalekm@xxxxxxxxx>
  • To: floss-cec@xxxxxxxxxxxxx
  • Date: Mon, 29 Jan 2007 01:30:51 +0530

On 1/27/07, Binulal N Achary <binulal@xxxxxxxxx> wrote:

 binulal@binoos:~> cat test.c
 int main()
 {
   return 0;
 }
 binulal@binoos:~> cat test.s
         .file   "test.c"
         .text
 .globl main
         .type   main,@function
 main:
         pushl   %ebp
         movl    %esp, %ebp
         subl    $8, %esp
         andl    $-16, %esp
         movl    $0, %eax
         subl    %eax, %esp
         movl    $0, %eax
         leave
         ret
 .Lfe1:
         .size   main,.Lfe1-main
         .ident  "GCC: (GNU) 3.2.2"
 binulal@binoos:~>

Yuck... Ugly code! anyone to explain what on earth this means????

It's just AT&T Syntax assembly code generated by gcc for GNU assembler (gas).
see http://linuxgazette.net/issue94/ramankutty for an explanation
and also have a look at http://asm.sourceforge.net/howto and
http://savannah.nongnu.org/projects/pgubook/

~vimal
_______________________________________
FLOSS Cell Mailing List
College of Engineering Chengannur
floss-cec@xxxxxxxxxxxxx
http://www.freelists.org/list/floss-cec




Other related posts: