#include <stdio.h>
//変数属性の指定 nocommon
int x __attribute__ ((nocommon));
int main(void)
{
printf("xの値----%d\n",x);
return 0;
}
|
.file "test96.c"
.version "01.01"
gcc2_compiled.:
.section .rodata
.LC0:
.string "x\244\316\303\315----%d\n"
.text
.align 4
.globl main
.type main,@function
main:
pushl %ebp
movl %esp,%ebp
subl $8,%esp
addl $-8,%esp
movl x,%eax
pushl %eax
pushl $.LC0
call printf
addl $16,%esp
xorl %eax,%eax
jmp .L2
.p2align 4,,7
.L2:
movl %ebp,%esp
popl %ebp
ret
.Lfe1:
.size main,.Lfe1-main
.globl x
.bss
.align 4
.type x,@object
.size x,4
x:
.zero 4
.ident "GCC: (GNU) 2.95.3 20010315 (release)"
|