x86: efi: Add EFI loader support for x86
[oweals/u-boot.git] / arch / x86 / cpu / u-boot.lds
index b0d8531a605743cca554a00bfe6ccc762476e8a4..cca536b27239e847a93eb7ad41ec82b5f1e1476f 100644 (file)
@@ -12,6 +12,10 @@ ENTRY(_start)
 
 SECTIONS
 {
+#ifndef CONFIG_CMDLINE
+       /DISCARD/ : { *(.u_boot_list_2_cmd_*) }
+#endif
+
        . = CONFIG_SYS_TEXT_BASE;       /* Location of bootcode in flash */
        __text_start = .;
        .text  : { *(.text*); }
@@ -24,7 +28,10 @@ SECTIONS
        }
 
        . = ALIGN(4);
-       .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
+       .rodata : {
+               *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
+               KEEP(*(.rodata.efi.init));
+       }
 
        . = ALIGN(4);
        .data : { *(.data*) }
@@ -36,6 +43,37 @@ SECTIONS
        .got : { *(.got*) }
 
        . = ALIGN(4);
+
+       .__efi_runtime_start : {
+               *(.__efi_runtime_start)
+       }
+
+       .efi_runtime : {
+               *(efi_runtime_text)
+               *(efi_runtime_data)
+       }
+
+       .__efi_runtime_stop : {
+               *(.__efi_runtime_stop)
+       }
+
+       .efi_runtime_rel_start :
+       {
+               *(.__efi_runtime_rel_start)
+       }
+
+       .efi_runtime_rel : {
+               *(.relefi_runtime_text)
+               *(.relefi_runtime_data)
+       }
+
+       .efi_runtime_rel_stop :
+       {
+               *(.__efi_runtime_rel_stop)
+       }
+
+       . = ALIGN(4);
+
        __data_end = .;
        __init_end = .;