This enables the linker to compact the output a bit more, saving between
1500 bytes (32 bit) and 3300 bytes (64 bit) in the F-segment.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
or $X86_CR4_PSE,%eax
mov %eax,%cr4
- mov $loader_pdpt + FSEGMENT_BASE,%eax
+ mov $loader_pdpt,%eax
mov %eax,%cr3
mov $(X86_CR0_PG | X86_CR0_WP | X86_CR0_PE),%eax
.short gdt_ptr - loader_gdt - 1
.long loader_gdt + FSEGMENT_BASE
+
+ .section ".rodata"
+
.align(4096)
.global loader_pdpt
loader_pdpt:
or $X86_CR4_PAE,%eax
mov %eax,%cr4
- mov $pml4 + FSEGMENT_BASE,%eax
+ mov $pml4,%eax
mov %eax,%cr3
movl $MSR_MTRR_DEF_TYPE,%ecx
.short gdt_ptr - gdt - 1
.long gdt + FSEGMENT_BASE
+
+ .section ".rodata"
+
.align(4096)
pml4:
- .quad pdpt + FSEGMENT_BASE + 0x003
+ .quad pdpt + 0x003
.align(4096)
pdpt:
- .quad pd + FSEGMENT_BASE + 0x003
+ .quad pd + 0x003
.align(4096)
pd: