update sys/elf.h for recent processors like aarch64/risc-v
The sys/elf.h header hasn't been updated for some time. There are many newer machine constants and types that would be useful to have the system understand. This change updates the header based on the most recent edition of the SYS V GABI.
To test this I went through and used elfedit to change the e_machine value and used elfdump to print all the types and then compared the set values with sys/elf.h and the values that were present in the output. This importantly tests all the wholes in the regions. To do the tests I ran something to the effect of:
for i in $(seq 1 245); do elfedit -e "ehdr:e_machine $i" ./ld.so.1 ; elfdump -e ./ld.so.1 | grep e_machine; done for i in $(seq 1 245); do elfedit -e "ehdr:e_machine $i" ./ld.so.1 ; file ./ld.so.1; done
Updated by Electric Monk over 2 years ago
- Status changed from New to Closed
commit 856f620e96e5413932a6607aea5094db2ece172f Author: Robert Mustacchi <firstname.lastname@example.org> Date: 2018-09-24T18:35:18.000Z 9819 update sys/elf.h for recent processors like aarch64/risc-v Reviewed by: Jerry Jelinek <email@example.com> Reviewed by: Richard Lowe <firstname.lastname@example.org> Reviewed by: Jake Saferstein <email@example.com> Reviewed by: Brad Walker <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>