Page MenuHomeFreeBSD

Add some missing RISC-V ELF defines
ClosedPublic

Authored by mhorne on Jun 26 2019, 1:09 AM.

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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; 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.