Skip to content

Also group CFI jump tables according to sections #140943

Open
@PiJoules

Description

@PiJoules

We have an embedded project that groups different functions into different custom sections. If I have function A in a custom section .ram_code that references another function B in the same section (through inline asm in my case), then the reference to B instead refers to the jumptable entry for B. This jump table is placed in .text.B. The linker script used for this project places .text very far away from .ram_code leading to relocation R_RISCV_JAL out of range.

I think the fix emitting jump tables per section in addition to per function type such that jump tables for functions in unique sections are in the same sections as those functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    llvmUmbrella label for LLVM issues

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions