working TLS support, take 1

Jonathan Wilson jonwil@tpgi.com.au
Wed Oct 15 11:53:00 GMT 2003


Here is the first go at working Win32 TLS support in GNU binutils for a 
MingW target.

tls.pat is the patch for TLS support (since GCC doesnt do TLS yet, you will 
need an obj file from visual C that uses TLS in order to test, I can 
provide my test obj to anyone who wants it)
atlsup.s and tlssup.c will be going into MingW-Runtime but since they arent 
there yet, I am posting them here for testing purposes.
Assuming a sutably patched and build version of LD and the linker script, 
you will need to do the following:
1.get a .obj file from visual C that uses TLS
2.link it with atlssup.s, tlssup.o plus the folowing from mingw-runtime:
crt2.o
-lmsvcrt
-lkernel32
-lmingw32

plus of course anything else that your test program needs (such as -luser32 
or -lgdi32)

I am posting this so that:
1.it can be tested on other peoples machines/by other people/etc (and also 
other hosts/targets) to make sure that I didnt break anything
2.it can be checked by some binutils people to see if it follows whatever 
the "coding guide" for binutils is
and 3.assuming 1 and 2 are true, it (or the patch anyway, the .c and .s are 
to go into MingW-Runtime later on) can go into CVS for binutils.

BTW, I sent my copyright assignment out on monday by airmail and they said 
about a week to get from australia to USA so hopefully it should arrive so 
I can get my patch into CVS :)

Now, onwards to GCC (thats if I can ever get it to build :)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tls.pat
URL: <https://sourceware.org/pipermail/binutils/attachments/20031015/214588d6/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: atlssup.s
URL: <https://sourceware.org/pipermail/binutils/attachments/20031015/214588d6/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tlssup.c
URL: <https://sourceware.org/pipermail/binutils/attachments/20031015/214588d6/attachment.c>


More information about the Binutils mailing list