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)
Sat, Apr 13, 10:39 PM
Unknown Object (File)
Sun, Apr 7, 4:00 AM
Unknown Object (File)
Sat, Apr 6, 1:00 AM
Unknown Object (File)
Sat, Apr 6, 1:00 AM
Unknown Object (File)
Jan 16 2024, 10:22 PM
Unknown Object (File)
Jan 13 2024, 5:11 PM
Unknown Object (File)
Dec 23 2023, 5:35 AM
Unknown Object (File)
Dec 23 2023, 12: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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 25061
Build 23774: arc lint + arc unit

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

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

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.