[Issue 12092] Wrong TLS access in PIC code (X86_32)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Feb 6 17:47:11 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12092
--- Comment #1 from Martin Nowak <code at dawg.eu> 2014-02-06 17:47:07 PST ---
I was already able to fix the relocation type and make the compiler call
__tls_get_addr.
https://github.com/MartinNowak/dmd/commits/fix12092
Now I'm stuck!
The code sequence to load the __tls_get_addr argument is incorrect. It ought to
use a LEA with SIB addressing to leave patch room for the linker. Instead it
just uses a simple LEA.
Should be:
13: 8d 04 1d 00 00 00 00 lea 0x0(,%ebx,1),%eax
1a: e8 fc ff ff ff call 1b <foo+0x1b>
Is:
17: 8d 81 00 00 00 00 lea 0x0(%ecx),%eax
1d: e8 fc ff ff ff call 1e <_D3foo3fooFZi+0x1e>
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list