This is the mail archive of the binutils@sourceware.org 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: [patch bfd]: Fix generation of .tls directory entry


2010/12/20 Dave Korn <dave.korn.cygwin@gmail.com>:
> On 20/12/2010 15:25, Kai Tietz wrote:
>> PING? What's the issue here?
>
> ?Well there is all this "christmas" stuff going on at the moment ....

Well, was just curious to see not at least a line "Sorry, will come to
it with next <x>-days". I know that you are busy about some gcc
patches you are working on.

>>>> by recent changes I noticed that the TLS directory entry for PE-COFF
>>>> targets isn't set anymore. This patch fixes this issue
>>>>
>>>> 2010-12-14 ?Kai Tietz
>>>>
>>>> ? ? ? ?* peXXigen.c (_bfd_XXi_swap_aouthdr_out): Handle TLS directory
>>>> ? ? ? ?entry.
>>>>
>>>> Tested for x86_64-w64-mingw32, and i686-pc-cygwin. Ok for apply?
>
> ?I'm not so sure about this one. ?What exactly has caused the TLS directory
> entry not to be set any more, and what are the "other .tls fixes" you refer to?

Well, the issue here is that, if a .tls section is present, it needs
to be put into directory entry. Why this isn't happening anymore, I am
a bit puzzled too.

The more robust thing to do here (as it can be a matter of size on
wince AFAIR) is to map the TLS directory entry in the same way as IAT
directory entry is done and the size of the TLS directory entry should
have the size of 24 bytes for PE and for PE+ 40 bytes. Nevertheless it
is better for now to have a TLS directory entry generated, if a .tls
section is present.

> ?If I understand the patch right, it's going to set the TLS directory entry
> to point to any ".tls" section output during the link, regardless of whether
> it actually contains the "__tls_used" symbol (and related structure) or not,
> isn't it? ?Unless it is always the case that .tls sections always contain this
> structure, it is always at offset zero, and it is always the full size of the
> section, that seems potentially incorrect.
>
> ? ?cheers,
> ? ? ?DaveK
>

Kai

-- 
|? (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination


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