about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/libc-start.c24
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/ld-le.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/ld.abilist2
4 files changed, 29 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
index a9364c786a..209a16d88c 100644
--- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c
+++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
@@ -20,6 +20,9 @@
 #include <ldsodefs.h>
 #include <sysdep.h>
 
+#ifndef SHARED
+#include <hwcapinfo.h>
+#endif
 
 int __cache_line_size attribute_hidden;
 /* The main work is done in the generic function.  */
@@ -68,15 +71,34 @@ __libc_start_main (int argc, char **argv,
       rtld_fini = NULL;
     }
 
-  /* Initialize the __cache_line_size variable from the aux vector.  */
+  /* Initialize the __cache_line_size variable from the aux vector.  For the
+     static case, we also need _dl_hwcap, _dl_hwcap2 and _dl_platform, so we
+     can call __tcb_parse_hwcap_and_convert_at_platform ().  */
   for (ElfW (auxv_t) * av = auxvec; av->a_type != AT_NULL; ++av)
     switch (av->a_type)
       {
       case AT_DCACHEBSIZE:
 	__cache_line_size = av->a_un.a_val;
 	break;
+#ifndef SHARED
+      case AT_HWCAP:
+	_dl_hwcap = (unsigned long int) av->a_un.a_val;
+	break;
+      case AT_HWCAP2:
+	_dl_hwcap2 = (unsigned long int) av->a_un.a_val;
+	break;
+      case AT_PLATFORM:
+	_dl_platform = (void *) av->a_un.a_val;
+	break;
+#endif
       }
 
+  /* Initialize hwcap/hwcap2 and platform data so it can be copied to
+     the TCB later in __libc_setup_tls (). (static case only).  */
+#ifndef SHARED
+  __tcb_parse_hwcap_and_convert_at_platform ();
+#endif
+
   return generic_start_main (stinfo->main, argc, argv, auxvec,
 			     stinfo->init, stinfo->fini, rtld_fini,
 			     stack_on_entry);
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist
index 6f554dcad5..2eb4d5fef1 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist
@@ -10,6 +10,8 @@ GLIBC_2.1 __libc_stack_end D 0x4
 GLIBC_2.1 _dl_mcount F
 GLIBC_2.22 GLIBC_2.22 A
 GLIBC_2.22 __tls_get_addr_opt F
+GLIBC_2.23 GLIBC_2.23 A
+GLIBC_2.23 __parse_hwcap_and_convert_at_platform F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __tls_get_addr F
 GLIBC_2.4 GLIBC_2.4 A
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld-le.abilist
index 15553c156f..27d451b46b 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld-le.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld-le.abilist
@@ -10,3 +10,5 @@ GLIBC_2.17 malloc F
 GLIBC_2.17 realloc F
 GLIBC_2.22 GLIBC_2.22 A
 GLIBC_2.22 __tls_get_addr_opt F
+GLIBC_2.23 GLIBC_2.23 A
+GLIBC_2.23 __parse_hwcap_and_convert_at_platform F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld.abilist
index ca573ea447..8914eb06b4 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld.abilist
@@ -1,5 +1,7 @@
 GLIBC_2.22 GLIBC_2.22 A
 GLIBC_2.22 __tls_get_addr_opt F
+GLIBC_2.23 GLIBC_2.23 A
+GLIBC_2.23 __parse_hwcap_and_convert_at_platform F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __libc_memalign F
 GLIBC_2.3 __libc_stack_end D 0x8