mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00

The --gc-sections option enables the linker to perform garbage collection of unreferenced code and data, thereby reducing the binary size. The -ffunction-sections option will place each function into a separate section, so it is necessary to add .text.* to the linker script. Signed-off-by: Kele Zhang <zhangcola2003@gmail.com> Signed-off-by: Yuan Tan <tanyuan@tinylab.org> Signed-off-by: Zhangjin Wu <falcon@tinylab.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Xiang W <wxjstz@126.com> Reviewed-by: Anup Patel <anup@brainfault.org>