This is an archive of the discontinued LLVM Phabricator instance.

llvm-readobj: implement MachODumper::printNeededLibraries
AbandonedPublic

Authored by chilledheart on Feb 3 2015, 9:46 AM.

Details

Diff Detail

Event Timeline

chilledheart retitled this revision from to llvm-readobj: implement MachODumper::printNeededLibraries.
chilledheart updated this object.
chilledheart edited the test plan for this revision. (Show Details)
chilledheart added reviewers: friss, kledzik.
chilledheart added a subscriber: Unknown Object (MLST).Feb 3 2015, 9:47 AM

Most code of MachODumper::printNeededLibraries keeps the same with ELFDumper::printNeededLibraries.

kledzik added inline comments.Mar 1 2015, 11:32 AM
tools/llvm-readobj/MachODumper.cpp
605

LC_ID_DYLIB is not a "needed library". It is the DT_SONAME of the dylib.

617

Why sort? The order is important in mach-o. The symbol table entries for undefined symbols contain a one byte "ordinal" which is the index into this ordered list.

remove std::stable_sort and LC_ID_DYLIB items

apply some minor improvements

I saw the LC_ID_DYLIB items in the output of otool -L command, so I thought
they were needed to be printed (double-checked with cctool source code, version 862).
I have removed this, anyway.

The file mach-o/loader.h states that struct fvmlib is obsoleted,
so there is no need to add the support for LC_IDFVMLIB and LC_LOADFVMLIB.

Ping?

tools/llvm-readobj/MachODumper.cpp
617

removed

chilledheart abandoned this revision.Mar 28 2018, 10:12 AM