package typerex-binutils

  1. Overview
  2. Docs
type symbol_section =
  1. | SYM_SHN_UNDEF
  2. | SYM_SHN_ABS
  3. | SYM_SHN_COMMON
  4. | SYM_SHN of string
type elf_symbol = {
  1. st_name : string;
  2. st_value : addr;
  3. st_size : word;
  4. st_bind : elf_symbol_bind_type;
  5. st_type : elf_symbol_type;
  6. st_section : symbol_section;
}
type elf64_rel = {
  1. rel_offset : addr;
  2. rel_info : xword;
  3. rel_info_symbol : half;
  4. rel_info_type : half;
}
type elf64_rela = {
  1. rela_offset : addr;
  2. rela_info : xword;
  3. rela_info_symbol : half;
  4. rela_info_type : half;
  5. rela_addend : sxword;
}
type elf32_rel = {
  1. rel_offset : addr;
  2. rel_info : xword;
  3. rel_info_symbol : half;
  4. rel_info_type : half;
}
type elf32_rela = {
  1. rela_offset : addr;
  2. rela_info : word;
  3. rela_info_symbol : half;
  4. rela_info_type : half;
  5. rela_addend : sword;
}
type note_section = {
  1. notes : xword array;
  2. note_namez : xword;
  3. note_descsz : xword;
  4. note_type : xword;
  5. note_name : string;
  6. note_desc : string;
}
type dynamic_tag =
  1. | DT_NULL
  2. | DT_NEEDED
  3. | DT_PLTRELSZ
  4. | DT_PLTGOT
  5. | DT_HASH
  6. | DT_STRTAB
  7. | DT_SYMTAB
  8. | DT_RELA
  9. | DT_RELASZ
  10. | DT_RELAENT
  11. | DT_STRSZ
  12. | DT_SYMENT
  13. | DT_INIT
  14. | DT_FINI
  15. | DT_SONAME
  16. | DT_RPATH
  17. | DT_SYMBOLIC
  18. | DT_REL
  19. | DT_RELSZ
  20. | DT_RELENT
  21. | DT_PLTREL
  22. | DT_DEBUG
  23. | DT_TEXTREL
  24. | DT_JMPREL
  25. | DT_BIND_NOW
  26. | DT_INIT_ARRAY
  27. | DT_FINI_ARRAY
  28. | DT_INIT_ARRAYSZ
  29. | DT_FINI_ARRAYSZ
  30. | DT_OS of int
  31. | DT_PROC of int
  32. | DT_NUM of int
type dynamic = {
  1. d_tag : sxword;
  2. d_val : xword;
}
type hash_section = {
  1. hash_words : word array;
  2. hash_nbuckets : word;
  3. hash_nchain : word;
  4. hash_buckets : word array;
  5. hash_chains : word array;
}
type dynamic_segment = dynamic array
type elf32_relocation =
  1. | R_386_NONE
  2. | R_386_32
  3. | R_386_PC32
  4. | R_386_GOT32
  5. | R_386_PLT32
  6. | R_386_COPY
  7. | R_386_GLOB_DAT
  8. | R_386_JMP_SLOT
  9. | R_386_RELATIVE
  10. | R_386_GOTOFF
  11. | R_386_GOTPC
  12. | R_386_32PLT
  13. | R_386_16
  14. | R_386_PC16
  15. | R_386_8
  16. | R_386_PC8
  17. | R_386_UNKNOWN of int
type elf64_relocation =
  1. | R_X86_64_NONE
  2. | R_X86_64_64
  3. | R_X86_64_PC32
  4. | R_X86_64_GOT32
  5. | R_X86_64_PLT32
  6. | R_X86_64_COPY
  7. | R_X86_64_GLOB_DAT
  8. | R_X86_64_JUMP_SLOT
  9. | R_X86_64_RELATIVE
  10. | R_X86_64_GOTPCREL
  11. | R_X86_64_32
  12. | R_X86_64_32S
  13. | R_X86_64_16
  14. | R_X86_64_PC16
  15. | R_X86_64_8
  16. | R_X86_64_PC8
  17. | R_X86_64_DPTMOD64
  18. | R_X86_64_DTPOFF64
  19. | R_X86_64_TPOFF64
  20. | R_X86_64_TLSGD
  21. | R_X86_64_TLSLD
  22. | R_X86_64_DTPOFF32
  23. | R_X86_64_GOTTPOFF
  24. | R_X86_64_TPOFF32
  25. | R_X86_64_PC64
  26. | R_X86_64_GOTOFF64
  27. | R_X86_64_GOTPC32
  28. | R_X86_64_SIZE32
  29. | R_X86_64_SIZE64
  30. | R_X86_64_UNKNOWN of int
type !'relocation rela_reloc = {
  1. r_offset : int64;
  2. r_sym : int64;
  3. r_type : 'relocation;
  4. r_addend : int64;
}
type !'relocation rela = {
  1. rela_relocs : 'relocation rela_reloc array;
  2. rela_symbols : string;
  3. rela_target : string;
}
type section_bits = {
  1. sht_flags : section_attribute list;
  2. sht_addr : int64;
  3. sht_align : int;
  4. sht_content : string;
}
type section_desc =
  1. | SHT_NULL
  2. | SHT_PROGBITS of section_bits
  3. | SHT_NOBITS of section_bits
  4. | SHT_STRTAB of string
  5. | SHT_SYMTAB of elf_symbol array
  6. | SHT_RELA32 of elf32_relocation rela
  7. | SHT_RELA64 of elf64_relocation rela
  8. | SHT_REL32 of elf32_relocation rela
  9. | SHT_REL64 of elf64_relocation rela
  10. | SHT_VERSYM of int array
  11. | SHT_VERNEED of string * (RAW.verneed * RAW.vernaux list) list
  12. | SHT_UNKNOWN of RAW.section
type section = {
  1. s_name : string;
  2. s_desc : section_desc;
}
type program_desc =
  1. | PR_INTERP of string
  2. | PR_UNKNOWN
type program = {
  1. p_header : RAW.program_header;
  2. mutable p_desc : program_desc;
}
type t = {
  1. e_file_class : elf_file_class;
  2. e_data_encoding : elf_data_encoding;
  3. e_file_version : int;
  4. e_osabi : elf_osabi;
  5. e_abi_version : int;
  6. e_type : elf_type;
  7. e_machine : machine;
  8. e_version : word;
  9. e_entry : addr;
  10. e_flags : word;
  11. mutable e_sections : section StringCompat.StringMap.t;
  12. mutable e_programs : program array;
}
OCaml

Innovation. Community. Security.