Changeset View
Changeset View
Standalone View
Standalone View
head/contrib/elftoolchain/libelf/libelf.h
Show First 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | enum Elf_Error { | ||||
ELF_E_LAYOUT, /* Layout constraint violation */ | ELF_E_LAYOUT, /* Layout constraint violation */ | ||||
ELF_E_MODE, /* Wrong mode for ELF descriptor */ | ELF_E_MODE, /* Wrong mode for ELF descriptor */ | ||||
ELF_E_RANGE, /* Value out of range */ | ELF_E_RANGE, /* Value out of range */ | ||||
ELF_E_RESOURCE, /* Resource exhaustion */ | ELF_E_RESOURCE, /* Resource exhaustion */ | ||||
ELF_E_SECTION, /* Invalid section descriptor */ | ELF_E_SECTION, /* Invalid section descriptor */ | ||||
ELF_E_SEQUENCE, /* API calls out of sequence */ | ELF_E_SEQUENCE, /* API calls out of sequence */ | ||||
ELF_E_UNIMPL, /* Feature is unimplemented */ | ELF_E_UNIMPL, /* Feature is unimplemented */ | ||||
ELF_E_VERSION, /* Unknown API version */ | ELF_E_VERSION, /* Unknown API version */ | ||||
ELF_E_INVALID_SECTION_FLAGS, /* Invalid ELF section header flags */ | |||||
ELF_E_INVALID_SECTION_TYPE, /* Invalid ELF section header type */ | |||||
ELF_E_NOT_COMPRESSED, /* Section is not compressed */ | |||||
ELF_E_NUM /* Max error number */ | ELF_E_NUM /* Max error number */ | ||||
}; | }; | ||||
/* | /* | ||||
* Flags defined by the API. | * Flags defined by the API. | ||||
*/ | */ | ||||
#define ELF_F_LAYOUT 0x001U /* application will layout the file */ | #define ELF_F_LAYOUT 0x001U /* application will layout the file */ | ||||
▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | |||||
int elf_setshstrndx(Elf *_elf, size_t _shnum); | int elf_setshstrndx(Elf *_elf, size_t _shnum); | ||||
char *elf_strptr(Elf *_elf, size_t _section, size_t _offset); | char *elf_strptr(Elf *_elf, size_t _section, size_t _offset); | ||||
off_t elf_update(Elf *_elf, Elf_Cmd _cmd); | off_t elf_update(Elf *_elf, Elf_Cmd _cmd); | ||||
unsigned int elf_version(unsigned int _version); | unsigned int elf_version(unsigned int _version); | ||||
long elf32_checksum(Elf *_elf); | long elf32_checksum(Elf *_elf); | ||||
size_t elf32_fsize(Elf_Type _type, size_t _count, | size_t elf32_fsize(Elf_Type _type, size_t _count, | ||||
unsigned int _version); | unsigned int _version); | ||||
Elf32_Chdr *elf32_getchdr(Elf_Scn *_scn); | |||||
Elf32_Ehdr *elf32_getehdr(Elf *_elf); | Elf32_Ehdr *elf32_getehdr(Elf *_elf); | ||||
Elf32_Phdr *elf32_getphdr(Elf *_elf); | Elf32_Phdr *elf32_getphdr(Elf *_elf); | ||||
Elf32_Shdr *elf32_getshdr(Elf_Scn *_scn); | Elf32_Shdr *elf32_getshdr(Elf_Scn *_scn); | ||||
Elf32_Ehdr *elf32_newehdr(Elf *_elf); | Elf32_Ehdr *elf32_newehdr(Elf *_elf); | ||||
Elf32_Phdr *elf32_newphdr(Elf *_elf, size_t _count); | Elf32_Phdr *elf32_newphdr(Elf *_elf, size_t _count); | ||||
Elf_Data *elf32_xlatetof(Elf_Data *_dst, const Elf_Data *_src, | Elf_Data *elf32_xlatetof(Elf_Data *_dst, const Elf_Data *_src, | ||||
unsigned int _enc); | unsigned int _enc); | ||||
Elf_Data *elf32_xlatetom(Elf_Data *_dst, const Elf_Data *_src, | Elf_Data *elf32_xlatetom(Elf_Data *_dst, const Elf_Data *_src, | ||||
unsigned int _enc); | unsigned int _enc); | ||||
long elf64_checksum(Elf *_elf); | long elf64_checksum(Elf *_elf); | ||||
size_t elf64_fsize(Elf_Type _type, size_t _count, | size_t elf64_fsize(Elf_Type _type, size_t _count, | ||||
unsigned int _version); | unsigned int _version); | ||||
Elf64_Chdr *elf64_getchdr(Elf_Scn *_scn); | |||||
Elf64_Ehdr *elf64_getehdr(Elf *_elf); | Elf64_Ehdr *elf64_getehdr(Elf *_elf); | ||||
Elf64_Phdr *elf64_getphdr(Elf *_elf); | Elf64_Phdr *elf64_getphdr(Elf *_elf); | ||||
Elf64_Shdr *elf64_getshdr(Elf_Scn *_scn); | Elf64_Shdr *elf64_getshdr(Elf_Scn *_scn); | ||||
Elf64_Ehdr *elf64_newehdr(Elf *_elf); | Elf64_Ehdr *elf64_newehdr(Elf *_elf); | ||||
Elf64_Phdr *elf64_newphdr(Elf *_elf, size_t _count); | Elf64_Phdr *elf64_newphdr(Elf *_elf, size_t _count); | ||||
Elf_Data *elf64_xlatetof(Elf_Data *_dst, const Elf_Data *_src, | Elf_Data *elf64_xlatetof(Elf_Data *_dst, const Elf_Data *_src, | ||||
unsigned int _enc); | unsigned int _enc); | ||||
Elf_Data *elf64_xlatetom(Elf_Data *_dst, const Elf_Data *_src, | Elf_Data *elf64_xlatetom(Elf_Data *_dst, const Elf_Data *_src, | ||||
unsigned int _enc); | unsigned int _enc); | ||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
} | } | ||||
#endif | #endif | ||||
#endif /* _LIBELF_H_ */ | #endif /* _LIBELF_H_ */ |