Skip to content
Commit 09accc3a authored by Damien Le Moal's avatar Damien Le Moal Committed by Greg Ungerer
Browse files

riscv: Disable data start offset in flat binaries



uclibc/gcc combined with elf2flt riscv linker file fully resolve the
PC relative __global_pointer$ value at compile time and do not generate
a relocation entry to set a correct value of the gp register at runtime.
As a result, if the flatbin loader offsets the start of the data
section, the relative position change between the text and data sections
compared to the compile time positions results in an incorrect gp value
being used. This causes flatbin executables to crash.

Avoid this problem by enabling CONFIG_BINFMT_FLAT_NO_DATA_START_OFFSET
automatically when CONFIG_RISCV is enabled and CONFIG_MMU is disabled.

Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
Acked-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: default avatarGreg Ungerer <gerg@linux-m68k.org>
parent 04d82a6d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment