The RISC-V ELF header definitions can be found at: https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md#file-header
Details
Sample outputs from readelf -h:
ELF Header: Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2's complement, little endian Version: 1 (current) OS/ABI: NONE ABI Version: 0 Type: EXEC (Executable file) Machine: RISC-V Version: 0x1 Entry point address: 0x120aa Start of program headers: 64 (bytes into file) Start of section headers: 15976 (bytes into file) Flags: 0x5, double-float ABI, RVC Size of this header: 64 (bytes) Size of program headers: 56 (bytes) Number of program headers: 7 Size of section headers: 64 (bytes) Number of section headers: 26 Section header string table index: 25
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
What is the process for committing changes to elftoolchain? Should I commit them to FreeBSD and make separate submissions for the upstream repo?
contrib/elftoolchain/common/elfdefinitions.h | ||
---|---|---|
431 ↗ | (On Diff #59066) | I'm not sure if this file needs an EF_RISCV_FLOAT_ABI_SOFT as well. Honestly I'm not sure what uses these definitions since readelf uses sys/elf_common.h. Is this still worth keeping in the same commit? |
You can just commit to FreeBSD for now. @emaste asked me to submit my recent changes as commits against https://github.com/elftoolchain/elftoolchain so I guess you could do that too, but maybe see if he chimes in here first.
contrib/elftoolchain/common/elfdefinitions.h | ||
---|---|---|
431 ↗ | (On Diff #59066) | I don't think it hurts to keep it. I'm not sure what these are used for. They might be useful on other operating systems which don't have an equivalent system header. |
Ideally we'd commit changes upstream and then import a new version with a latency of several days or a week or so but that process seems to be somewhat slow right now so I'm fine with just committing to FreeBSD and then having @markj or me work on upstreaming changes in batches.
That said if you do have changes in a GitHub fork (and submit pull requests or just point me at them) I can cherry pick and git-svn commit.
Patches sent to elftoolchain-developers and tickets filed on SF are
usually responded to within a few days (usually by the weekend).
Regards,
Joseph Koshy
contrib/elftoolchain/common/elfdefinitions.h | ||
---|---|---|
431 ↗ | (On Diff #59066) | You were right, it needs to be defined here to build the upstream elftoolchain, even on FreeBSD. |