diff options
author | Ian Lance Taylor <iant@google.com> | 2006-09-25 21:29:06 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2006-09-25 21:29:06 +0000 |
commit | 39081c14cf1a644187199dcda485025ba01bb8e2 (patch) | |
tree | 40f7a905c5917ac0c485f10f3b9fcd57969683f0 /elfcpp/elfcpp_internal.h | |
parent | 3c68c38feb2fb1c965bf3c22da490e773af63b33 (diff) | |
download | binutils-39081c14cf1a644187199dcda485025ba01bb8e2.tar.gz binutils-39081c14cf1a644187199dcda485025ba01bb8e2.tar.bz2 binutils-39081c14cf1a644187199dcda485025ba01bb8e2.zip |
Add program segments.
Diffstat (limited to 'elfcpp/elfcpp_internal.h')
-rw-r--r-- | elfcpp/elfcpp_internal.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/elfcpp/elfcpp_internal.h b/elfcpp/elfcpp_internal.h index f4dd8bd5195..696343a805d 100644 --- a/elfcpp/elfcpp_internal.h +++ b/elfcpp/elfcpp_internal.h @@ -202,6 +202,39 @@ struct Shdr_data typename Elf_types<size>::Elf_WXword sh_entsize; }; +// An ELF segment header. We use template specialization for the +// 32-bit and 64-bit versions because the fields are in a different +// order. + +template<int size> +struct Phdr_data; + +template<> +struct Phdr_data<32> +{ + Elf_Word p_type; + Elf_types<32>::Elf_Off p_offset; + Elf_types<32>::Elf_Addr p_vaddr; + Elf_types<32>::Elf_Addr p_paddr; + Elf_Word p_filesz; + Elf_Word p_memsz; + Elf_Word p_flags; + Elf_Word p_align; +}; + +template<> +struct Phdr_data<64> +{ + Elf_Word p_type; + Elf_Word p_flags; + Elf_types<64>::Elf_Off p_offset; + Elf_types<64>::Elf_Addr p_vaddr; + Elf_types<64>::Elf_Addr p_paddr; + Elf_Xword p_filesz; + Elf_Xword p_memsz; + Elf_Xword p_align; +}; + // An ELF symbol table entry. We use template specialization for the // 32-bit and 64-bit versions because the fields are in a different // order. |