Merge tag 'riscv-for-linus-6.3-mw1' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-block.git] / arch / riscv / kernel / vmlinux.lds.S
index 643ab60e9efb0c04e14f3b7450362d9a84dea2c3..53a8ad65b255fb1e35b5bf1f54cdafc387769d80 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #define RO_EXCEPTION_TABLE_ALIGN       4
+#define RUNTIME_DISCARD_EXIT
 
 #ifdef CONFIG_XIP_KERNEL
 #include "vmlinux-xip.lds.S"
@@ -85,6 +86,9 @@ SECTIONS
        /* Start of init data section */
        __init_data_begin = .;
        INIT_DATA_SECTION(16)
+       .init.bss : {
+               *(.init.bss)    /* from the EFI stub */
+       }
        .exit.data :
        {
                EXIT_DATA
@@ -95,6 +99,10 @@ SECTIONS
                *(.rel.dyn*)
        }
 
+       .rela.dyn : {
+               *(.rela*)
+       }
+
        __init_data_end = .;
 
        . = ALIGN(8);
@@ -140,6 +148,7 @@ SECTIONS
        STABS_DEBUG
        DWARF_DEBUG
        ELF_DETAILS
+       .riscv.attributes 0 : { *(.riscv.attributes) }
 
        DISCARDS
 }