Logo Search packages:      
Sourcecode: eresi version File versions  Download package

void revm_dynentinfo ( elfshobj_t file,
elfsh_Dyn *  entry,
char *  info 
)

Provide human readable output for .dynamic entries.

Parameters:
file 
entry 
info 

Definition at line 149 of file dyn.c.

References elfsh_get_dynentry_string(), revm_do_feature1(), revm_do_flags(), revm_do_flags1(), revm_do_mipsflags(), and revm_do_posflag1().

Referenced by cmd_dyn(), and revm_load_enumdep_rec().

{
  char            *str;

  PROFILER_IN(__FILE__, __FUNCTION__, __LINE__);

  switch (entry->d_tag)
    {
    case DT_NEEDED:
    case DT_SONAME:
    case DT_RPATH:
    case DT_AUXILIARY:
    case DT_FILTER:
      str = elfsh_get_dynentry_string(file, entry);
      snprintf(info, 99, "%s", (str != NULL ? str : ELFSH_NULL_STRING));
      break;
    case DT_SYMBOLIC:
      sprintf(info, "Current object first checked during symbol resolving");
      break;
    case DT_TEXTREL:
      sprintf(info, "Relocation can overwrite .text");
      break;
    case DT_BIND_NOW:
      sprintf(info, "Symbol binding is now completed before execution");
      break;
    case DT_PLTREL:
    case DT_MOVEENT:
    case DT_SYMINENT:
    case DT_RELACOUNT:
    case DT_RELCOUNT:
    case DT_VERDEFNUM:
    case DT_VERNEEDNUM:
      sprintf(info, UFMT, entry->d_un.d_val);
      break;
    case DT_PLTRELSZ:
    case DT_RELASZ:
    case DT_RELAENT:
    case DT_STRSZ:
    case DT_RELSZ:
    case DT_RELENT:
    case DT_SYMENT:
    case DT_SYMINSZ:
    case DT_PLTPADSZ:
    case DT_MOVESZ:
      sprintf(info, UFMT " bytes", entry->d_un.d_val);
      break;
    case DT_PLTGOT:
    case DT_STRTAB:
    case DT_SYMTAB:
    case DT_HASH:
    case DT_RELA:
    case DT_INIT:
    case DT_FINI:
    case DT_REL:
    case DT_DEBUG:
    case DT_JMPREL:
    case DT_CHECKSUM:
    case DT_VERSYM:
    case DT_VERDEF:
    case DT_VERNEED:
      sprintf(info, XFMT, entry->d_un.d_ptr);
      break;
    case DT_FEATURE_1:
      revm_do_feature1(file, entry, info);
      break;
    case DT_POSFLAG_1:
      revm_do_posflag1(file, entry, info);
      break;
    case DT_FLAGS:
      revm_do_flags(file, entry, info);
      break;
    case DT_FLAGS_1:
      revm_do_flags1(file, entry, info);
      break;
    case DT_NULL:
      sprintf(info, "END OF SECTION");
      break;
      /* MIPS dynamic entry type */
    case DT_MIPS_RLD_VERSION:
      sprintf(info, UFMT,  entry->d_un.d_val);
      break;
    case DT_MIPS_TIME_STAMP:
      sprintf(info, UFMT,  entry->d_un.d_val);
      break;
    case DT_MIPS_ICHECKSUM:
      sprintf(info, UFMT,  entry->d_un.d_val);
      break;
    case DT_MIPS_IVERSION:
      sprintf(info, UFMT,  entry->d_un.d_val);
      break;
    case DT_MIPS_FLAGS:
      revm_do_mipsflags(file, entry, info);
      break;
    case DT_MIPS_BASE_ADDRESS:
      sprintf(info, XFMT,  entry->d_un.d_ptr);
      break;
    case DT_MIPS_MSYM:
      sprintf(info, XFMT,  entry->d_un.d_ptr);
      break;
    case DT_MIPS_CONFLICT:
      sprintf(info, XFMT,  entry->d_un.d_ptr);
      break;
    case DT_MIPS_LIBLIST:
      sprintf(info, XFMT,  entry->d_un.d_ptr);
      break;
    case DT_MIPS_LOCAL_GOTNO:
      sprintf(info, UFMT,  entry->d_un.d_val);
      break;
    case DT_MIPS_CONFLICTNO:
      sprintf(info, UFMT,  entry->d_un.d_val);
      break;
    case DT_MIPS_LIBLISTNO:
      sprintf(info, UFMT,  entry->d_un.d_val);
      break;
    case DT_MIPS_SYMTABNO:
      sprintf(info, UFMT,  entry->d_un.d_val);
      break;
    case DT_MIPS_UNREFEXTNO:
      sprintf(info, UFMT,  entry->d_un.d_val);
      break;
    case DT_MIPS_GOTSYM:
      sprintf(info, UFMT,  entry->d_un.d_val);
      break;
    case DT_MIPS_HIPAGENO:
      sprintf(info, UFMT,  entry->d_un.d_val);
      break;
    case DT_MIPS_RLD_MAP:
      sprintf(info, XFMT,  entry->d_un.d_ptr);
      break;
    case DT_MIPS_DELTA_CLASS:
    case DT_MIPS_DELTA_CLASS_NO:
    case DT_MIPS_DELTA_INSTANCE:
    case DT_MIPS_DELTA_INSTANCE_NO:
    case DT_MIPS_DELTA_RELOC:
    case DT_MIPS_DELTA_RELOC_NO:
    case DT_MIPS_DELTA_SYM:
    case DT_MIPS_DELTA_SYM_NO:
    case DT_MIPS_DELTA_CLASSSYM:
    case DT_MIPS_DELTA_CLASSSYM_NO:
    case DT_MIPS_CXX_FLAGS:
    case DT_MIPS_PIXIE_INIT:
    case DT_MIPS_SYMBOL_LIB:
    case DT_MIPS_LOCALPAGE_GOTIDX:
    case DT_MIPS_LOCAL_GOTIDX:
    case DT_MIPS_HIDDEN_GOTIDX:
    case DT_MIPS_PROTECTED_GOTIDX:
    case DT_MIPS_OPTIONS:
    case DT_MIPS_INTERFACE:
    case DT_MIPS_DYNSTR_ALIGN:
    case DT_MIPS_INTERFACE_SIZE:
    case DT_MIPS_RLD_TEXT_RESOLVE_ADDR:
    case DT_MIPS_PERF_SUFFIX:
    case DT_MIPS_COMPACT_SIZE:
    case DT_MIPS_GP_VALUE:
    case DT_MIPS_AUX_DYNAMIC:
    default:
      sprintf(info, "[?]");
      break;
    }

  PROFILER_OUT(__FILE__, __FUNCTION__, __LINE__);
}


Generated by  Doxygen 1.6.0   Back to index