29e444
#
29e444
# Red Hat BZ:
29e444
# https://bugzilla.redhat.com/show_bug.cgi?id=905184
29e444
#
29e444
# Sourcware BZ:
29e444
# http://sourceware.org/bugzilla/show_bug.cgi?id=15006
29e444
#
29e444
# Upstream submission:
29e444
# http://www.sourceware.org/ml/libc-alpha/2013-02/msg00120.html
29e444
#
29e444
# ChangeLog
29e444
#
29e444
# 2013-02-07  Carlos O'Donell  <carlos@redhat.com>
29e444
#
29e444
#	* sysdeps/generic/ldconfig.h: Define FLAG_ARM_LIBSF.
29e444
#	* elf/cache.c (print_entry): Add FLAG_ARM_LIBSF support.
29e444
#
29e444
# ports/ChangeLog.arm
29e444
#
29e444
# 2013-02-07  Carlos O'Donell  <carlos@redhat.com>
29e444
#
29e444
#	* sysdeps/unix/sysv/linux/arm/dl-cache.h
29e444
#	[__ARM_PCS_VFP] (_dl_cache_check_flags): Allow plain FLAG_ELF_LIBC6.
29e444
#	[!__ARM_PCS_VFP] (_dl_cache_check_flags): Likewise.
29e444
#	* sysdeps/unix/sysv/linux/arm/readelflib.c (process_elf_file):
29e444
#	Set FLAG_ARM_LIBSF for soft-float ABI otherwise just FLAG_ELF_LIBC6.
29e444
#
12745e
diff --git glibc-2.17-c758a686/elf/cache.c glibc-2.17-c758a686/elf/cache.c
29e444
index 9901952..699550b 100644
12745e
--- glibc-2.17-c758a686/elf/cache.c
12745e
+++ glibc-2.17-c758a686/elf/cache.c
29e444
@@ -100,6 +100,10 @@ print_entry (const char *lib, int flag, unsigned int osversion,
29e444
     case FLAG_AARCH64_LIB64:
29e444
       fputs (",AArch64", stdout);
29e444
       break;
29e444
+    /* Uses the ARM soft-float ABI.  */
29e444
+    case FLAG_ARM_LIBSF:
29e444
+      fputs (",soft-float", stdout);
29e444
+      break;
29e444
     case 0:
29e444
       break;
29e444
     default:
12745e
diff --git glibc-2.17-c758a686/ports/sysdeps/unix/sysv/linux/arm/dl-cache.h glibc-2.17-c758a686/ports/sysdeps/unix/sysv/linux/arm/dl-cache.h
29e444
index acc4f28..504feca 100644
12745e
--- glibc-2.17-c758a686/ports/sysdeps/unix/sysv/linux/arm/dl-cache.h
12745e
+++ glibc-2.17-c758a686/ports/sysdeps/unix/sysv/linux/arm/dl-cache.h
29e444
@@ -18,12 +18,17 @@
29e444
 
29e444
 #include <ldconfig.h>
29e444
 
29e444
+/* In order to support the transition from unmarked objects
29e444
+   to marked objects we must treat unmarked objects as
29e444
+   compatible with either FLAG_ARM_LIBHF or FLAG_ARM_LIBSF.  */
29e444
 #ifdef __ARM_PCS_VFP
29e444
 # define _dl_cache_check_flags(flags) \
29e444
-  ((flags) == (FLAG_ARM_LIBHF | FLAG_ELF_LIBC6))
29e444
+  ((flags) == (FLAG_ARM_LIBHF | FLAG_ELF_LIBC6) \
29e444
+   || (flags) == FLAG_ELF_LIBC6)
29e444
 #else
29e444
 # define _dl_cache_check_flags(flags) \
29e444
-  ((flags) == FLAG_ELF_LIBC6)
29e444
+  ((flags) == (FLAG_ARM_LIBSF | FLAG_ELF_LIBC6) \
29e444
+   || (flags) == FLAG_ELF_LIBC6)
29e444
 #endif
29e444
 
29e444
 #include_next <dl-cache.h>
12745e
diff --git glibc-2.17-c758a686/ports/sysdeps/unix/sysv/linux/arm/readelflib.c glibc-2.17-c758a686/ports/sysdeps/unix/sysv/linux/arm/readelflib.c
29e444
index 81e5ccb..3efb613 100644
12745e
--- glibc-2.17-c758a686/ports/sysdeps/unix/sysv/linux/arm/readelflib.c
12745e
+++ glibc-2.17-c758a686/ports/sysdeps/unix/sysv/linux/arm/readelflib.c
29e444
@@ -46,6 +46,12 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
29e444
 	  if (elf32_header->e_flags & EF_ARM_ABI_FLOAT_HARD)
29e444
 	    *flag = FLAG_ARM_LIBHF|FLAG_ELF_LIBC6;
29e444
 	  else if (elf32_header->e_flags & EF_ARM_ABI_FLOAT_SOFT)
29e444
+	    *flag = FLAG_ARM_LIBSF|FLAG_ELF_LIBC6;
29e444
+	  else
29e444
+	    /* We must assume the unmarked objects are compatible
29e444
+	       with all ABI variants. Such objects may have been
29e444
+	       generated in a transitional period when the ABI
29e444
+	       tags were not added to all objects.  */
29e444
 	    *flag = FLAG_ELF_LIBC6;
29e444
 	}
29e444
     }
12745e
diff --git glibc-2.17-c758a686/sysdeps/generic/ldconfig.h glibc-2.17-c758a686/sysdeps/generic/ldconfig.h
29e444
index 57a9a46..91190aa 100644
12745e
--- glibc-2.17-c758a686/sysdeps/generic/ldconfig.h
12745e
+++ glibc-2.17-c758a686/sysdeps/generic/ldconfig.h
29e444
@@ -36,6 +36,7 @@
29e444
 #define FLAG_X8664_LIBX32	0x0800
29e444
 #define FLAG_ARM_LIBHF		0x0900
29e444
 #define FLAG_AARCH64_LIB64	0x0a00
29e444
+#define FLAG_ARM_LIBSF		0x0b00
29e444
 
29e444
 /* Name of auxiliary cache.  */
29e444
 #define _PATH_LDCONFIG_AUX_CACHE "/var/cache/ldconfig/aux-cache"