Page MenuHomeFreeBSD

Add some missing RISC-V ELF defines
ClosedPublic

Authored by mhorne on Jun 26 2019, 1:09 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 7:22 PM
Unknown Object (File)
Oct 2 2024, 8:36 AM
Unknown Object (File)
Sep 5 2024, 8:13 PM
Unknown Object (File)
Sep 5 2024, 8:14 AM
Unknown Object (File)
Sep 4 2024, 3:07 PM
Unknown Object (File)
Sep 2 2024, 1:39 AM
Unknown Object (File)
Aug 31 2024, 8:49 PM
Unknown Object (File)
Aug 30 2024, 4:53 AM
Subscribers

Details

Summary

This adds defines for the RISC-V specific e_flags values, and some
missing static relocations.

The definitions come from the RISC-V ELF specification, found at:
https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Include a definition for EF_RISCV_FLOAT_ABI_SOFT. Although this is not defined
in the RISC-V ELF spec, this zero value serves as an easy check.

sys/sys/elf_common.h
373 ↗(On Diff #59043)

I'm not sure it makes sense to include this one. If you wanted to test for the software ABI you'd write (e_flags & EF_RISCV_FLOAT_ABI_MASK) == 0, where the mask is 0x6.

sys/sys/elf_common.h
373 ↗(On Diff #59043)

After seeing the follow-up review, what you did here makes more sense. I'd just suggest adding a _MASK define instead of using _QUAD.

Add EF_RISCV_FLOAT_ABI_MASK

This revision is now accepted and ready to land.Jun 26 2019, 4:39 PM
This revision was automatically updated to reflect the committed changes.