I know that I can use the -change option of install_name_tool to change the name of a dependent shared library stored in a dylib, but is there a way to remove a dependent shared library, which I believe is a LC_LOAD_DYLIB command, so it won't show up when I run otool -L on the dylib?
Asked
Active
Viewed 3,027 times
7
-
1As far as I know this kind of thing isn't supported. I may be wrong, but I've not found the answer to it yet. What I do know is that certain hacks do work for me. I've gotten around the need to delete dependent library names by simply changing them to a directory (usually root: /). – Joel Feb 01 '12 at 13:41
-
1This question has been answered [here](https://stackoverflow.com/questions/11018113/how-to-insert-a-lc-load-dylib-command-into-a-mach-o-binary-or-join-a-static-libr). Be careful, however - removing the LC_LOAD_DYLIB may actually break the executable, in that the symbols exported by the DYLIB you are removing may not be found in other libraries, leading to the executable being unable to load (DYLD will usually crash then with an ABORT Trap). – Technologeeks Nov 13 '12 at 13:04