@@ -307,6 +307,7 @@ _dl_show_auxv (void)
[AT_SYSINFO_EHDR - 2] = { "SYSINFO_EHDR: 0x", hex },
[AT_RANDOM - 2] = { "RANDOM: 0x", hex },
[AT_HWCAP2 - 2] = { "HWCAP2: 0x", hex },
+ [AT_ARM64_MIDR - 2] = { "MIDR: 0x", hex },
};
unsigned int idx = (unsigned int) (av->a_type - 2);
@@ -1058,6 +1058,9 @@ typedef struct
#define AT_L2_CACHESHAPE 36
#define AT_L3_CACHESHAPE 37
+/* AARCH64 MIDR system register. */
+#define AT_ARM64_MIDR 38
+
/* Note section contents. Each entry in the note section begins with
a header of a fixed form. */
new file mode 100644
@@ -0,0 +1,25 @@
+/* Auxiliary vector processing for Linux/AARCH64.
+ Copyright (C) 2015 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+
+extern int __libc_arm64_midr;
+
+#define DL_PLATFORM_AUXV \
+ case AT_ARM64_MIDR: \
+ __libc_arm64_midr = av->a_un.a_val; \
+ break;
new file mode 100644
@@ -0,0 +1,5 @@
+#include "dl-auxv.h"
+
+int __libc_arm64_midr = -1;
+
+#include <sysdeps/unix/sysv/linux/dl-sysdep.c>