llvm-objdump: don't print relocations in non-relocatable files.

This matches the behavior of GNU objdump.

llvm-svn: 215844
This commit is contained in:
Rafael Espindola
2014-08-17 19:09:37 +00:00
parent 639557ae86
commit c66d761b97
8 changed files with 31 additions and 0 deletions

View File

@@ -979,6 +979,10 @@ COFFObjectFile::getRelocationValueString(DataRefImpl Rel,
return object_error::success;
}
bool COFFObjectFile::isRelocatableObject() const {
return !DataDirectory;
}
bool ImportDirectoryEntryRef::
operator==(const ImportDirectoryEntryRef &Other) const {
return ImportTable == Other.ImportTable && Index == Other.Index;