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: vxworks dynamic tls relocs


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


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