Non-determinism of dict enumeration results in non-deterministic parsing
If we enumerate the segments of an ARM EABI ELF file and print the p_type field of each, we print different results on different runs with the same input. Both PT_ARM_UNWIND and PT_AARCH64_UNWIND have the value 0x70000001; we decode this value using the Enum facility of the Construct library. Depending on the order in which we enumerate the ENUM_P_TYPE entries, Enum can prefer either PT_ARM_UNWIND or PT_AARCH64_UNWIND.
Enumeration mappings we provide to Construct should never be ambiguous!
I forget, but is it actually correct for them to have the same value?
Yes, the values for PT_ARM_UNWIND and PR_AARCH64_UNWIND fall within the PT_LOPROC - PT_HIPROC range, which is an inclusive range reserved for processor-specific semantics. (0x70000000 - 0x7fffffff)
Same should ideally be applied for *_LOPROC - *_HIPROC and _*LOOS - *_HIOS ranges for other ELF fields.
Also discussed in #121
I believe this should be addressed by the latest commit (linked above ^^^).