x86/boot: early data should live in init.rodata
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 29 Apr 2014 13:17:37 +0000 (15:17 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 29 Apr 2014 13:17:37 +0000 (15:17 +0200)
No real change as these were already in the init section, but does move it out
of a text section.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/boot/cmdline.S
xen/arch/x86/boot/head.S

index e1f45951a9e212b794d28aef1715b0e3381d093d..00687eb02308b180f533c2b2875a748178f45f37 100644 (file)
@@ -329,6 +329,8 @@ cmdline_parse_early:
         popa
         ret
 
+        .pushsection .init.rodata, "a", @progbits
+
 .Lvga_text_modes: /* rows, mode_number */
         .word   25,VIDEO_80x25
         .word   50,VIDEO_80x50
@@ -361,3 +363,5 @@ cmdline_parse_early:
         .asciz  "no"
 .Ledd_opt:
         .asciz  "edd"
+
+        .popsection
index 1777c17126dbbaf3013b5bce4f9340df22da3c3f..0d87b27737c9c8333bc85f08f4651cca0e5ca76f 100644 (file)
@@ -32,11 +32,19 @@ ENTRY(start)
         /* Checksum: must be the negated sum of the first two fields. */
         .long   -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
 
-        .section .init.text, "ax"
+        .section .init.rodata, "a", @progbits
+        .align 4
+
+        .word   0
+gdt_boot_descr:
+        .word   6*8-1
+        .long   sym_phys(trampoline_gdt)
 
 .Lbad_cpu_msg: .asciz "ERR: Not a 64-bit CPU!"
 .Lbad_ldr_msg: .asciz "ERR: Not a Multiboot bootloader!"
 
+        .section .init.text, "ax", @progbits
+
 bad_cpu:
         mov     $(sym_phys(.Lbad_cpu_msg)),%esi # Error message
         jmp     print_err
@@ -59,10 +67,6 @@ print_err:
         stosb                  # Write an attribute to the VGA framebuffer
         jmp     1b
 
-gdt_boot_descr:
-        .word   6*8-1
-        .long   sym_phys(trampoline_gdt)
-
 __start:
         cld
         cli