{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Data.Elf.Constants.Data where
import Data.Binary
import Data.Binary.Put
import Data.Binary.Get
import Data.Bits
import Data.Elf.Constants.TH
import Data.Endian
$(mkDeclarations BaseWord8 "ElfOSABI" "ELFOSABI"
[ ("_SYSV", 0, "No extensions or unspecified")
, ("_HPUX", 1, "Hewlett-Packard HP-UX")
, ("_NETBSD", 2, "NetBSD")
, ("_LINUX", 3, "Linux")
, ("_SOLARIS", 6, "Sun Solaris")
, ("_AIX", 7, "AIX")
, ("_IRIX", 8, "IRIX")
, ("_FREEBSD", 9, "FreeBSD")
, ("_TRU64", 10, "Compaq TRU64 UNIX")
, ("_MODESTO", 11, "Novell Modesto")
, ("_OPENBSD", 12, "Open BSD")
, ("_OPENVMS", 13, "Open VMS")
, ("_NSK", 14, "Hewlett-Packard Non-Stop Kernel")
, ("_AROS", 15, "Amiga Research OS")
, ("_ARM", 97, "ARM")
, ("_STANDALONE", 255, "Standalone (embedded) application")
])
$(mkDeclarations BaseWord16 "ElfType" "ET"
[ ("_NONE", 0, "Unspecified type")
, ("_REL", 1, "Relocatable object file")
, ("_EXEC", 2, "Executable object file")
, ("_DYN", 3, "Shared object file")
, ("_CORE", 4, "Core dump object file")
])
$