Rizin
unix-like reverse engineering framework and cli tools
internal.h File Reference

Go to the source code of this file.

Classes

struct  elf_internal_ehdr
 
struct  elf_internal_phdr
 
struct  elf_internal_shdr
 
struct  elf_internal_sym
 
struct  elf_internal_note
 
struct  elf_internal_rela
 
struct  elf_internal_dyn
 
struct  elf_internal_verdef
 
struct  elf_internal_verdaux
 
struct  elf_internal_verneed
 
struct  elf_internal_vernaux
 
struct  elf_internal_versym
 
struct  Elf_Internal_Syminfo
 
struct  Elf_Internal_Auxv
 
struct  elf_segment_map
 

Macros

#define EI_NIDENT   16 /* Size of e_ident[] */
 
#define ELF_SECTION_SIZE(sec_hdr, segment)    (((sec_hdr->sh_flags & SHF_TLS) == 0 || sec_hdr->sh_type != SHT_NOBITS || segment->p_type == PT_TLS) ? sec_hdr->sh_size : 0)
 
#define ELF_IS_SECTION_IN_SEGMENT(sec_hdr, segment)
 
#define ELF_IS_SECTION_IN_SEGMENT_FILE(sec_hdr, segment)    (sec_hdr->sh_size > 0 && ELF_IS_SECTION_IN_SEGMENT(sec_hdr, segment))
 
#define ELF_IS_SECTION_IN_SEGMENT_MEMORY(sec_hdr, segment)    (ELF_SECTION_SIZE(sec_hdr, segment) > 0 && ELF_IS_SECTION_IN_SEGMENT(sec_hdr, segment))
 

Typedefs

typedef struct elf_internal_ehdr Elf_Internal_Ehdr
 
typedef struct elf_internal_phdr Elf_Internal_Phdr
 
typedef struct elf_internal_shdr Elf_Internal_Shdr
 
typedef struct elf_internal_sym Elf_Internal_Sym
 
typedef struct elf_internal_note Elf_Internal_Note
 
typedef struct elf_internal_rela Elf_Internal_Rela
 
typedef struct elf_internal_dyn Elf_Internal_Dyn
 
typedef struct elf_internal_verdef Elf_Internal_Verdef
 
typedef struct elf_internal_verdaux Elf_Internal_Verdaux
 
typedef struct elf_internal_verneed Elf_Internal_Verneed
 
typedef struct elf_internal_vernaux Elf_Internal_Vernaux
 
typedef struct elf_internal_versym Elf_Internal_Versym
 

Macro Definition Documentation

◆ EI_NIDENT

#define EI_NIDENT   16 /* Size of e_ident[] */

Definition at line 43 of file internal.h.

◆ ELF_IS_SECTION_IN_SEGMENT

#define ELF_IS_SECTION_IN_SEGMENT (   sec_hdr,
  segment 
)
Value:
(((((sec_hdr->sh_flags & SHF_TLS) != 0) && (segment->p_type == PT_TLS || segment->p_type == PT_LOAD)) || ((sec_hdr->sh_flags & SHF_TLS) == 0 && segment->p_type != PT_TLS)) /* Any section besides one of type SHT_NOBITS must have a file \
offset within the segment. */ \
&& (sec_hdr->sh_type == SHT_NOBITS || ((bfd_vma)sec_hdr->sh_offset >= segment->p_offset && (sec_hdr->sh_offset + ELF_SECTION_SIZE(sec_hdr, segment) <= segment->p_offset + segment->p_filesz))) /* SHF_ALLOC sections must have VMAs within the segment. */ \
&& ((sec_hdr->sh_flags & SHF_ALLOC) == 0 || (sec_hdr->sh_addr >= segment->p_vaddr && (sec_hdr->sh_addr + ELF_SECTION_SIZE(sec_hdr, segment) <= segment->p_vaddr + segment->p_memsz))))
#define SHF_TLS
Definition: common.h:385
#define SHF_ALLOC
Definition: common.h:377
#define SHT_NOBITS
Definition: common.h:339
#define PT_LOAD
Definition: common.h:303
#define PT_TLS
Definition: common.h:309
#define ELF_SECTION_SIZE(sec_hdr, segment)
Definition: internal.h:262
BFD_HOST_U_64_BIT bfd_vma
Definition: mybfd.h:111

Definition at line 268 of file internal.h.

◆ ELF_IS_SECTION_IN_SEGMENT_FILE

#define ELF_IS_SECTION_IN_SEGMENT_FILE (   sec_hdr,
  segment 
)     (sec_hdr->sh_size > 0 && ELF_IS_SECTION_IN_SEGMENT(sec_hdr, segment))

Definition at line 274 of file internal.h.

◆ ELF_IS_SECTION_IN_SEGMENT_MEMORY

#define ELF_IS_SECTION_IN_SEGMENT_MEMORY (   sec_hdr,
  segment 
)     (ELF_SECTION_SIZE(sec_hdr, segment) > 0 && ELF_IS_SECTION_IN_SEGMENT(sec_hdr, segment))

Definition at line 278 of file internal.h.

◆ ELF_SECTION_SIZE

#define ELF_SECTION_SIZE (   sec_hdr,
  segment 
)     (((sec_hdr->sh_flags & SHF_TLS) == 0 || sec_hdr->sh_type != SHT_NOBITS || segment->p_type == PT_TLS) ? sec_hdr->sh_size : 0)

Definition at line 262 of file internal.h.

Typedef Documentation

◆ Elf_Internal_Dyn

◆ Elf_Internal_Ehdr

◆ Elf_Internal_Note

◆ Elf_Internal_Phdr

Definition at line 1 of file internal.h.

◆ Elf_Internal_Rela

◆ Elf_Internal_Shdr

◆ Elf_Internal_Sym

Definition at line 1 of file internal.h.

◆ Elf_Internal_Verdaux

◆ Elf_Internal_Verdef

◆ Elf_Internal_Vernaux

◆ Elf_Internal_Verneed

◆ Elf_Internal_Versym