mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-05 10:17:36 +00:00
Add ELF program header.
llvm-svn: 165316
This commit is contained in:
parent
99e42ee9a3
commit
a4682fd467
@ -412,6 +412,35 @@ struct Elf_Ehdr_Impl {
|
||||
unsigned char getDataEncoding() const { return e_ident[ELF::EI_DATA]; }
|
||||
};
|
||||
|
||||
template<support::endianness target_endianness, bool is64Bits>
|
||||
struct Elf_Phdr;
|
||||
|
||||
template<support::endianness target_endianness>
|
||||
struct Elf_Phdr<target_endianness, false> {
|
||||
LLVM_ELF_IMPORT_TYPES(target_endianness, false)
|
||||
Elf_Word p_type; // Type of segment
|
||||
Elf_Off p_offset; // FileOffset where segment is located, in bytes
|
||||
Elf_Addr p_vaddr; // Virtual Address of beginning of segment
|
||||
Elf_Addr p_paddr; // Physical address of beginning of segment (OS-specific)
|
||||
Elf_Word p_filesz; // Num. of bytes in file image of segment (may be zero)
|
||||
Elf_Word p_memsz; // Num. of bytes in mem image of segment (may be zero)
|
||||
Elf_Word p_flags; // Segment flags
|
||||
Elf_Word p_align; // Segment alignment constraint
|
||||
};
|
||||
|
||||
template<support::endianness target_endianness>
|
||||
struct Elf_Phdr<target_endianness, true> {
|
||||
LLVM_ELF_IMPORT_TYPES(target_endianness, true)
|
||||
Elf_Word p_type; // Type of segment
|
||||
Elf_Word p_flags; // Segment flags
|
||||
Elf_Off p_offset; // FileOffset where segment is located, in bytes
|
||||
Elf_Addr p_vaddr; // Virtual Address of beginning of segment
|
||||
Elf_Addr p_paddr; // Physical address of beginning of segment (OS-specific)
|
||||
Elf_Word p_filesz; // Num. of bytes in file image of segment (may be zero)
|
||||
Elf_Word p_memsz; // Num. of bytes in mem image of segment (may be zero)
|
||||
Elf_Word p_align; // Segment alignment constraint
|
||||
};
|
||||
|
||||
template<support::endianness target_endianness, bool is64Bits>
|
||||
class ELFObjectFile : public ObjectFile {
|
||||
LLVM_ELF_IMPORT_TYPES(target_endianness, is64Bits)
|
||||
|
Loading…
Reference in New Issue
Block a user