Skip to content

Commit

Permalink
x86, setup: move 32-bit code to .text32
Browse files Browse the repository at this point in the history
Impact: cleanup

The setup code is mostly 16-bit code, but there is a small stub of
32-bit code at the end.  Move the 32-bit code to a separate segment,
.text32, to avoid scrambling the disassembly.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
  • Loading branch information
H. Peter Anvin committed Mar 17, 2009
1 parent 0ca0f16 commit be72169
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions arch/x86/boot/pmjump.S
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ GLOBAL(protected_mode_jump)
ENDPROC(protected_mode_jump)

.code32
.section ".text32","ax"
GLOBAL(in_pm32)
# Set up data segments for flat 32-bit mode
movl %ecx, %ds
Expand Down
3 changes: 2 additions & 1 deletion arch/x86/boot/setup.ld
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ SECTIONS
.header : { *(.header) }
.inittext : { *(.inittext) }
.initdata : { *(.initdata) }
.text : { *(.text*) }
.text : { *(.text) }
.text32 : { *(.text32) }

. = ALIGN(16);
.rodata : { *(.rodata*) }
Expand Down

0 comments on commit be72169

Please sign in to comment.