x86: add a Kconfig symbol for when relocations are needed
authorH. Peter Anvin <hpa@zytor.com>
Wed, 6 May 2009 04:20:51 +0000 (21:20 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Sat, 9 May 2009 00:16:22 +0000 (17:16 -0700)
We only need to build relocations when we are building a 32-bit
relocatable kernel.  Rather than unnecessarily complicating the
Makefiles, make an explicit Kbuild symbol for this.

[ Impact: permits future cleanup ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
arch/x86/Kconfig

index 039c3f04aac5bd550f471d75e7e2ddfcc83c212a..5aee45356b58d69c00fd1abe80be76c781377bf7 100644 (file)
@@ -1513,6 +1513,11 @@ config RELOCATABLE
          it has been loaded at and the compile time physical address
          (CONFIG_PHYSICAL_START) is ignored.
 
+# Relocation on x86-32 needs some additional build support
+config X86_NEED_RELOCS
+       def_bool y
+       depends on X86_32 && RELOCATABLE
+
 config PHYSICAL_ALIGN
        hex
        prompt "Alignment value to which kernel should be aligned" if X86_32