search for: relocation_iterator

Displaying 5 results from an estimated 5 matches for "relocation_iterator".

2011 Nov 02
1
[LLVMdev] supporting dwarf relocations
...to the DWARF sections. For example, when emitting offsets into the stringpool, we emit a relocation. How should we support this? llvm-dwarfdump currently works by finding the relevant dwarf sections and passing them in to lib/DebugInfo. The relocations can be iterated over in lib/Object using the relocation_iterator. Should dwarfdump apply its own relocations and hand DebugInfo a copy of the sections from the input file? Should DebugInfo take the Object and do relocations in its head as needed? How about a wrapper that provides a "relocated view" of a section, and we pass that around? At a high leve...
2011 Oct 13
0
[LLVMdev] llvm-objdump related patch
...ions. Symbols without this type can also be in a section. + && Address >= sec->sh_addr + && Address < (sec->sh_addr + sec->sh_size)) + Result = true; + return object_error::success; } template<support::endianness target_endianness, bool is64Bits> relocation_iterator ELFObjectFile<target_endianness, is64Bits> @@ -232,11 +235,11 @@ static void DisassembleObject(const ObjectFile *Obj) { if (error(i->getSize(SectSize))) break; // Disassemble symbol by symbol. for (unsigned si = 0, se = Symbols.size(); si != se; ++si) { uint64_t Sta...
2011 Oct 12
2
[LLVMdev] llvm-objdump related patch
Michael, I have rework the patch according to your suggestion. And I have read binutil/objdump source code and found that it has a logic that if there's no symtab, it will use dynsym, which is missing in llvm-objdump. Songmao -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-Fix-the-address-calculation-for-llvm-objdump.patch Type: text/x-patch
2012 Nov 06
2
[LLVMdev] [PATCH] basic reading reloc visitor for x86_64 ELF
...else + continue; + + // TODO: For now only handle relocations for the debug_info section. + if (name != "debug_info") + continue; + + if (i->begin_relocations() != i->end_relocations()) { + uint64_t SectionSize; + i->getSize(SectionSize); + for (relocation_iterator reloc_i = i->begin_relocations(), + reloc_e = i->end_relocations(); + reloc_i != reloc_e; reloc_i.increment(ec)) { + uint64_t Address; + reloc_i->getAddress(Address); + uint64_t Type; + reloc_i->getT...
2012 Nov 06
0
[LLVMdev] [PATCH] basic reading reloc visitor for x86_64 ELF
On Mon, Nov 5, 2012 at 5:17 PM, Eric Christopher <echristo at gmail.com> wrote: > For llvm-dwarfdump we need to handle relocations inside the debug info > sections in order to successfully dump the dwarf info including strings. > Nick sent out a partial patch that did this not too long ago and I've taken > it and gone in a bit of a different direction, but kept the same basic