hex2 is designed to allow humans to write elf and other binary files by hand in a format that allows
comments and ease of understanding.
At its core is read 2 hex characters add them together and output a single byte. You can override this
and use binary or octal input if you so desire, using the --octal or --binary option.
If no output file is specified the output will be send to standard out. By default the file will be
executable unless the option: --non-executable is also passed.
The supported ARCHITECTURES are as follows: knight-native, knight-posix, x86, amd64, armv7l and aarch64.
If you fail to specify an architecture, the default of knight-native will be used.
The base address for which the binary is to be loaded into memory and thus the relative and absolute
pointers should be based, is passed via --base-address if it is not provided the default value of ZERO
will be assumed.
hex2 also support labels in the :LABEL format and relative and absolute pointers to those labels in 8,
16, 24 or 32bit sizes. !LABEL, @LABEL, ~LABEL and %LABEL for 8, 16, 24 and 32bit relative addresses
respectively and $LABEL and &LABEL for 16 and 32bit absolute addresses respectively. Should you wish to
specify the bit and byte encoding of the addresses to match your target --big-endian and --little-endian
On architectures that require word alignment the < and ^ characters have a special meaning; particularly
pad to word and use word base address calculation rather than standard byte based address calculation;
generally seen in the form: ^~LABEL EB for calls in ARM