.text
.type foo, @gnu_indirect_function
.globl foo
foo:
leaq __foo(%rip), %rax
retq
.type __foo, @function
__foo:
retq
.type _start, @function
.globl _start
_start:
call foo
1: jmp 1b
$ as -o t.o t.s
$ ld -static -o t t.o
$ readelf -Wr t
Relocation section '.rela.plt' at offset 0xb0 contains 1 ent
--- Additional Comments From scott dot sourceware dot 2009 at scottrix dot
co dot uk 2009-11-06 09:40 ---
Applied the patches to binutils-2.20 and it makes no difference to the
segmentation fault. I also added the line:
.rel.dyn : { *(.rel.dyn.rel.dyn.*) }
to the memtest86 mem