Previously elftoolchain readelf(1) only displayed correct names for Linux note types.
Upstream elftoolchain ticket #473 https://sourceforge.net/p/elftoolchain/tickets/473/
Details
- Reviewers
kib - Commits
- rS276705: readelf: Handle note types from different operating systems
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
This looks odd. Why are we relying on magic numbers instead of constants/enums like before?
Some of the constants in the previous version are Linux-specific, and don't exist in our ELF headers.
We could make up our own constants (e.g. NT_LINUX_AUXV) but it doesn't seem like that would provide much value. The same constant name may have different values on different OSes.
Not quite, just that the note types are vendor-specific and in a namespace specific to the note name (vendor). NT_PRSTATUS, NT_FPREGSET, and NT_FPREGSET happen to have the same value on Linux and FreeBSD. We don't currently have definitions in our ELF headers for Linux-specific note types like NT_LWPSTATUS, and I'd find it somewhat odd to add them without somehow putting them in a namespace in the header.