Skip to content
Unverified Commit 2aff5f95 authored by Qingfang Deng's avatar Qingfang Deng Committed by Palmer Dabbelt
Browse files

riscv: do not select MODULE_SECTIONS by default

Since commit aad15bc8

 ("riscv: Change code model of module to
medany to improve data accessing"), kernel modules have not been built
with -fPIC, so they wouldn't have R_RISCV_GOT_HI20 or R_RISCV_CALL_PLT
relocations, and handling of those relocations is unnecessary.

If RELOCATABLE=y, kernel modules will be built with -fPIE, which would
reintroduce said relocations, so only select MODULE_SECTIONS when
RELOCATABLE.

Signed-off-by: default avatarQingfang Deng <qingfang.deng@siflower.com.cn>
Reviewed-by: default avatarCharlie Jenkins <charlie@rivosinc.com>
Link: https://lore.kernel.org/r/20240511015725.1162-1-dqfext@gmail.com
Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent 07501c49
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment