Page MenuHomePhabricator

llvm-readobj: implement MachODumper::printNeededLibraries

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


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

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


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.




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