about gcc code assembly

rookie asmrookie at gmail.com
Mon Oct 10 07:22:02 PDT 2005


Hi,
compiling something like:

#include <stdio.h>

static int a;

void f() { printf("%d\n", a); }

with:
> gcc -S -o trial.S trial.c

We got:

[snip]
...
.local a
.comm a, 4, 4
.ident "GCC: (GNU) 3.4.2 [FreeBSD] 20040728"


But using .lcomm would not be better? (.lcomm a, 4)

cheers,
Attilio

--
Peace can only be achieved by understanding - A. Einstein


More information about the freebsd-hackers mailing list