summaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/powerpc64/dl-machine.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/powerpc64/dl-machine.h')
-rw-r--r--sysdeps/powerpc/powerpc64/dl-machine.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/sysdeps/powerpc/powerpc64/dl-machine.h b/sysdeps/powerpc/powerpc64/dl-machine.h
index 0576781909..d6f780ec85 100644
--- a/sysdeps/powerpc/powerpc64/dl-machine.h
+++ b/sysdeps/powerpc/powerpc64/dl-machine.h
@@ -1,6 +1,6 @@
/* Machine-dependent ELF dynamic relocation inline functions.
PowerPC64 version.
- Copyright 1995-2015 Free Software Foundation, Inc.
+ Copyright 1995-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,6 +26,7 @@
#include <sys/param.h>
#include <dl-tls.h>
#include <sysdep.h>
+#include <hwcapinfo.h>
/* Translate a processor specific dynamic tag to the index
in l_info array. */
@@ -296,6 +297,19 @@ BODY_PREFIX "_dl_start_user:\n" \
#define ELF_MACHINE_NO_REL 1
#define ELF_MACHINE_NO_RELA 0
+/* We define an initialization function to initialize HWCAP/HWCAP2 and
+ platform data so it can be copied into the TCB later. This is called
+ very early in _dl_sysdep_start for dynamically linked binaries. */
+#ifdef SHARED
+# define DL_PLATFORM_INIT dl_platform_init ()
+
+static inline void __attribute__ ((unused))
+dl_platform_init (void)
+{
+ __tcb_parse_hwcap_and_convert_at_platform ();
+}
+#endif
+
/* Stuff for the PLT. */
#if _CALL_ELF != 2
#define PLT_INITIAL_ENTRY_WORDS 3