2008-03-17 06:26:23 +08:00
|
|
|
.protected foo
|
|
|
|
.globl foo
|
|
|
|
.data
|
|
|
|
.align 4
|
|
|
|
.type foo, @object
|
|
|
|
.size foo, 4
|
|
|
|
foo:
|
|
|
|
.long 1
|
|
|
|
.text
|
|
|
|
.globl bar
|
|
|
|
.type bar, @function
|
|
|
|
bar:
|
2015-03-05 22:34:39 +08:00
|
|
|
movl foo@GOT(%ecx), %eax
|
|
|
|
movl (%eax), %eax
|
2008-03-17 06:26:23 +08:00
|
|
|
ret
|
|
|
|
.size bar, .-bar
|