Skip to content

relocation fails on RISC-V AOT with opt level > 0 #4765

@psilva261

Description

@psilva261

The compilation for RISC-V with wamrc

wamrc --target=riscv64 \
--target-abi=lp64 \
--cpu=generic-rv64 \
--cpu-features='+i,+m,+a' \
--opt-level=1 \
--size-level=1 \
--bounds-checks=1 \
-o program.riscv64.wamr program.wasm

runs through. But during runtime I get:

[00:00:00:000 - 0]: Warning: loader mmap memory address is not in the first 2 Gigabytes of the process address space.
[00:00:00:000 - 0]: Warning: loader mmap memory address is not in the first 2 Gigabytes of the process address space.
[00:00:00:000 - 0]: Warning: loader mmap memory address is not in the first 2 Gigabytes of the process address space.
runtime load module failed: AOT module load failed: relocation truncated to fit R_RISCV_PCREL_LO12_I failed.

--opt-level=0 works though

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions