/*
** data.c for elfsh
** 
** Started on  Mon Feb 26 04:06:38 2001 mayhem
** Last update Mon Mar 25 10:29:37 2002 mayhem
*/
#include "libelfsh.h"





/* Program header (segment) entry strings */
char	*elfsh_seg_type[] = 
{
  "NULL segment",
  "Loadable segment",
  "Dynamic linking info",
  "Program interpreter",
  "Auxiliary information",
  "Reserved",
  "Program header table",
};


/* Program header (segment) short strings */
char	*elfsh_seg_type_short[] = 
{
  "PT_NULL",
  "PT_LOAD",
  "PT_DYNAMIC",
  "PT_INTERP",
  "PT_NOTE",
  "PT_SHLIB",
  "PT_PHDR",
};



/* Section type strings */
char	*elfsh_sh_type[] = 
{
  "NULL section",
  "Program data",
  "Symbol table",
  "String table",
  "Reloc. ent. w/ addends",
  "Symbol hash table",
  "Dynamic linking info",
  "Notes",
  "BSS",
  "Reloc. ent. w/o addends",
  "Reserved",
  "Dynamic linker symtab",
};


/* ELF object type strings */
char	*elfsh_obj_type[] = 
{
  "*Unknown*",
  "Relocatable object",
  "Executable object",
  "Shared object",
  "Core file",
};






/* Symbol Binding strings */
char	*elfsh_sym_bind[] = 
{
  "Local",
  "Global",
  "Weak",
  "Unassigned",				// 3 is "Number of defined types",
  "Unassigned",				// 4
  "Unassigned",				// 5
  "Unassigned",				// 6
  "Unassigned",				// 7
  "Unassigned",				// 8
  "Unassigned",				// 9
  "OS-specific",			// 10 is "start OS Specific"
  "OS-specific",			// 11
  "OS-specific",			// 12
  "Processor-specific",			// 13 is "start Processor Specific"
  "Processor-specific",			// 14
  "Processor-specific",			// 15
};


/* Symbol Type strings */
char	*elfsh_sym_type[] = 
{
  "*Unknown*",
  "Variable",
  "Function",
  "Section",
  "Filename",
};



/* Architecture strings */
char	*elfsh_arch_type[] = 
{
  "No machine",
  "AT&T WE 32100",
  "SUN SPARC",
  "Intel 80386",
  "Motorola m68k family",
  "Motorola m88k family",
  "Intel 80486",
  "Intel 80860",
  "MIPS R3000 big-endian",
  "Amdahl",
  "MIPS R4000 big-endian",
  "RS6000",
  "Unknown",
  "Unknown",
  "Unknown",
  "HPPA",
  "nCUBE",
  "Fujitsu VPP500",
  "Sun's v8plus",
  "Intel 80960",
  "PowerPC",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "NEC V800 series",
  "Fujitsu FR20",
  "TRW RH32",
  "Fujitsu MMA",
  "ARM",
  "Digital Alpha",
  "Hitachi SH",
  "SPARC v9 64-bit",
  "Siemens Tricore",
  "Argonaut RISC Core",
  "Hitachi H8/300",
  "Hitachi H8/300H",
  "Hitachi H8S",
  "Hitachi H8/500",
  "Intel Merced",
  "Stanford MIPS-X",
  "Motorola Coldfire",
  "Motorola M68HC12",
};




/* Dynamic section entry type strings */
char	*elfsh_dynentry_type[] = 
{
  "END OF DYNAMIC SECTION",
  "Name of needed library",
  "Size in bytes for .rel.plt",
  "Processor defined value",
  "Address of symbol hash table",
  "Address of dynamic string table",
  "Address of dynamic symbol table",
  "Address of relocation info w/ add-end",
  "Total size of relocation info w/ add-end",
  "Size of RELA entry",
  "Size of string table",
  "Size of symbol table entry",
  "Address of init function",
  "Address of fini function",
  "Name of shared object",
  "Library search path",
  "Start symbol search here",
  "Address of .rel.got section",
  "Total size of .rel section",
  "Size of a REL entry",
  "Type of reloc in PLT",
  "Debugging entry (unknown)",
  "Reloc might modify .text",
  "Address of .rel.plt",
  "Process relocations of object",
  "Array with addresses of init fct",
  "Array with addresses of fini fct",
  "Size in bytes of DT_INIT_ARRAY",
  "Size in bytes of DT_FINI_ARRAY",
};


char	*elfsh_dynentry_type_short[] = 
{
  "DT_NULL",
  "DT_NEEDED",
  "DT_PLTRELSZ",
  "DT_PLTGOT",
  "DT_HASH",
  "DT_STRTAB",
  "DT_SYMTAB",
  "DT_RELA",
  "DT_RELASZ",
  "DT_RELAENT",
  "DT_STRSZ",
  "DT_SYMENT",
  "DT_INIT",
  "DT_FINI",
  "DT_SONAME",
  "DT_RPATH",
  "DT_SYMBOLIC",
  "DT_REL",
  "DT_RELSZ",
  "DT_RELENT",
  "DT_PLTREL",
  "DT_DEBUG",
  "DT_TEXTREL",
  "DT_JMPREL",
  "DT_BIND_NOW",
  "DT_INIT_ARRAY",
  "DT_FINI_ARRAY",
  "DT_INIT_ARRAYSZ",
  "DT_FINI_ARRAYSZ",
  "DT_RUNPATH",
  "DT_FLAGS",
  "DT_ENCODING",
  "DT_PREINIT_ARRAY",
  "DT_PREINIT_ARRAYSZ",
  "DT_NUM",
};



/* Relocation types strings */
char	*elfsh_rel_type[] = 
{
  "No relocation",
  "Direct 32 bit",
  "Relative 32 bit",
  "32 bit GOT entry",
  "32 bit PLT entry",
  "Copy symbol at runtime",
  "Create GOT entry",
  "Create PLT entry",
  "Adjust by program base address",
  "32 bit offset to GOT",
  "32 bit PC relative offset to GOT",
};


char	*elfsh_rel_type_short[] = 
{
  "R_386_NONE",
  "R_386_32",
  "R_386_PC32",
  "R_386_GOT32",
  "R_386_PLT32",
  "R_386_COPY",
  "R_386_GLOB_DAT",
  "R_386_JMP_SLOT",
  "R_386_RELATIVE",
  "R_386_GOTOFF",
  "R_386_GOTPC",
};




/* Stab entry type strings */
char	*elfsh_stab_type[] = 
{
  "Undefined symbol", 
  "Unknown",
  "File scope absolute symbol",
  "External absolute symbol", 
  "File scope text symbol", 
  "External text symbol", 
  "File scope data symbol", 
  "External data symbol", 
  "File scope BSS symbol", 
  "External BSS symbol", 
  "Symbol is indirected to another symbol",
  "Unknown",
  "Same as N_FN, for Sequent compilers",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Common--visible after shared library dynamic link",
  "Unknown",
  "Unknown",
  "Absolute set element", 
  "Unknown",
  "Text segment set element",
  "Unknown",
  "Data segment set element",
  "Unknown",
  "BSS segment set element",
  "Unknown",
  "Pointer to set vector",
  "Print a warning message during linking",
  "File name of a module",
  "Global symbol",
  "Unknown",
  "Function name (for BSD Fortran)",
  "Unknown",
  "Function name (see section 2.5 Procedures) or text segment variable",
  "Unknown",
  "Data segment file-scope variable",
  "Unknown",
  "BSS segment file-scope variable",
  "Unknown",
  "Name of main routine",
  "Unknown",
  "Variable in .rodata section",
  "Unknown",
  "Unknown",
  "Unknown",
  "Global symbol (for Pascal)",
  "Unknown",
  "Number of symbols (according to Ultrix V4.0)",
  "Unknown",
  "No DST map",
  "Unknown",
  "Unknown",
  "Unknown",
  "Object file (Solaris2)", 
  "Unknown",
  "Unknown",
  "Unknown",
  "Debugger options (Solaris2)", 
  "Unknown",
  "Unknown",
  "Unknown",
  "Register variable",
  "Unknown",
  "Modula-2 compilation unit",
  "Unknown",
  "Line number in text segment",
  "Unknown",
  "Line number in data segment",
  "Unknown",
  "Line number in bss segment",
  "Unknown",
  "GNU Modula2 definition module dependency",
  "Unknown",
  "Function start/body/end line numbers (Solaris2)",
  "Unknown",
  "Unknown",
  "Unknown",
  "GNU C++ exception variable",
  "Unknown",
  "Unknown",
  "Unknown",
  "GNU C++ catch clause",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Structure of union element",
  "Unknown",
  "Last stab for module (Solaris2)",
  "Unknown",
  "Path and name of source file",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Stack variable",
  "Unknown",
  "Beginning of an include file (Sun only)",
  "Unknown",
  "Name of include file",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Parameter variable",
  "Unknown",
  "End of an include file",
  "Unknown",
  "Alternate entry point",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Beginning of a lexical block",
  "Unknown",
  "Place holder for a deleted include file",
  "Unknown",
  "Modula2 scope information (Sun linker)",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",  
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "End of a lexical block",
  "Unknown",
  "Begin named common block",
  "Unknown",
  "End named common block",
  "Unknown",
  "Unknown",
  "Unknown",
  "Member of a common block",
  "Unknown",
  "Pascal with statement: type,,0,0,offset (Solaris2)",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Gould non-base registers",
  "Unknown",
  "Gould non-base registers",
  "Unknown",
  "Gould non-base registers",
  "Unknown",
  "Gould non-base registers",
  "Unknown",
  "Gould non-base registers",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
  "Unknown",
};












