苹果这是什么骚操作,自带的 curl 链接了一个不存在的 libcurl,但是却能正常运行?!

2022-01-02 01:44:03 +08:00
 hronro

系统版本:macOS Monterey (Version 12.1)

2640 次点击
所在节点    macOS
3 条回复
gjquoiai
2022-01-02 01:54:23 +08:00
大索尔里引入的变更,系统提供的动态链接库不在文件系统中了,现在只能用 dlopen 检查存在与否
MrKrabs
2022-01-02 04:10:34 +08:00
/System/Library/dyld/
ptyfork
2022-01-02 04:56:04 +08:00
https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11_0_1-release-notes

New in macOS Big Sur 11.0.1, the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of this change, copies of dynamic libraries are no longer present on the filesystem. Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail. Instead, check for library presence by attempting to dlopen() the path, which will correctly check for the library in the cache. (62986286)

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/825732

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX