Paul Nasrat a19af6
--- rpm-4.4.2/build/rpmfc.c.gnuhash	2006-07-11 07:05:43.000000000 -0400
Paul Nasrat a19af6
+++ rpm-4.4.2/build/rpmfc.c	2006-07-11 07:09:08.000000000 -0400
Paul Nasrat a19af6
@@ -879,6 +879,8 @@
Paul Nasrat a19af6
     int isDSO;
Paul Nasrat a19af6
     int gotSONAME = 0;
Paul Nasrat a19af6
     int gotDEBUG = 0;
Paul Nasrat a19af6
+    int gotHASH = 0;
Paul Nasrat a19af6
+    int gotGNUHASH = 0;
Paul Nasrat a19af6
     static int filter_GLIBC_PRIVATE = 0;
Paul Nasrat a19af6
     static int oneshot = 0;
Paul Nasrat a19af6
 
Paul Nasrat a19af6
@@ -1051,6 +1053,12 @@
Paul Nasrat a19af6
 		    default:
Paul Nasrat a19af6
 			/*@innercontinue@*/ continue;
Paul Nasrat a19af6
 			/*@notreached@*/ /*@switchbreak@*/ break;
Paul Nasrat a19af6
+                    case DT_HASH:    
Paul Nasrat a19af6
+			gotHASH= 1;
Paul Nasrat a19af6
+			/*@innercontinue@*/ continue;
Paul Nasrat a19af6
+                    case DT_GNU_HASH:
Paul Nasrat a19af6
+			gotGNUHASH= 1;
Paul Nasrat a19af6
+			/*@innercontinue@*/ continue;
Paul Nasrat a19af6
                     case DT_DEBUG:    
Paul Nasrat a19af6
 			gotDEBUG = 1;
Paul Nasrat a19af6
 			/*@innercontinue@*/ continue;
Paul Nasrat a19af6
@@ -1107,6 +1115,16 @@
Paul Nasrat a19af6
     }
Paul Nasrat a19af6
     /*@=branchstate =uniondef @*/
Paul Nasrat a19af6
 
Paul Nasrat a19af6
+    /* For DSOs which use the .gnu_hash section and don't have a .hash
Paul Nasrat a19af6
+     * section, we need to ensure that we have a new enough glibc. */ 
Paul Nasrat a19af6
+    if (gotGNUHASH && !gotHASH) {
Paul Nasrat a19af6
+        ds = rpmdsSingle(RPMTAG_REQUIRENAME, "rtld(GNU_HASH)", "", 
Paul Nasrat a19af6
+                         RPMSENSE_FIND_REQUIRES);
Paul Nasrat a19af6
+        rpmdsMerge(&fc->requires, ds);
Paul Nasrat a19af6
+        rpmfcSaveArg(&fc->ddict, rpmfcFileDep(t, fc->ix, ds));
Paul Nasrat a19af6
+        ds = rpmdsFree(ds);
Paul Nasrat a19af6
+    }
Paul Nasrat a19af6
+
Paul Nasrat a19af6
     /* For DSO's, provide the basename of the file if DT_SONAME not found. */
Paul Nasrat a19af6
     if (!fc->skipProv && isDSO && !gotDEBUG && !gotSONAME) {
Paul Nasrat a19af6
 	depsp = &fc->provides;
Paul Nasrat a19af6
--- rpm-4.4.2/rpmdb/legacy.c.gnuhash	2006-07-11 07:07:18.000000000 -0400
Paul Nasrat a19af6
+++ rpm-4.4.2/rpmdb/legacy.c	2006-07-11 07:07:44.000000000 -0400
Paul Nasrat a19af6
@@ -14,6 +14,9 @@
Paul Nasrat a19af6
 #if !defined(DT_GNU_LIBLIST)
Paul Nasrat a19af6
 #define	DT_GNU_LIBLIST		0x6ffffef9
Paul Nasrat a19af6
 #endif
Paul Nasrat a19af6
+#if !defined(DT_GNU_HASH)
Paul Nasrat a19af6
+#define	DT_GNU_HASH		0x6ffffef5
Paul Nasrat a19af6
+#endif
Paul Nasrat a19af6
 
Paul Nasrat a19af6
 #endif
Paul Nasrat a19af6