mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
llvm-objdump: don't print relocations in non-relocatable files.
This matches the behavior of GNU objdump. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215844 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -562,6 +562,11 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
|
||||
static void 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 : Obj->sections()) {
|
||||
if (Section.relocation_begin() == Section.relocation_end())
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user