This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: PATCH for uninitialized junk in .dynsym
- To: mark@codesourcery.com
- Subject: Re: PATCH for uninitialized junk in .dynsym
- From: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
- Date: Tue, 15 Jun 1999 20:42:50 +0200
- Cc: binutils@sourceware.cygnus.com
- References: <19990615091217D.mitchell@codesourcery.com>
Am Die, 15 Jun 1999 schrieb mark@codesourcery.com:
>I don't really know how to debug the ppc-linux problem you're seeing
>since I don't have a ppc-linux system. I suppose I could build a
>cross-compiler and a cross-linker.
>
>But, I bet you can track it down. Perhaps the PPC back-end is looking
>at the dynindx for one the gnu.version functions that has been
>stripped?
Hmm, how can I see in gdb on which symbol it is working? It asserts in the
following code ppc_elf_finish_dynamic_sections() while checking dindx, which
always seems to be 0 then and it seems to happen in all kind of sections.
for (s = output_bfd->sections; s != NULL; s = s->next)
{
int indx, dindx;
sym.st_value = s->vma;
indx = elf_section_data (s)->this_idx;
dindx = elf_section_data (s)->dynindx;
if (dindx != -1)
{
BFD_ASSERT(indx > 0);
BFD_ASSERT(dindx > 0);
if (dindx > maxdindx)
maxdindx = dindx;
sym.st_shndx = indx;
bfd_elf32_swap_symbol_out (output_bfd, &sym,
(PTR) (((Elf32_External_Sym *)
sdynsym->contents)
+ dindx));
}
}
The other hunk of code is in ppc_elf_relocate_section(), checking for indx,
which is always 0. Here it seems fo assert only in .rodata sections.
{
asection *osec;
osec = sec->output_section;
indx = elf_section_data (osec)->dynindx;
BFD_ASSERT(indx > 0);
#ifdef DEBUG
if (indx <= 0)
{
printf("indx=%d section=%s flags=%08x name=%s\n",
indx, osec->name, osec->flags,
h->root.root.string);
}
#endif
}
I'm willing to debug it, but I'm quite lost in this code. I can also offer you
an account on this machine if you want.
Franz.