summaryrefslogtreecommitdiff
path: root/arch/riscv/lib
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv/lib')
-rw-r--r--arch/riscv/lib/crt0_riscv_efi.S15
-rw-r--r--arch/riscv/lib/elf_riscv32_efi.lds4
-rw-r--r--arch/riscv/lib/elf_riscv64_efi.lds4
3 files changed, 7 insertions, 16 deletions
diff --git a/arch/riscv/lib/crt0_riscv_efi.S b/arch/riscv/lib/crt0_riscv_efi.S
index b0a7a39a72..a01e08a3c6 100644
--- a/arch/riscv/lib/crt0_riscv_efi.S
+++ b/arch/riscv/lib/crt0_riscv_efi.S
@@ -71,8 +71,8 @@ extra_header_fields:
#else
.quad 0 /* ImageBase */
#endif
- .long 0x20 /* SectionAlignment */
- .long 0x8 /* FileAlignment */
+ .long 0x200 /* SectionAlignment */
+ .long 0x200 /* FileAlignment */
.short 0 /* MajorOperatingSystemVersion */
.short 0 /* MinorOperatingSystemVersion */
.short 1 /* MajorImageVersion */
@@ -110,16 +110,6 @@ extra_header_fields:
.quad 0 /* ExceptionTable */
.quad 0 /* CertificationTable */
.quad 0 /* BaseRelocationTable */
- .quad 0 /* Debug */
- .quad 0 /* Architecture */
- .quad 0 /* Global Ptr */
- .quad 0 /* TLS Table */
- .quad 0 /* Load Config Table */
- .quad 0 /* Bound Import */
- .quad 0 /* IAT */
- .quad 0 /* Delay Import Descriptor */
- .quad 0 /* CLR Runtime Header */
- .quad 0 /* Reserved */
/* Section table */
section_table:
@@ -158,6 +148,7 @@ section_table:
.short 0 /* NumberOfLineNumbers (0 for executables) */
.long 0xe0500020 /* Characteristics (section flags) */
+ .align 9
_start:
addi sp, sp, -(SIZE_LONG * 3)
SAVE_LONG(a0, 0)
diff --git a/arch/riscv/lib/elf_riscv32_efi.lds b/arch/riscv/lib/elf_riscv32_efi.lds
index 629705fc28..c3e0d20d57 100644
--- a/arch/riscv/lib/elf_riscv32_efi.lds
+++ b/arch/riscv/lib/elf_riscv32_efi.lds
@@ -20,7 +20,7 @@ SECTIONS
*(.gnu.linkonce.t.*)
*(.srodata)
*(.rodata*)
- . = ALIGN(16);
+ . = ALIGN(512);
}
_etext = .;
_text_size = . - _text;
@@ -46,7 +46,7 @@ SECTIONS
*(.bss)
*(.bss.*)
*(COMMON)
- . = ALIGN(16);
+ . = ALIGN(512);
_bss_end = .;
_edata = .;
}
diff --git a/arch/riscv/lib/elf_riscv64_efi.lds b/arch/riscv/lib/elf_riscv64_efi.lds
index aece030c37..ecb9139548 100644
--- a/arch/riscv/lib/elf_riscv64_efi.lds
+++ b/arch/riscv/lib/elf_riscv64_efi.lds
@@ -20,7 +20,7 @@ SECTIONS
*(.gnu.linkonce.t.*)
*(.srodata)
*(.rodata*)
- . = ALIGN(16);
+ . = ALIGN(512);
}
_etext = .;
_text_size = . - _text;
@@ -46,7 +46,7 @@ SECTIONS
*(.bss)
*(.bss.*)
*(COMMON)
- . = ALIGN(16);
+ . = ALIGN(512);
_bss_end = .;
_edata = .;
}