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: hppa-linux TLS work, extra DIR32 reloc for errno@@GLIBC_PRIVATE?


On Tue, May 31, 2005 at 09:18:31AM +0930, Alan Modra wrote:
> On Mon, May 30, 2005 at 01:50:28PM -0400, Carlos O'Donell wrote:
> > The errno duplicate is the DIR32 and appears only at the
> > finish_dynamic_relocs phase. Writing it out trashes the first two relocs
> > you see in the example.
> 
> Perhaps you are outputting a reloc in both relocate_section and in
> finish_dynamic_symbol?

elf32_hppa_finish_dynamic_symbol is called to handle 
errno@@GLIBBC_PRIVATE. 

The entry meets the following requirements:   
   4453   if (h->got.offset != (bfd_vma) -1
   4454       && hppa_elf_hash_entry (h)->tls_type != GOT_TLS_GD
   4455       && hppa_elf_hash_entry (h)->tls_type != GOT_TLS_IE)
   4456     {

Which emits a DIR32 reloc.

Is it valid to add a check for sym_type?
Something like:

&& ELF32_ST_TYPE (sym->st_info) != STT_TLS

Since a TLS symbol shouldn't have a DIR32 reloc emitted.
The symbol was already handled in relocate_section and emitted as a
TPREL32.

Cheers,
Carlos.



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