993b519
>From e540f21852043a4d8e8cf5e505607909d0ab0f51 Mon Sep 17 00:00:00 2001
993b519
From: Tim Gardner <tim.gardner@canonical.com>
993b519
Date: Thu, 29 Mar 2012 06:21:01 -0600
993b519
Subject: [PATCH] UBUNTU: SAUCE: disable_nx should not be in __cpuinitdata
993b519
 section for X86_32
993b519
993b519
I noticed a section mismatch warning while building 3.2.0-20.33 for X86_32.
993b519
993b519
 AR      arch/x86/lib/lib.a
993b519
  LD      vmlinux.o
993b519
  MODPOST vmlinux.o
993b519
WARNING: vmlinux.o(.text+0x187833): Section mismatch in reference from the function load_elf_binary() to the variable .cpuinit.data:disable_nx
993b519
The function load_elf_binary() references
993b519
the variable __cpuinitdata disable_nx.
993b519
This is often because load_elf_binary lacks a __cpuinitdata
993b519
annotation or the annotation of disable_nx is wrong.
993b519
993b519
load_elf_binary() is definitely called after initialization.
993b519
993b519
This code was added by 'UBUNTU: ubuntu: nx-emu - i386: NX emulation', so
993b519
this is not an upstream problem.
993b519
993b519
Reported-by: Tetsuo Handa <from-ubuntu@I-love.SAKURA.ne.jp>
993b519
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
993b519
---
993b519
 arch/x86/mm/setup_nx.c |    4 ++++
993b519
 1 files changed, 4 insertions(+), 0 deletions(-)
993b519
993b519
diff --git a/arch/x86/mm/setup_nx.c b/arch/x86/mm/setup_nx.c
993b519
index 90c9eff3..89fd946 100644
993b519
--- a/arch/x86/mm/setup_nx.c
993b519
+++ b/arch/x86/mm/setup_nx.c
993b519
@@ -6,7 +6,11 @@
993b519
 #include <asm/pgtable.h>
993b519
 #include <asm/proto.h>
993b519
 
993b519
+#ifdef CONFIG_X86_32
993b519
+int disable_nx; /* referenced by load_elf_binary() */
993b519
+#else
993b519
 int disable_nx __cpuinitdata;
993b519
+#endif
993b519
 
993b519
 /*
993b519
  * noexec = on|off
993b519
-- 
993b519
1.7.9.1
993b519