Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86, setup: move 32-bit code to .text32

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>

+3 -1
+1
arch/x86/boot/pmjump.S
··· 47 47 ENDPROC(protected_mode_jump) 48 48 49 49 .code32 50 + .section ".text32","ax" 50 51 GLOBAL(in_pm32) 51 52 # Set up data segments for flat 32-bit mode 52 53 movl %ecx, %ds
+2 -1
arch/x86/boot/setup.ld
··· 17 17 .header : { *(.header) } 18 18 .inittext : { *(.inittext) } 19 19 .initdata : { *(.initdata) } 20 - .text : { *(.text*) } 20 + .text : { *(.text) } 21 + .text32 : { *(.text32) } 21 22 22 23 . = ALIGN(16); 23 24 .rodata : { *(.rodata*) }