Page MenuHomeFreeBSD

Add some missing RISC-V ELF defines
ClosedPublic

Authored by mhorne on Jun 26 2019, 1:09 AM.
Tags
None
Referenced Files
F151987890: D20766.id59043.diff
Sat, Apr 11, 11:10 PM
F151969649: D20766.id59064.diff
Sat, Apr 11, 8:31 PM
F151903072: D20766.id59038.diff
Sat, Apr 11, 11:09 AM
Unknown Object (File)
Fri, Apr 10, 12:23 PM
Unknown Object (File)
Tue, Apr 7, 9:39 PM
Unknown Object (File)
Tue, Apr 7, 12:36 PM
Unknown Object (File)
Tue, Apr 7, 8:10 AM
Unknown Object (File)
Sat, Apr 4, 11:40 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.