Skip to content
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

Explicitly add relocation bounds to table 3 in riscv-elf.adoc #457

Open
WorldofJARcraft opened this issue Dec 19, 2024 · 2 comments
Open

Comments

@WorldofJARcraft
Copy link

WorldofJARcraft commented Dec 19, 2024

Table 3 in riscv-elf.adoc (currently section 8.4, table 9 in the latest release document) lists the target encodings and computation for all types of relocation. The table gives the type of instruction or data modified and informally states the range of the relocation (e.g., 12-bit PC-relative branch offset for BRANCH).
Based on my experience implementing RISC-V relocations for the zephyr RTOS, I think the table would be easier to read and implement if it would instead state the range of the relocation as an explicit interval, e.g., [-4096, +4094] for the BRANCH relocation.
If you agree this is useful, I will submit a PR accordingly.

@jrtc27
Copy link
Collaborator

jrtc27 commented Dec 19, 2024

That table is already pretty squished when building a PDF, so I'd worry about making it even worse by adding redundant information

@WorldofJARcraft
Copy link
Author

The extra information might fit into the description column without increasing the size of the table too much.

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