[PATCH] Don't die on unknown dynamic tags

Jakub Jelinek jakub@redhat.com
Sat Mar 30 10:02:00 GMT 2002


Hi!

It seems like some distributions ship glibc not compiled with -DNDEBUG,
and as there is an assert on unknown dynamic tags, statically linked
programs against such glibc which do dlopen/nss die on any prelinked
libraries or libraries with some other dynamic tags not known to
such older glibc. IMHO glibc just shouldn't worry about dynamic tags
it knows nothing about, otherwise we are stuck with current set of dynamic
tags and cannot add a new one ever.

2002-03-30  Jakub Jelinek  <jakub@redhat.com>

	* elf/dynamic-link.h (elf_get_dynamic_info): Don't abort on unknown
	dynamic tags.

--- libc/elf/dynamic-link.h.jj	Fri Feb  8 12:04:02 2002
+++ libc/elf/dynamic-link.h	Sat Mar 30 19:02:50 2002
@@ -59,8 +59,6 @@ elf_get_dynamic_info (struct link_map *l
       else if ((Elf32_Word) DT_ADDRTAGIDX (dyn->d_tag) < DT_ADDRNUM)
 	info[DT_ADDRTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM
 	     + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM] = dyn;
-      else
-	assert (! "bad dynamic tag");
       ++dyn;
     }
 #ifndef DL_RO_DYN_SECTION


	Jakub



More information about the Libc-hacker mailing list