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