Skip to content

使用 riscv64-xs编译时报错relocation truncated to fit: R_RISCV_HI20,编译器重新安装了也没法解决,使用-mcmodel=medany 选项也无法解决 #52

@Bobbchten

Description

@Bobbchten

/home/ccb/Desktop/nexus-am/apps/coremark/build/riscv64-xs//./src/core_portme.o: in function start_time':
/home/ccb/Desktop/nexus-am/apps/coremark/src/core_portme.c:49:(.text+0xe): relocation truncated to fit: R_RISCV_HI20 against symbol start_time_val' defined in .sbss section in /home/ccb/Desktop/nexus-am/apps/coremark/build/riscv64-xs//./src/core_portme.o
/home/ccb/Desktop/nexus-am/apps/coremark/build/riscv64-xs//./src/core_state.o: in function core_init_state':
/home/ccb/Desktop/nexus-am/apps/coremark/src/core_state.c:133:(.text+0x1a): relocation truncated to fit: R_RISCV_HI20 against .LANCHOR0'
/home/ccb/Desktop/nexus-am/apps/coremark/build/riscv64-xs//./src/core_list_join.o: in function core_bench_list':
/home/ccb/Desktop/nexus-am/apps/coremark/src/core_list_join.c:170:(.text+0x3ae): relocation truncated to fit: R_RISCV_HI20 against symbol cmp_complex' defined in .text section in /home/ccb/Desktop/nexus-am/apps/coremark/build/riscv64-xs//./src/core_list_join.o
/home/ccb/Desktop/nexus-am/apps/coremark/build/riscv64-xs//./src/core_main.o: in function main':
/home/ccb/Desktop/nexus-am/apps/coremark/src/core_main.c:104:(.text.startup+0x26): relocation truncated to fit: R_RISCV_HI20 against .LC0'
/home/ccb/Desktop/nexus-am/apps/coremark/build/riscv64-xs//./src/core_util.o: in function get_seed_32':
/home/ccb/Desktop/nexus-am/apps/coremark/src/core_util.c:41:(.text+0x6): relocation truncated to fit: R_RISCV_HI20 against .L4'
/home/ccb/Desktop/nexus-am/am/build/am-riscv64-xs.a(input.o): in function __am_input_read':
/home/ccb/Desktop/nexus-am/am/src/noop/common/input.c:35:(.text.__am_input_read+0xe): relocation truncated to fit: R_RISCV_HI20 against .LANCHOR0'
/home/ccb/Desktop/nexus-am/am/build/am-riscv64-xs.a(timer.o): in function __am_timer_read':
/home/ccb/Desktop/nexus-am/am/src/noop/common/timer.c:16:(.text.__am_timer_read+0x7c): relocation truncated to fit: R_RISCV_HI20 against .LANCHOR0'
/home/ccb/Desktop/nexus-am/am/build/am-riscv64-xs.a(timer.o): in function __am_timer_init':
/home/ccb/Desktop/nexus-am/am/src/noop/common/timer.c:35:(.text.__am_timer_init+0x8): relocation truncated to fit: R_RISCV_HI20 against .LANCHOR0'
/home/ccb/Desktop/nexus-am/am/build/am-riscv64-xs.a(trm.o): in function _halt':
/home/ccb/Desktop/nexus-am/am/src/noop/isa/riscv/trm.c:30:(.text._halt+0xc): relocation truncated to fit: R_RISCV_HI20 against .LC0'
/home/ccb/Desktop/nexus-am/am/build/am-riscv64-xs.a(trm.o): in function _trm_init':
/home/ccb/Desktop/nexus-am/am/src/noop/isa/riscv/trm.c:40:(.text._trm_init+0x8): relocation truncated to fit: R_RISCV_HI20 against symbol __am_mainargs' defined in .rodata section in /home/ccb/Desktop/nexus-am/am/build/am-riscv64-xs.a(mainargs.o)
/home/ccb/Desktop/nexus-am/libs/klib/build/klib-riscv64-xs.a(printf.o): in function _etoa':
/home/ccb/Desktop/nexus-am/libs/klib/src/printf.c:470:(.text._etoa+0x2c): additional relocation overflows omitted from the output
make: *** [/home/ccb/Desktop/nexus-am/am/arch/riscv64-xs.mk:38: image] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions