[LLVMdev] How to prevent LLVM from emitting R_X86_64_32 ELF relocations?
jiwang at tilera.com
Fri Apr 26 20:36:59 PDT 2013
On 04/27/2013 11:02 AM, Yuri wrote:
> On 04/26/2013 19:50, Jiong Wang wrote:
>> why do you want to prevent R_X86_64_32 generation? for 32bit dwarf,
>> I think generation of R_X86_64_32 is reasonable.
>> you can check http://dwarfstd.org/doc/DWARF4.pdf.
> Because R_X86_64_32 elements are 4-byte addresses and can't be
> relocated for the 64-bit address space over 32-bit limit.
> Dwarf2 actually allows for both 32bit and 64-bit relocations. The
> document, mentioned by you, explains this in section 220.127.116.11 on page
> 143. If the first DWORD of .debug_info section is 0xffffffff, then
> this is 64-bit format.
> But LLVM for some reason always chooses DWARF 32-bit format. This is
> why I asked the question. Resulting relocable 64-bit objects can't be
> loaded into addresses that are over 32-bit limit.
there is no support for Dwarf 64 yet. From what I known, there is no way
you can get rid of that.
looks like there are some discussions on this already, you can search
More information about the llvm-dev