2017-04-10 11:32:00 +00:00
|
|
|
.section my_section,"aw",@progbits
|
|
|
|
.long 0x12345678
|
2014-09-12 22:14:23 +00:00
|
|
|
.text
|
|
|
|
.globl foo
|
|
|
|
.type foo, @function
|
|
|
|
foo:
|
|
|
|
ret
|
|
|
|
.size foo, .-foo
|
|
|
|
.globl _start
|
|
|
|
.type _start, @function
|
|
|
|
_start:
|
2017-04-10 11:32:00 +00:00
|
|
|
movl foo@GOTPCREL(%rip), %eax
|
|
|
|
movl bar@GOTPCREL(%rip), %r11d
|
2014-09-12 22:14:23 +00:00
|
|
|
movq foo@GOTPCREL(%rip), %rax
|
2017-04-10 11:32:00 +00:00
|
|
|
movq bar@GOTPCREL(%rip), %r11
|
|
|
|
movq __start_my_section@GOTPCREL(%rip), %rax
|
|
|
|
movq __stop_my_section@GOTPCREL(%rip), %r11
|
2014-09-12 22:14:23 +00:00
|
|
|
.size _start, .-_start
|
2017-04-10 11:32:00 +00:00
|
|
|
.comm pad,4,4
|
|
|
|
.comm bar,4,4
|