diff options
| author | Hemant Kulkarni <khemant@codeaurora.org> | 2012-10-05 15:16:53 +0000 |
|---|---|---|
| committer | Hemant Kulkarni <khemant@codeaurora.org> | 2012-10-05 15:16:53 +0000 |
| commit | 8329e15685a26d8e6a9a85ba339a0afc88c169f6 (patch) | |
| tree | 75d036b5524ebcb49015af8c2670367504e257ef | |
| parent | 314c6c4c2bf06a2c3215bff8825825e347f8080d (diff) | |
| download | bcm5719-llvm-8329e15685a26d8e6a9a85ba339a0afc88c169f6.tar.gz bcm5719-llvm-8329e15685a26d8e6a9a85ba339a0afc88c169f6.zip | |
Add ELF program header.
llvm-svn: 165316
| -rw-r--r-- | llvm/include/llvm/Object/ELF.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/llvm/include/llvm/Object/ELF.h b/llvm/include/llvm/Object/ELF.h index 6dc0776d431..8391e6504cf 100644 --- a/llvm/include/llvm/Object/ELF.h +++ b/llvm/include/llvm/Object/ELF.h @@ -413,6 +413,35 @@ struct Elf_Ehdr_Impl { }; 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) |

