This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: need to modify PE headerrelated code to support TLS, anyone here wanna help me figure out how to do it?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]