1234567891011121314151617181920212223242526272829303132333435(*Generated by Lem from endianness.lem.*)(** [endian.lem] defines a type for describing the endianness of an ELF file,
* and functions and other operations over that type.
*)openLem_stringopenShow(** Type [endianness] describes the endianness of an ELF file. This is deduced from
* the first few bytes (magic number, etc.) of the ELF header.
*)typeendianness=Big(* Big endian *)|Little(* Little endian *)(** [default_endianness] is a default endianness to use when reading in the ELF header
* before we have deduced from its entries what the rest of the file is encoded
* with.
*)(*val default_endianness : endianness*)letdefault_endianness:endianness=Little(** [string_of_endianness e] produces a string representation of the [endianness] value
* [e].
*)(*val string_of_endianness : endianness -> string*)letstring_of_endiannesse:string=((matchewith|Big->"Big"|Little->"Little"))letinstance_Show_Show_Endianness_endianness_dict:(endianness)show_class=({show_method=string_of_endianness})