Эх сурвалжийг харах

Add type libc0 to cache_print().
Always strip trailing slaches(/) from paths read from ld.so.conf.

Joakim Tjernlund 20 жил өмнө
parent
commit
09fb630d4c
1 өөрчлөгдсөн 5 нэмэгдсэн , 2 устгасан
  1. 5 2
      utils/ldconfig.c

+ 5 - 2
utils/ldconfig.c

@@ -699,6 +699,9 @@ void cache_print(void)
 	    case LIB_ELF:
 		printf("(ELF%s)", libent[fd].flags & LIB_ELF64 ? "/64" : "");
 		break;
+	    case LIB_ELF_LIBC0:
+		printf("(libc0%s)",libent[fd].flags & LIB_ELF64 ? "/64" : "");
+		break;
 	    case LIB_ELF_LIBC5:
 	    case LIB_ELF_LIBC6:
 		printf("(libc%d%s)", (libent[fd].flags & ~LIB_ELF64) + 3,
@@ -884,13 +887,13 @@ int main(int argc, char **argv)
 	    if ((extpath = get_extpath()))
 	    {
 		for (cp = strtok(extpath, DIR_SEP); cp; cp = strtok(NULL, DIR_SEP)) {
-			/* we do the redundancy check only if cache usage is enabled */
-#ifdef __LDSO_CACHE_SUPPORT__
 			/* strip trailing slashes */
 			int len = strlen(cp);
 			if (len) 
 				while (cp[--len] == '/' && len)
 					cp[len] = 0;
+			/* we do the redundancy check only if cache usage is enabled */
+#ifdef __LDSO_CACHE_SUPPORT__
 			if (strcmp(UCLIBC_RUNTIME_PREFIX "lib", cp) == 0 ||
 			    strcmp(UCLIBC_RUNTIME_PREFIX "usr/lib", cp) == 0) {
 				if (verbose >= 0)