Closed pmachata closed 9 years ago
Supporting some of the ELF-related constants properly in the current framework is not straightforward. There really needs to be a number of domains, one per architecture, and sometimes possibly one per OS. E.g. STT_SPARC_REGISTER
, STT_PARISC_MILLICODE
and STT_ARM_TFUNC
all have value of 13, but they need to be distinct constants. These issues exist with other constant domains as well.
There is now known-elf.awk which extracts defines from elf.h to X-macro tables. This was used to autogenerate the arch-specific const support for STT_ domain. The API to obtain the domain was changed to pass a parameter with machine to use. The other domains are yet to be made machine-dependent.
Also, the domains from different machines are not comparable. Pretty sure a test case that opens two ELF's from different architectures and proceeds to compare STT_'s from them can be constructed.
You forgot to add the docstrings.
This needs a new value type,
T_ELFSYM
. The following words are related:Missing in that list is at least access to section index. That probably makes no sense to add on its own, but if we ever support ELF sections as value types, there would be a word
section
that yields the associated section.