Displaying 2 results from an estimated 2 matches for "201014".
Did you mean:
20014
2019 Apr 04
3
question about --emit-relocs with lld
...1004: 48 8b 04 25 20 01 20 mov 0x200120,%rax
20100b: 00
201008: R_X86_64_32S .rodata
20100c: 48 89 45 f0 mov %rax,-0x10(%rbp)
201010: 48 8b 04 25 28 01 20 mov 0x200128,%rax
201017: 00
201014: R_X86_64_32S *ABS*+0x8
201018: 48 89 45 f8 mov %rax,-0x8(%rbp)
20101c: 5d pop %rbp
20101d: c3 retq
I'm not sure where to start looking for solving this...
Thanks!
-Kees
[1] https://github.com/ClangBuiltL...
2018 Jun 05
2
lld mishandling R_X86_64_PC32 relocations
...that the relocation has been misapplied. It's now calling foo+4 rather than foo.
$ ./llvm-build/bin/ld.lld -melf_x86_64 -o bug-lld bug-64.o
$ x86_64-elf-objdump -M i386 -d bug-64-lld | grep -A1 -e '<_start>:'
0000000000201000 <_start>:
201000: e8 0f 00 00 00 call 201014 <foo+0x4>
If you link with GNU ld instead, the relocation is applied correctly.
$ x86_64-elf-ld -melf_x86_64 -o bug-64-ld bug-64.o
$ x86_64-elf-objdump -M i386 -d bug-64-ld | grep -A1 -e '<_start>:'
0000000000400080 <_start>:
400080: e8 0b 00 00 00 call 400090...