Skip to content

Commit

Permalink
x86: convert compressed loader to use __HEAD and HEAD_TEXT macros.
Browse files Browse the repository at this point in the history
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: Tim 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: H. Peter Anvin <hpa@zytor.com>
  • Loading branch information
Tim Abbott authored and H. Peter Anvin committed Sep 18, 2009
1 parent d223246 commit 1dc818c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion arch/x86/boot/compressed/head_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@
*/
.text

#include <linux/init.h>
#include <linux/linkage.h>
#include <asm/segment.h>
#include <asm/page_types.h>
#include <asm/boot.h>
#include <asm/asm-offsets.h>

.section ".text.head","ax",@progbits
__HEAD
ENTRY(startup_32)
cld
/*
Expand Down
3 changes: 2 additions & 1 deletion arch/x86/boot/compressed/head_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
.code32
.text

#include <linux/init.h>
#include <linux/linkage.h>
#include <asm/segment.h>
#include <asm/pgtable_types.h>
Expand All @@ -33,7 +34,7 @@
#include <asm/processor-flags.h>
#include <asm/asm-offsets.h>

.section ".text.head"
__HEAD
.code32
ENTRY(startup_32)
cld
Expand Down
6 changes: 4 additions & 2 deletions arch/x86/boot/compressed/vmlinux.lds.S
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <asm-generic/vmlinux.lds.h>

OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT)

#undef i386
Expand All @@ -18,9 +20,9 @@ SECTIONS
* address 0.
*/
. = 0;
.text.head : {
.head.text : {
_head = . ;
*(.text.head)
HEAD_TEXT
_ehead = . ;
}
.rodata.compressed : {
Expand Down

0 comments on commit 1dc818c

Please sign in to comment.