If I had my way

Jacob Carlborg doob at me.com
Tue Dec 13 08:06:23 PST 2011


On 2011-12-13 16:29, Martin Nowak wrote:
> Correctly used they don't and are a really cheap way to get the ranges.
> Having an OS function to do this is nice but as far as I know it doesn't
> port
> to ELF (without linking in some elf libs) while the C object ports to OSX.

First, it does cause problems because you will get missing symbols for 
_minfo_beg and _minfo_end when it's compiled as a dynamic library, trust 
me, I've already done this for Tango. Second, It doesn't have to port to 
EFL, it's already platform specific.

>> In this callback I extract module infos, exception handling tables and
>> TLS data from the mach_header. This is now where the problem comes. I
>> need an associative array which maps mach_headers to a struct (or
>> similar) containing module infos, exception handling tables and TLS
>> data. But I don't have an associative array that works this earily in
>> the initialization phase of the runtime.
> But it will get called from the thread that runs dlopen.
> So how do you add/remove an EH table while another thread is
> catching exceptions?

I have no idea from what thread that callback will be called from. I 
haven't thought about what should happen.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list