2006-07-14 21:04:56 +00:00
|
|
|
--- rpm-4.4.2/build/rpmfc.c.gnuhash 2006-07-14 16:59:43.000000000 -0400
|
|
|
|
+++ rpm-4.4.2/build/rpmfc.c 2006-07-14 17:01:40.000000000 -0400
|
2006-07-11 15:56:14 +00:00
|
|
|
@@ -12,6 +12,11 @@
|
|
|
|
|
|
|
|
#if HAVE_GELF_H
|
|
|
|
#include <gelf.h>
|
|
|
|
+
|
|
|
|
+#if !defined(DT_GNU_HASH)
|
|
|
|
+#define DT_GNU_HASH 0x6ffffef5
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "debug.h"
|
|
|
|
@@ -879,6 +884,8 @@
|
2006-07-11 15:37:56 +00:00
|
|
|
int isDSO;
|
|
|
|
int gotSONAME = 0;
|
|
|
|
int gotDEBUG = 0;
|
|
|
|
+ int gotHASH = 0;
|
|
|
|
+ int gotGNUHASH = 0;
|
|
|
|
static int filter_GLIBC_PRIVATE = 0;
|
|
|
|
static int oneshot = 0;
|
|
|
|
|
2006-07-11 15:56:14 +00:00
|
|
|
@@ -1051,6 +1058,12 @@
|
2006-07-11 15:37:56 +00:00
|
|
|
default:
|
|
|
|
/*@innercontinue@*/ continue;
|
|
|
|
/*@notreached@*/ /*@switchbreak@*/ break;
|
|
|
|
+ case DT_HASH:
|
|
|
|
+ gotHASH= 1;
|
|
|
|
+ /*@innercontinue@*/ continue;
|
|
|
|
+ case DT_GNU_HASH:
|
|
|
|
+ gotGNUHASH= 1;
|
|
|
|
+ /*@innercontinue@*/ continue;
|
|
|
|
case DT_DEBUG:
|
|
|
|
gotDEBUG = 1;
|
|
|
|
/*@innercontinue@*/ continue;
|
2006-07-14 21:04:56 +00:00
|
|
|
@@ -1107,6 +1120,18 @@
|
2006-07-11 15:37:56 +00:00
|
|
|
}
|
|
|
|
/*@=branchstate =uniondef @*/
|
|
|
|
|
|
|
|
+ /* For DSOs which use the .gnu_hash section and don't have a .hash
|
|
|
|
+ * section, we need to ensure that we have a new enough glibc. */
|
|
|
|
+ if (gotGNUHASH && !gotHASH) {
|
|
|
|
+ ds = rpmdsSingle(RPMTAG_REQUIRENAME, "rtld(GNU_HASH)", "",
|
|
|
|
+ RPMSENSE_FIND_REQUIRES);
|
|
|
|
+ rpmdsMerge(&fc->requires, ds);
|
2006-07-14 21:04:56 +00:00
|
|
|
+ buf[0] = '\0';
|
|
|
|
+ t = buf;
|
2006-07-11 15:37:56 +00:00
|
|
|
+ rpmfcSaveArg(&fc->ddict, rpmfcFileDep(t, fc->ix, ds));
|
|
|
|
+ ds = rpmdsFree(ds);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
/* For DSO's, provide the basename of the file if DT_SONAME not found. */
|
|
|
|
if (!fc->skipProv && isDSO && !gotDEBUG && !gotSONAME) {
|
|
|
|
depsp = &fc->provides;
|