Remove dependent shared library from a dylib?
Asked Answered
F

0

7

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?

Fenn answered 28/1, 2011 at 4:39 Comment(2)
As 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: /).Whereupon
This question has been answered here. 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).Abide

© 2022 - 2024 — McMap. All rights reserved.