summaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/powerpc32/dl-machine.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/powerpc32/dl-machine.h')
-rw-r--r--sysdeps/powerpc/powerpc32/dl-machine.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/sysdeps/powerpc/powerpc32/dl-machine.h b/sysdeps/powerpc/powerpc32/dl-machine.h
index 8b0c0671f8..88e7941f2f 100644
--- a/sysdeps/powerpc/powerpc32/dl-machine.h
+++ b/sysdeps/powerpc/powerpc32/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. PowerPC version.
- Copyright (C) 1995-2015 Free Software Foundation, Inc.
+ Copyright (C) 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
@@ -24,6 +24,7 @@
#include <assert.h>
#include <dl-tls.h>
#include <dl-irel.h>
+#include <hwcapinfo.h>
/* Translate a processor specific dynamic tag to the index
in l_info array. */
@@ -150,6 +151,19 @@ __elf_preferred_address(struct link_map *loader, size_t maplength,
#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
+
/* Set up the loaded object described by MAP so its unrelocated PLT
entries will jump to the on-demand fixup code in dl-runtime.c.
Also install a small trampoline to be used by entries that have