I've created a patch but it doesn't solve the problem: 
http://tango.pastebin.com/Pn2tVjSm . I don't get an error in __tls_get_addr now 
but instead I get this:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x97655133 in strncmp ()
(gdb) bt
#0  0x97655133 in strncmp ()
#1  0x0000101c in ?? ()
Previous frame inner to this frame (gdb could not unwind past this frame)
(gdb)

Maybe someone else can look at the patch and see if I did something wrong or 
maybe the solution we thought of couldn't fix the problem.

On 9 nov 2010, at 21:27, Jacob Carlborg wrote:

> I'll see what I can do.
> 
> On 9 nov 2010, at 20:55, Walter Bright wrote:
> 
>> 
>> 
>> Jacob Carlborg wrote:
>>> It should work using getsectdatafromheader, that's what I changed when I 
>>> added support for dynamic libraries to Tango. Have a look at the Tango 
>>> code: 
>>> http://dsource.org/projects/tango/browser/trunk/tango/core/rt/compiler/dmd/object_.d#L1270
>>>  and 
>>> http://dsource.org/projects/tango/browser/trunk/tango/core/rt/compiler/dmd/darwin/Image.d#L103
>>>  . 
>>> The file in the last link is completely made by me so you won't have to be 
>>> afraid for looking at it. Or if you don't want to look at Tango source 
>>> files at all you can look at this druntime change: 
>>> http://www.dsource.org/projects/druntime/changeset/372 , to be more 
>>> specific: 
>>> http://www.dsource.org/projects/druntime/browser/trunk/src/rt/image.d?rev=372#L105
>>> 
>>> 
>> 
>> Thanks, Jacob! If you want to submit a patch to druntime that, for OSX, 
>> eliminates the dependence on the begin and end sections, that would be 
>> awesome.
>> _______________________________________________
>> phobos mailing list
>> [email protected]
>> http://lists.puremagic.com/mailman/listinfo/phobos
> 
> -- 
> /Jacob Carlborg
> 
> _______________________________________________
> phobos mailing list
> [email protected]
> http://lists.puremagic.com/mailman/listinfo/phobos

-- 
/Jacob Carlborg

_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to