Skip to content

Commit 5d2388d

Browse files
krajpalmer-dabbelt
authored andcommitted
riscv32: Use medany C model for modules
When CONFIG_CMODEL_MEDLOW is used it ends up generating riscv_hi20_rela relocations in modules which are not resolved during runtime and following errors would be seen [ 4.802714] virtio_input: target 00000000c1539090 can not be addressed by the 32-bit offset from PC = 39148b7b [ 4.854800] virtio_input: target 00000000c1539090 can not be addressed by the 32-bit offset from PC = 9774456d Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 0ddd7ea commit 5d2388d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ifeq ($(CONFIG_DYNAMIC_FTRACE),y)
1616
CC_FLAGS_FTRACE := -fpatchable-function-entry=8
1717
endif
1818

19-
ifeq ($(CONFIG_64BIT)$(CONFIG_CMODEL_MEDLOW),yy)
19+
ifeq ($(CONFIG_CMODEL_MEDLOW),y)
2020
KBUILD_CFLAGS_MODULE += -mcmodel=medany
2121
endif
2222

0 commit comments

Comments
 (0)