Skip to content

Can gp register be used as ponter to GOT table for GOT-based PIC? #462

Description

@versaloon

I find an issue about Embedded PIC at #128 (comment).

GOT-based PIC is a similar concept, but using GOT to implement PIC. For ARM chips, register R9 can be used as pointer to GOT, this is useful when trying to implment xip elf-loader, which will not load .text and .rodata into ram. We implment linux support for CortexM MCU chips with low sram resources by this feature.

But for Riscv, in riscv-elf.adoc, it seems Tag_RISCV_x3_reg_usage does not support this. How to add this feature for riscv?

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