[llvm-objdump] Printing relocations in executable and shared object files. This partially reverts r215844 by removing test objdump-reloc-shared.test which stated GNU objdump doesn't print relocations, it does.
In executable and shared object ELF files, relocations in the file contain the final virtual address rather than section offset so this is adjusted to display section offset. Differential revision: http://reviews.llvm.org/D15965 llvm-svn: 263971
This commit is contained in:
@@ -1188,10 +1188,6 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
|
||||
void llvm::PrintRelocations(const ObjectFile *Obj) {
|
||||
StringRef Fmt = Obj->getBytesInAddress() > 4 ? "%016" PRIx64 :
|
||||
"%08" PRIx64;
|
||||
// Regular objdump doesn't print relocations in non-relocatable object
|
||||
// files.
|
||||
if (!Obj->isRelocatableObject())
|
||||
return;
|
||||
|
||||
for (const SectionRef &Section : ToolSectionFilter(*Obj)) {
|
||||
if (Section.relocation_begin() == Section.relocation_end())
|
||||
|
||||
Reference in New Issue
Block a user