Hello,

On Mon, 26 Apr 2021, Hayden Seay wrote:

Hello there! I'm sure you're likely aware, but, as of macOS Big Sur, system dylibs are found exclusively in the dyld_shared_cache.

This poses a unique issue, where nothing can be linked now, as it can't find a libc mach-o. This can be solved one of two ways, by either dlopen/dlsym-ing at runtime, or by adding tapi support (Apple's YAML format they use in SDKs as opposed to real dynamic libraries). The source for libtapi can be found here: https://opensource.apple.com/source/tapi/tapi-1100.0.11/

My question is, is there a general consensus on which path to take, or has work already been started on one?

My plan was to eventually support the YAML symbol lists in TCC in case I wouldn't find a different way to get at the dyld_shared cache pieces: when I checked on older MacOS the shared cache was in a format where one could easily get at the individual Mach-O headers of components in the cache and hence with some massaging it would be possible to reuse the existing Mach-O symbol reader. If that would turn out to be impossible on Big Sur for whatever reason parsing the YAML files would be the next best thing. I'm not sure of those files are only delivered as part of the SDK (or at least command line tools), if so that would be a quality-of-implementation regression by Apple: linking against system libraries wouldn't be possible without the SDK then anymore, which it was with only TCC. It wouldn't be a large regression, though, as without the SDK you wouldn't have had the headers anyway.

MacOS is low prio for me, and right now I only have virtual machines with pre-Big Sur, so the above plan didn't materialize yet :)

I don't know what other peoples plans were, but I think the above would be the right course of action.


Ciao,
Michael.

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to