Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法判断 OSX 共享库 ( .dylib) 是否被编译为与位置无关的代码/可执行文件?
.dylib
根据这个答案,您可以运行otool -hv <file_path>并查找PIE标志。
otool -hv <file_path>
PIE
编辑:我对此进行了测试,但它不起作用。
编辑2:实际上它确实适用于可执行文件。我不确定它是否适用于共享库。