There are a lot of constants. The ones defined by the platform are exposed by pylibelf in this module. The constants are represented using the Type class from the elf module, with their name and documentation, if available. libelf already lists a few constants that can be used in certain situations. For a complete overview of the available constants see the following files in the pylibelf source:
- pylibelf/constants_elf_h
- pylibelf/constants_elf_h_relocation
- pylibelf/constants_elf_h_dynamic
- pylibelf/constants_libelf_h
See also the ELF specification [1].
When figuring out which flags apply where, it can also help to open an existing object file and simply print it (or parts of it).
References
[1] | http://www.skyfree.org/linux/references/ELF_Format.pdf |