All the built-in libraries ship in one big cache file on macOS (at least in Big Sur, not sure on earlier systems) and iOS (since iPhone OS 3.1). More information is available in the iPhone Dev Wiki.
To find the actual location of the cache on your machine, run your compiled executable with the DYLD_PRINT_SEGMENTS
environment variable set. This will produce a lot of output on stderr, like this:
% DYLD_PRINT_SEGMENTS=1 ./your_executable
re-using existing shared cache (/System/Library/dyld/dyld_shared_cache_x86_64h):
0x7FFF2003B000->0x7FFF7FFBAFFF init=5, max=5 read execute
0x7FFF8003B000->0x7FFF8DFDEFFF init=3, max=3 read write data
0x7FFFC003B000->0x7FFFE22DAFFF init=1, max=1 read
dyld: Main executable mapped /Users/janten/Desktop/linky/./a.out
__PAGEZERO at 0x00000000->0x100000000
__TEXT at 0x106305000->0x106309000
__DATA_CONST at 0x106309000->0x10630D000
__DATA at 0x10630D000->0x106311000
__LINKEDIT at 0x106311000->0x106315000
dyld: Using shared cached for /usr/lib/libcurl.4.dylib
__TEXT at 0x7FFF32F8F000->0x7FFF32FF5000
__DATA at 0x7FFF89A67070->0x7FFF89A6A04C
__LINKEDIT at 0x7FFFC05FF000->0x7FFFDEF17CB0
...
In this example, the cache is located in /System/Library/dyld/dyld_shared_cache_x86_64h. If you want to see the complete content of this file, look at /System/Library/dyld/dyld_shared_cache_x86_64h.map, which contains a plain-text memory mapping for all libraries in the cache.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…