Merge "Remove dependencies on obsolete __ARCH_WANT_SYSCALL_DEPRECATED system calls."
diff --git a/libc/kernel/tools/defaults.py b/libc/kernel/tools/defaults.py
index 3968605..f6486d7 100644
--- a/libc/kernel/tools/defaults.py
+++ b/libc/kernel/tools/defaults.py
@@ -34,6 +34,7 @@
"__CHECKER__": kCppUndefinedMacro,
"__CHECK_ENDIAN__": kCppUndefinedMacro,
"CONFIG_X86_32": "__i386__",
+ "__EXPORTED_HEADERS__": "1",
}
# define to true if you want to remove all defined(CONFIG_FOO) tests
diff --git a/libc/kernel/uapi/linux/types.h b/libc/kernel/uapi/linux/types.h
index 3a3b381..4fdfe10 100644
--- a/libc/kernel/uapi/linux/types.h
+++ b/libc/kernel/uapi/linux/types.h
@@ -21,26 +21,23 @@
#include <asm/types.h>
#ifndef __ASSEMBLY__
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
-#ifndef __EXPORTED_HEADERS__
-#warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders"
-#endif
#include <linux/posix_types.h>
-/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define __bitwise__
#define __bitwise
typedef __u16 __bitwise __le16;
-typedef __u16 __bitwise __be16;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+typedef __u16 __bitwise __be16;
typedef __u32 __bitwise __le32;
typedef __u32 __bitwise __be32;
typedef __u64 __bitwise __le64;
-typedef __u64 __bitwise __be64;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+typedef __u64 __bitwise __be64;
typedef __u16 __bitwise __sum16;
typedef __u32 __bitwise __wsum;
#define __aligned_u64 __u64 __attribute__((aligned(8)))
-#define __aligned_be64 __be64 __attribute__((aligned(8)))
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define __aligned_be64 __be64 __attribute__((aligned(8)))
#define __aligned_le64 __le64 __attribute__((aligned(8)))
#endif
#endif
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 4f05c7a..c6264a3 100755
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -1688,8 +1688,10 @@
* phdr_table_protect_segments() after all of them are applied
* and all constructors are run.
*/
+#if !defined(ANDROID_X86_LINKER) // The platform itself has too many text relocations on x86.
DL_WARN("%s has text relocations. This is wasting memory and prevents "
"security hardening. Please fix.", si->name);
+#endif
if (phdr_table_unprotect_segments(si->phdr, si->phnum, si->load_bias) < 0) {
DL_ERR("can't unprotect loadable segments for \"%s\": %s",
si->name, strerror(errno));