hppa64-hp-hpux11.00: invalid string offset for section .dynstr

Alan Modra amodra@bigpond.net.au
Thu Jun 20 18:07:00 GMT 2002


On Thu, Jun 20, 2002 at 08:38:58PM -0400, John David Anglin wrote:
> > On Wed, Jun 19, 2002 at 05:57:50PM -0400, John David Anglin wrote:
> > > > It sounds like a SHF_MERGE bug. I just fixed a SHF_MERGE bug on
> > > > ELF/mips. Do
> 
> I don't think that it's a SHF_MERGE bug.  The problem involves
> millicode symbols.  For some reason, fields such as st_name, etc,
> are garbage causing the failure of bfd_elf_string_from_elf_section. 
> We set h->dynindx = -1 for these symbols but there is little
> else in their processing that appears special.  The strange thing
> is nm works fine and the names are present in .dynstr in the expected
> order.  I believe the error message is relatively new (last couple
> of months).

Does nm -D "work fine"?  My guess is that it's too late to set dynindx
to -1 in finish_dynamic_symbol, ie. that space in the dynamic sym
table has already been allocated.  By setting dynindx to -1, all you
accomplish is not writing an entry in dynsym, leaving whatever garbage
happened to be in memory.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list