[ipxe-devel] Unrecognised relocation type R_X86_64_32S in	util/elf2efi64
    Michael Brown 
    mcb30 at ipxe.org
       
    Thu Feb 12 11:05:53 UTC 2015
    
    
  
On 12/02/15 10:49, Jan Kundrát wrote:
> On Thursday, 12 February 2015 11:34:28 CEST, Michael Brown wrote:
>> Could you identify some of these relocations within the original
>> object files?  Something like:
>>
>>   objdump -dr bin-x86_64-efi/*.o | grep -C50 R_X86_64_32S
>
> Uploaded to http://jkt.flaska.net/R_X86_64_32S.bz2 . I'm afraid I cannot
> interpret these data.
Thanks.  The problem seems to be that your build is not generating 
position-independent code.  One simple example is in x509_alloc_chain(), 
where my build generates
   14:   48 8d 0d 00 00 00 00    lea    0x0(%rip),%rcx        # 1b 
<x509_alloc_chain+0x1b>
                         17: R_X86_64_PC32       .text.x509_free_chain-0x4
but your build generates
   14:   48 c7 40 08 00 00 00    movq   $0x0,0x8(%rax)
   1b:   00
                         18: R_X86_64_32S        .text.x509_free_chain
I'm fairly sure there's no way to generate an equivalent PE relocation 
for R_X86_64_32S, since UEFI allows objects to be loaded anywhere within 
the 64-bit address space.
The question is therefore why your build is failing to consistently 
generate position-independent code.  Could you check the build command 
line using
   make bin-x86_64-efi/x509.o.rebuild V=1
and also confirm which git revision you are building (e.g. via "git log")?
Thanks,
Michael
    
    
More information about the ipxe-devel
mailing list