From 15516ed0ef148051fd752a62df3e29ccd09fa457 Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Wed, 18 Jul 2018 16:19:57 -0700 Subject: [PATCH] linker: riscv: Relocate .eh_frame symbol The .eh_frame symbol was causing __data_rom_start to contain the wrong offset into the ROM, resulting in corrupt data copied into RAM by _data_copy(). Fix by placing the .eh_frame in the .text section as is done in include/arch/x86/linker.ld Signed-off-by: Nathaniel Graff --- include/arch/riscv32/common/linker.ld | 1 + 1 file changed, 1 insertion(+) diff --git a/include/arch/riscv32/common/linker.ld b/include/arch/riscv32/common/linker.ld index 36f93ae5ed4..01b6bd2c29f 100644 --- a/include/arch/riscv32/common/linker.ld +++ b/include/arch/riscv32/common/linker.ld @@ -83,6 +83,7 @@ SECTIONS *(.text) *(".text.*") *(.gnu.linkonce.t.*) + *(.eh_frame) } GROUP_LINK_IN(ROMABLE_REGION) _image_text_end = .;