This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: need to modify PE headerrelated code to support TLS, anyone here wanna help me figure out how to do it?
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: Jonathan Wilson <jonwil at tpgi dot com dot au>
- Cc: binutils at sources dot redhat dot com
- Date: 13 Oct 2003 00:15:39 -0700
- Subject: Re: need to modify PE headerrelated code to support TLS, anyone here wanna help me figure out how to do it?
- References: <3F8A124E.3060501@tpgi.com.au>
Jonathan Wilson <jonwil@tpgi.com.au> writes:
> and 4.somewhere in the generation code for the exe file, it should do
> the following:
> A.search for the symbol __tls_used (which is defined as _tls_used in
> the tlssup.c file I am working on)
> B.if found, it should acquire the Linear Address of that symbol.
> and C.it should set the RVA field of the IMAGE_DIRECTORY_ENTRY_TLS
> entry to this address.
> As for the size field, I am not 100% clear on what it should be set
> to, I am trying to figure that out.
...
> item 4 will require changes to LD (and is where I need the help)
>
> So, can someone help me figure out how to implement the stuff given in point 4?
All the current stuff dealing with directory entries can be found in
bfd/peXXigen.c. See in particular _bfd_XXi_final_link_postscript(),
which is probably a more or less reasonable place for you to look up
__tls_used.
Ian