This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
hppa-linux TLS work, extra DIR32 reloc for errno@@GLIBC_PRIVATE?
- From: Carlos O'Donell <carlos at baldric dot uwo dot ca>
- To: binutils at sources dot redhat dot com
- Date: Mon, 30 May 2005 13:50:28 -0400
- Subject: hppa-linux TLS work, extra DIR32 reloc for errno@@GLIBC_PRIVATE?
binutils,
hppa-linux may eventually have TLS support if the group of us working on
the toolchain can get binutils into shape.
We're in the process of debugging the output relocations in binutils,
and we are having some problems tracking down a couple of bugs. Perhaps
someone can give some insight to this problem.
The first bug involves relocations against errno@@GLIBC_PRIVATE while
building libpthread in glibc.
By the time we get to elf32_hppa_finish_dynamic_symbol, we've already
output the correct TPREL32 reloc against the TLS reference of
errno@@GLIBC_PRIVATE.
However, at this point there is an extra DIR32 errno reloc. This reloc
is one more reloc than accounted for, and when processed it trashes
atleast one entry in the output .rela.dyn.
Example libpthread.so:
00000000 00011241 R_PARISC_PLABEL32 00000000 _Jv_RegisterClasses + 0
^^^^^^^^ Trashed.
00000000 0001fcc0 unrecognized: c0 bad symbol index: 000001fc
^^^^^^^^^^^^^^^^^^ Trashed.
...
0001fc8c 00003b99 R_PARISC_TPREL32 00000000 errno + 0
0001fc8c 00003b01 R_PARISC_DIR32 00000000 errno + 0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ What created this entry?
...
(elf32_hppa_relocate_section):
sym errno@@GLIBC_PRIVATE,
bfd_elf32_swap_reloca_out (TPREL32),
r_info = 0x3b99,
r_addend = 0x0,
r_offset = 0x1fd0c,
loc = 0x44c608
(elf32_hppa_finish_dynamic_symbol):
sym errno@@GLIBC_PRIVATE
bfd_elf32_swap_reloca_out (DIR32),
got.offset 0xf9
tls_type -1
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.
Where might we have gone wrong? Any clues or insight?
c.