Commit 845adf7266a7ba6970bf982ffd96abc60d2018ab

Authored by H. Peter Anvin
1 parent d3dd3b5a29

x86: add a Kconfig symbol for when relocations are needed

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>

Showing 1 changed file with 5 additions and 0 deletions Side-by-side Diff

... ... @@ -1513,6 +1513,11 @@
1513 1513 it has been loaded at and the compile time physical address
1514 1514 (CONFIG_PHYSICAL_START) is ignored.
1515 1515  
  1516 +# Relocation on x86-32 needs some additional build support
  1517 +config X86_NEED_RELOCS
  1518 + def_bool y
  1519 + depends on X86_32 && RELOCATABLE
  1520 +
1516 1521 config PHYSICAL_ALIGN
1517 1522 hex
1518 1523 prompt "Alignment value to which kernel should be aligned" if X86_32