On 2011-09-07 11:35, Walter Bright wrote:
On 9/7/2011 12:35 AM, Jacob Carlborg wrote:
On 2011-09-06 20:00, Walter Bright wrote:
On 9/6/2011 5:02 AM, Michel Fortin wrote:
What Apple does is meant to keep binary
compatibility.

It doesn't work that well. dmd breaks with every new OS update.

The winner with binary compatibility is, far and away, Microsoft.

Maybe it would work better if you would use the proper API instead of
putting
__name_beg and __name_end around sections in the binary, i.e.
__minfo_beg and
__minfo_end.

Actually, I did follow documented behavior of ld. Unfortunately, ld does
not follow the documented behavior.

I don't know exactly what documentation you've read but this is what I've found:

http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/MachORuntime/Reference/reference.html

http://developer.apple.com/library/mac/#documentation/DeveloperTools/Reference/MachOReference/Reference/reference.html

The second link contains documentation for "getsectbyname" and similar functions for getting information and data from sections and segments. By using these functions __minfo_beg __minfo_end become unnecessary.

I have a fork of druntime that uses these functions. But at the same time I'm trying to make it work with dynamic libraries and I can't get TLS to work with dynamic libraries.

--
/Jacob Carlborg

Reply via email to