From 7101970b3cdb2a0190e69a98352275907ab935a4 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 11 Sep 2022 01:07:52 +0300 Subject: allow building with riscv64-linux-gnu + May warn about PHDR not being in LOAD, there is a flag to silence it (--no-warn-rwx-segment) but it doesn't seem to exist in riscv64-unknown-elf for some reason. --- arch/riscv64/conf/init-link.S | 5 +++++ arch/riscv64/conf/kernel-link.S | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'arch/riscv64/conf') diff --git a/arch/riscv64/conf/init-link.S b/arch/riscv64/conf/init-link.S index ac7f858..f827245 100644 --- a/arch/riscv64/conf/init-link.S +++ b/arch/riscv64/conf/init-link.S @@ -31,4 +31,9 @@ SECTIONS { __init_end = . ; __kernel_size = ; + + .garbage : { + *(.note*) + *(.riscv.attributes) + } } diff --git a/arch/riscv64/conf/kernel-link.S b/arch/riscv64/conf/kernel-link.S index 5673a64..2f000c9 100644 --- a/arch/riscv64/conf/kernel-link.S +++ b/arch/riscv64/conf/kernel-link.S @@ -26,4 +26,9 @@ SECTIONS { } __kernel_end = .; + + .garbage : { + *(.note*) + *(.riscv.attributes) + } } -- cgit v1.3