ImHex-Patterns icon indicating copy to clipboard operation
ImHex-Patterns copied to clipboard

Some raw types for your elf pattern.

Open arizvisa opened this issue 3 years ago • 0 comments

Here's that raw data for your elf pattern that I promised.

First of all, some apologies for not making this into a proper PR as since I don't actually use ImHex I don't have it forked or anything (ui allergies, but I'm still an admirer). Plus, I didn't want to smash up the original elf pattern since I haven't tested this data with your parser. Hence it still being raw.

Also an apology for not doing the conditionals that glue the fields together, or that switch between types based on the values in the headers. As you can imagine that requires parsing logic out of my definitions, and rigging things with Python's ast library would definitely be more time consuming than just a simple type conversion.

In my definitions, I have the header split out, and then based on the header I use either the Elf32 or the Elf64 types.

Some of the bitfields might be wrong because they're in "microsoft-order" which is high-bit first, and it's a little bit clumsy because the byteorder can change based on E_DATA. So those bitfields should be little-endian.

for-werwolv.txt

If there's something you think I can fix, or that would make it easier for you to fit within your syntax, let me know as I can generate these again.

arizvisa avatar Mar 21 '22 01:03 arizvisa