summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objdump
diff options
context:
space:
mode:
authorMichael Trent <mtrent@apple.com>2019-06-18 22:20:10 +0000
committerMichael Trent <mtrent@apple.com>2019-06-18 22:20:10 +0000
commitc2885ded2b1e73f9bbc629dba17800f3ee0201b7 (patch)
tree5ac498f0daa25a0e9f1c02e1e7d3b96d45e49d66 /llvm/tools/llvm-objdump
parentd11ea2c8c541f3358e289466b4569b21b64abc66 (diff)
downloadbcm5719-llvm-c2885ded2b1e73f9bbc629dba17800f3ee0201b7.tar.gz
bcm5719-llvm-c2885ded2b1e73f9bbc629dba17800f3ee0201b7.zip
Print dylib load kind (weak, reexport, etc) in llvm-objdump -m -dylibs-used
Summary: Historically llvm-objdump prints the path to a dylib as well as the dylib's compatibility version and current version number. This change extends this information by adding the kind of dylib load: weak, reexport, etc. rdar://51383512 Reviewers: pete, lhames Reviewed By: pete Subscribers: rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62866 llvm-svn: 363746
Diffstat (limited to 'llvm/tools/llvm-objdump')
-rw-r--r--llvm/tools/llvm-objdump/MachODump.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/tools/llvm-objdump/MachODump.cpp b/llvm/tools/llvm-objdump/MachODump.cpp
index b684daacb61..58ff7be4543 100644
--- a/llvm/tools/llvm-objdump/MachODump.cpp
+++ b/llvm/tools/llvm-objdump/MachODump.cpp
@@ -1206,7 +1206,16 @@ static void PrintDylibs(MachOObjectFile *O, bool JustId) {
outs() << " current version "
<< ((dl.dylib.current_version >> 16) & 0xffff) << "."
<< ((dl.dylib.current_version >> 8) & 0xff) << "."
- << (dl.dylib.current_version & 0xff) << ")\n";
+ << (dl.dylib.current_version & 0xff);
+ if (Load.C.cmd == MachO::LC_LOAD_WEAK_DYLIB)
+ outs() << ", weak";
+ if (Load.C.cmd == MachO::LC_REEXPORT_DYLIB)
+ outs() << ", reexport";
+ if (Load.C.cmd == MachO::LC_LOAD_UPWARD_DYLIB)
+ outs() << ", upward";
+ if (Load.C.cmd == MachO::LC_LAZY_LOAD_DYLIB)
+ outs() << ", lazy";
+ outs() << ")\n";
}
} else {
outs() << "\tBad offset (" << dl.dylib.name << ") for name of ";
OpenPOWER on IntegriCloud