This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: vxworks dynamic tls relocs
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: binutils <binutils at sources dot redhat dot com>
- Date: Wed, 14 Nov 2007 10:08:57 +1030
- Subject: Re: vxworks dynamic tls relocs
- References: <47399CE5.4070902@codesourcery.com>
On Tue, Nov 13, 2007 at 12:47:33PM +0000, Nathan Sidwell wrote:
> Nullifying the dynamic reloc seemed the simplest approach to take, rather
> than change the size of the dynamic reloc section.
It is only marginally more difficult to do this without generating
those NONE relocs. For example, in elf32-ppc.c allocate_dynrelocs
around line 4802, add
if (htab->is_vxworks && info->shared)
{
struct ppc_elf_dyn_relocs **pp;
for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
{
if (strcmp (p->sec->output_section->name, ".tls_vars") == 0)
*pp = p->next;
else
pp = &p->next;
}
}
then in ppc_elf_relocate_section change the "dodyn" condition to
if ((input_section->flags & SEC_ALLOC) == 0
|| is_vxworks_tls)
break;
Please take a look at doing it this way.
--
Alan Modra
Australia Development Lab, IBM