Yuri
2013-Apr-27 00:07 UTC
[LLVMdev] How to prevent LLVM from emitting R_X86_64_32 ELF relocations?
ELF module of type ET_REL (Relocable module), generated by LLVM, always has some R_X86_64_32 in debug information sections. This happens with Reloc models Default,Static,PIC_ and with CodeModel set to Large. What is the way to prevent R_X86_64_32 ELF from ever appearing in ELF? Yuri
Jiong Wang
2013-Apr-27 02:50 UTC
[LLVMdev] How to prevent LLVM from emitting R_X86_64_32 ELF relocations?
On 04/27/2013 08:07 AM, Yuri wrote:> ELF module of type ET_REL (Relocable module), generated by LLVM, > always has some R_X86_64_32 in debug information sections. > This happens with Reloc models Default,Static,PIC_ and with CodeModel > set to Large. > > What is the way to prevent R_X86_64_32 ELF from ever appearing in ELF?Hi Yuri, 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.> > Yuri > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-- Regards, Jiong. Wang Tilera Corporation.
Yuri
2013-Apr-27 03:02 UTC
[LLVMdev] How to prevent LLVM from emitting R_X86_64_32 ELF relocations?
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 7.5.1.1 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. Yuri
Apparently Analagous Threads
- [LLVMdev] How to prevent LLVM from emitting R_X86_64_32 ELF relocations?
- [LLVMdev] How to prevent LLVM from emitting R_X86_64_32 ELF relocations?
- [LLVMdev] How to prevent LLVM from emitting R_X86_64_32 ELF relocations?
- [LLVMdev] How to prevent LLVM from emitting R_X86_64_32 ELF relocations?
- [LLVMdev] How to prevent LLVM from emitting R_X86_64_32 ELF relocations?