diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2012-05-08 14:22:24 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2012-05-18 22:49:40 -0400 |
commit | 6520fe5564acf07ade7b18a1272db1184835c487 (patch) | |
tree | 363c95dea4c9202c2fbe1ebcfd9dd7b97c7422ac /Makefile | |
parent | 36be50515fe2aef61533b516fa2576a2c7fe7664 (diff) |
x86, realmode: 16-bit real-mode code support for relocs tool
A new option is added to the relocs tool called '--realmode'.
This option causes the generation of 16-bit segment relocations
and 32-bit linear relocations for the real-mode code. When
the real-mode code is moved to the low-memory during kernel
initialization, these relocation entries can be used to
relocate the code properly.
In the assembly code 16-bit segment relocations must be relative
to the 'real_mode_seg' absolute symbol. Linear relocations must be
relative to a symbol prefixed with 'pa_'.
16-bit segment relocation is used to load cs:ip in 16-bit code.
Linear relocations are used in the 32-bit code for relocatable
data references. They are declared in the linker script of the
real-mode code.
The relocs tool is moved to arch/x86/tools/relocs.c, and added new
target archscripts that can be used to build scripts needed building
an architecture. be compiled before building the arch/x86 tree.
[ hpa: accelerating this because it detects invalid absolute
relocations, a serious bug in binutils 2.22.52.0.x which currently
produces bad kernels. ]
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/r/1336501366-28617-2-git-send-email-jarkko.sakkinen@intel.com
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: <stable@vger.kernel.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -442,7 +442,7 @@ asm-generic: | |||
442 | 442 | ||
443 | no-dot-config-targets := clean mrproper distclean \ | 443 | no-dot-config-targets := clean mrproper distclean \ |
444 | cscope gtags TAGS tags help %docs check% coccicheck \ | 444 | cscope gtags TAGS tags help %docs check% coccicheck \ |
445 | include/linux/version.h headers_% archheaders \ | 445 | include/linux/version.h headers_% archheaders archscripts \ |
446 | kernelversion %src-pkg | 446 | kernelversion %src-pkg |
447 | 447 | ||
448 | config-targets := 0 | 448 | config-targets := 0 |
@@ -979,7 +979,7 @@ prepare1: prepare2 include/linux/version.h include/generated/utsrelease.h \ | |||
979 | include/config/auto.conf | 979 | include/config/auto.conf |
980 | $(cmd_crmodverdir) | 980 | $(cmd_crmodverdir) |
981 | 981 | ||
982 | archprepare: archheaders prepare1 scripts_basic | 982 | archprepare: archheaders archscripts prepare1 scripts_basic |
983 | 983 | ||
984 | prepare0: archprepare FORCE | 984 | prepare0: archprepare FORCE |
985 | $(Q)$(MAKE) $(build)=. | 985 | $(Q)$(MAKE) $(build)=. |
@@ -1049,8 +1049,11 @@ hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm) | |||
1049 | PHONY += archheaders | 1049 | PHONY += archheaders |
1050 | archheaders: | 1050 | archheaders: |
1051 | 1051 | ||
1052 | PHONY += archscripts | ||
1053 | archscripts: | ||
1054 | |||
1052 | PHONY += __headers | 1055 | PHONY += __headers |
1053 | __headers: include/linux/version.h scripts_basic asm-generic archheaders FORCE | 1056 | __headers: include/linux/version.h scripts_basic asm-generic archheaders archscripts FORCE |
1054 | $(Q)$(MAKE) $(build)=scripts build_unifdef | 1057 | $(Q)$(MAKE) $(build)=scripts build_unifdef |
1055 | 1058 | ||
1056 | PHONY += headers_install_all | 1059 | PHONY += headers_install_all |