Displaying 1 result from an estimated 1 matches for "felf32".
Did you mean:
elf32
2018 Jun 05
2
lld mishandling R_X86_64_PC32 relocations
...'m producing the object file in a slightly unusual way: I'm using objcopy on a relocatable i386 ELF object file to convert it to x86_64 which transforms a R_386_PC32 into a R_X86_64_PC32.
Steps to reproduce:
1. Assemble the attached bug.asm using nasm and note the R_386_PC32 REL.
$ nasm -felf32 -o bug.o bug.asm
$ x86_64-elf-objdump -dr bug.o | grep -A1 -e '<_start>:'
00000000 <_start>:
0: e8 fc ff ff ff call 1 <_start+0x1>
$ x86_64-elf-readelf -r bug.o
Relocation section '.rel.text._start' at offset 0x260 contains 1 entry:
Offset Info...