|
@@ -659,6 +659,23 @@ static const char *get_elf_platform(void)
|
|
#undef END
|
|
#undef END
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#if TARGET_BIG_ENDIAN
|
|
|
|
+#include "elf.h"
|
|
|
|
+#include "vdso-be8.c.inc"
|
|
|
|
+#include "vdso-be32.c.inc"
|
|
|
|
+
|
|
|
|
+static const VdsoImageInfo *vdso_image_info(uint32_t elf_flags)
|
|
|
|
+{
|
|
|
|
+ return (EF_ARM_EABI_VERSION(elf_flags) >= EF_ARM_EABI_VER4
|
|
|
|
+ && (elf_flags & EF_ARM_BE8)
|
|
|
|
+ ? &vdso_be8_image_info
|
|
|
|
+ : &vdso_be32_image_info);
|
|
|
|
+}
|
|
|
|
+#define vdso_image_info vdso_image_info
|
|
|
|
+#else
|
|
|
|
+# define VDSO_HEADER "vdso-le.c.inc"
|
|
|
|
+#endif
|
|
|
|
+
|
|
#else
|
|
#else
|
|
/* 64 bit ARM definitions */
|
|
/* 64 bit ARM definitions */
|
|
|
|
|
|
@@ -958,14 +975,14 @@ const char *elf_hwcap2_str(uint32_t bit)
|
|
|
|
|
|
#undef GET_FEATURE_ID
|
|
#undef GET_FEATURE_ID
|
|
|
|
|
|
-#endif /* not TARGET_AARCH64 */
|
|
|
|
-
|
|
|
|
#if TARGET_BIG_ENDIAN
|
|
#if TARGET_BIG_ENDIAN
|
|
# define VDSO_HEADER "vdso-be.c.inc"
|
|
# define VDSO_HEADER "vdso-be.c.inc"
|
|
#else
|
|
#else
|
|
# define VDSO_HEADER "vdso-le.c.inc"
|
|
# define VDSO_HEADER "vdso-le.c.inc"
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+#endif /* not TARGET_AARCH64 */
|
|
|
|
+
|
|
#endif /* TARGET_ARM */
|
|
#endif /* TARGET_ARM */
|
|
|
|
|
|
#ifdef TARGET_SPARC
|
|
#ifdef TARGET_SPARC
|
|
@@ -3524,12 +3541,14 @@ static void load_elf_interp(const char *filename, struct image_info *info,
|
|
load_elf_image(filename, &src, info, &ehdr, NULL);
|
|
load_elf_image(filename, &src, info, &ehdr, NULL);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifndef vdso_image_info
|
|
#ifdef VDSO_HEADER
|
|
#ifdef VDSO_HEADER
|
|
#include VDSO_HEADER
|
|
#include VDSO_HEADER
|
|
-#define vdso_image_info() &vdso_image_info
|
|
|
|
|
|
+#define vdso_image_info(flags) &vdso_image_info
|
|
#else
|
|
#else
|
|
-#define vdso_image_info() NULL
|
|
|
|
-#endif
|
|
|
|
|
|
+#define vdso_image_info(flags) NULL
|
|
|
|
+#endif /* VDSO_HEADER */
|
|
|
|
+#endif /* vdso_image_info */
|
|
|
|
|
|
static void load_elf_vdso(struct image_info *info, const VdsoImageInfo *vdso)
|
|
static void load_elf_vdso(struct image_info *info, const VdsoImageInfo *vdso)
|
|
{
|
|
{
|
|
@@ -3860,7 +3879,7 @@ int load_elf_binary(struct linux_binprm *bprm, struct image_info *info)
|
|
* Load a vdso if available, which will amongst other things contain the
|
|
* Load a vdso if available, which will amongst other things contain the
|
|
* signal trampolines. Otherwise, allocate a separate page for them.
|
|
* signal trampolines. Otherwise, allocate a separate page for them.
|
|
*/
|
|
*/
|
|
- const VdsoImageInfo *vdso = vdso_image_info();
|
|
|
|
|
|
+ const VdsoImageInfo *vdso = vdso_image_info(info->elf_flags);
|
|
if (vdso) {
|
|
if (vdso) {
|
|
load_elf_vdso(&vdso_info, vdso);
|
|
load_elf_vdso(&vdso_info, vdso);
|
|
info->vdso = vdso_info.load_bias;
|
|
info->vdso = vdso_info.load_bias;
|