This is the mail archive of the binutils@sources.redhat.com 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]

elf-strtab.c:262 assertion fail for hppa-linux


If we hide a sym and make dynindx == -1, we always need to
_bfd_elf_strtab_delref, otherwise we'll run foul of the
_bfd_elf_strtab_emit refcount assert.

bfd/ChangeLog
	* elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount.

-- 
Alan Modra
 
Index: bfd/elf32-hppa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-hppa.c,v
retrieving revision 1.61
diff -u -p -r1.61 elf32-hppa.c
--- elf32-hppa.c	2001/11/19 03:01:43	1.61
+++ elf32-hppa.c	2001/11/19 03:38:37
@@ -2225,9 +2225,13 @@ clobber_millicode_symbols (h, info)
      Therefore we do not leave ELF_LINK_FORCED_LOCAL set.  */
   if (h->type == STT_PARISC_MILLI)
     {
+      struct elf32_hppa_link_hash_table *htab;
       unsigned short oldflags = h->elf_link_hash_flags;
+
       h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
       elf32_hppa_hide_symbol (info, h);
+      htab = hppa_link_hash_table (info);
+      _bfd_elf_strtab_delref (htab->elf.dynstr, h->dynstr_index);
       h->elf_link_hash_flags &= ~ELF_LINK_FORCED_LOCAL;
       h->elf_link_hash_flags |= oldflags & ELF_LINK_FORCED_LOCAL;
     }


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