Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
versaloon opened this issue May 4, 2025 · 1 comment
Open

Comments

@versaloon
Copy link

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?

@kito-cheng
Copy link
Collaborator

I assume that will come with a new code model to doing that, if so, you can allocate a number for Tag_RISCV_x3_reg_usage with a code model proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants