Skip to content

LLVM 18: R_X86_64_32S relocation is used for medium model (--size-level=1) #3035

Open
@yamt

Description

@yamt

with the recent version of LLVM, wamrc --size-level=1 often generates R_X86_64_32S relocations.
it's bad because we suggest --size-level=1 to avoid that kind of relocations.

snprintf(buf, sizeof(buf),
"AOT module load failed: "
"relocation truncated to fit %s failed. "
"Try using wamrc with --size-level=1 option.",
reloc_type == R_X86_64_32 ? "R_X86_64_32"
: "R_X86_64_32S");

it seems the relocation is for jump tables.

a workaround: disable jump tables
another workaround: use large model (but it's broken for other reasons: #3034)

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