提交 1dc818c1 编写于 作者: T Tim Abbott 提交者: H. Peter Anvin

x86: convert compressed loader to use __HEAD and HEAD_TEXT macros.

This has the consequence of changing the section name use for head
code from ".text.head" to ".head.text".

Linus suggested that we merge the ".text.head" section with ".text"
(presumably while preserving the fact that the head code starts at 0).
When I tried this it caused the kernel to not boot.
Signed-off-by: NTim Abbott <tabbott@ksplice.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
上级 d223246e
...@@ -23,13 +23,14 @@ ...@@ -23,13 +23,14 @@
*/ */
.text .text
#include <linux/init.h>
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/segment.h> #include <asm/segment.h>
#include <asm/page_types.h> #include <asm/page_types.h>
#include <asm/boot.h> #include <asm/boot.h>
#include <asm/asm-offsets.h> #include <asm/asm-offsets.h>
.section ".text.head","ax",@progbits __HEAD
ENTRY(startup_32) ENTRY(startup_32)
cld cld
/* /*
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
.code32 .code32
.text .text
#include <linux/init.h>
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/segment.h> #include <asm/segment.h>
#include <asm/pgtable_types.h> #include <asm/pgtable_types.h>
...@@ -33,7 +34,7 @@ ...@@ -33,7 +34,7 @@
#include <asm/processor-flags.h> #include <asm/processor-flags.h>
#include <asm/asm-offsets.h> #include <asm/asm-offsets.h>
.section ".text.head" __HEAD
.code32 .code32
ENTRY(startup_32) ENTRY(startup_32)
cld cld
......
#include <asm-generic/vmlinux.lds.h>
OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT) OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT)
#undef i386 #undef i386
...@@ -18,9 +20,9 @@ SECTIONS ...@@ -18,9 +20,9 @@ SECTIONS
* address 0. * address 0.
*/ */
. = 0; . = 0;
.text.head : { .head.text : {
_head = . ; _head = . ;
*(.text.head) HEAD_TEXT
_ehead = . ; _ehead = . ;
} }
.rodata.compressed : { .rodata.compressed : {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册