tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] [cfarm-users] dylib on macOS 11


From: Christian Jullien
Subject: Re: [Tinycc-devel] [cfarm-users] dylib on macOS 11
Date: Mon, 22 Mar 2021 09:26:57 +0100

Thanks, very helpful, I'll take a look

-----Original Message-----
From: cfarm-users [mailto:cfarm-users-bounces@lists.tetaneutral.net] On Behalf 
Of Bruno Haible via cfarm-users
Sent: Monday, March 22, 2021 09:18
To: jullien@eligis.com
Cc: Bruno Haible; cfarm-users@lists.tetaneutral.net
Subject: Re: [cfarm-users] dylib on macOS 11

Christian,

> To port TinyCC on Silicon we facing a major issue: libc.dylib (link to
> libSystem.dylib) no longer exists on the filesystem, it is cached and
> hidden somewhere in the system.

Yes. [1][2]

> You can still dlopen libSystem.dylib and then dlsym any symbols you like
> but you can't fopen libSystem.dylib and then fread the archive as tcc does.

dlopen is what you do at runtime.

At link time, I would open the .tbd file that you find in the lib/ directory
of the SDK. For example,
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libc.tbd
It contains, in particular, the sections 'exports: symbols:' (which gives you
the list of symbols) and 'install-name:' (which gives you the dlopen'able
file name that you can stuff into the executable).

Bruno

[1] https://developer.apple.com/forums/thread/655588
[2] 
https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11_0_1-release-notes

_______________________________________________
cfarm-users mailing list
cfarm-users@lists.tetaneutral.net
https://lists.tetaneutral.net/listinfo/cfarm-users




reply via email to

[Prev in Thread] Current Thread [Next in Thread]