summaryrefslogtreecommitdiff
path: root/elfcpp/elfcpp_internal.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2006-11-14 19:21:05 +0000
committerIan Lance Taylor <iant@google.com>2006-11-14 19:21:05 +0000
commit081c4c345d4f5be01cb08b49094f465db4be4893 (patch)
treeab1257085c2c9b5f57be5bdfe4db4893ad31eea0 /elfcpp/elfcpp_internal.h
parent4f961830b11c0701f902d6b6f70043f1d2bab8a7 (diff)
downloadbinutils-redhat-081c4c345d4f5be01cb08b49094f465db4be4893.tar.gz
More dynamic object support, initial scripting support.
Diffstat (limited to 'elfcpp/elfcpp_internal.h')
-rw-r--r--elfcpp/elfcpp_internal.h79
1 files changed, 77 insertions, 2 deletions
diff --git a/elfcpp/elfcpp_internal.h b/elfcpp/elfcpp_internal.h
index c991535cb0..7a2b5d4836 100644
--- a/elfcpp/elfcpp_internal.h
+++ b/elfcpp/elfcpp_internal.h
@@ -35,7 +35,7 @@ struct Ehdr_data
Elf_Half e_shstrndx;
};
-// An Elf section header.
+// An ELF section header.
template<int size>
struct Shdr_data
@@ -114,7 +114,7 @@ struct Sym_data<64>
Elf_Xword st_size;
};
-// Elf relocation table entries.
+// ELF relocation table entries.
template<int size>
struct Rel_data
@@ -131,6 +131,81 @@ struct Rela_data
typename Elf_types<size>::Elf_Swxword r_addend;
};
+// An entry in the ELF SHT_DYNAMIC section aka PT_DYNAMIC segment.
+
+template<int size>
+struct Dyn_data
+{
+ typename Elf_types<size>::Elf_Swxword d_tag;
+ typename Elf_types<size>::Elf_WXword d_val;
+};
+
+// An entry in a SHT_GNU_verdef section. This structure is the same
+// in 32-bit and 64-bit ELF files.
+
+struct Verdef_data
+{
+ // Version number of structure (VER_DEF_*).
+ Elf_Half vd_version;
+ // Bit flags (VER_FLG_*).
+ Elf_Half vd_flags;
+ // Version index.
+ Elf_Half vd_ndx;
+ // Number of auxiliary Verdaux entries.
+ Elf_Half vd_cnt;
+ // Hash of name.
+ Elf_Word vd_hash;
+ // Byte offset to first Verdaux entry.
+ Elf_Word vd_aux;
+ // Byte offset to next Verdef entry.
+ Elf_Word vd_next;
+};
+
+// An auxiliary entry in a SHT_GNU_verdef section. This structure is
+// the same in 32-bit and 64-bit ELF files.
+
+struct Verdaux_data
+{
+ // Offset in string table of version name.
+ Elf_Word vda_name;
+ // Byte offset to next Verdaux entry.
+ Elf_Word vda_next;
+};
+
+// An entry in a SHT_GNU_verneed section. This structure is the same
+// in 32-bit and 64-bit ELF files.
+
+struct Verneed_data
+{
+ // Version number of structure (VER_NEED_*).
+ Elf_Half vn_version;
+ // Number of auxiliary Vernaux entries.
+ Elf_Half vn_cnt;
+ // Offset in string table of library name.
+ Elf_Word vn_file;
+ // Byte offset to first Vernaux entry.
+ Elf_Word vn_aux;
+ // Byt eoffset to next Verneed entry.
+ Elf_Word vn_next;
+};
+
+// An auxiliary entry in a SHT_GNU_verneed section. This structure is
+// the same in 32-bit and 64-bit ELF files.
+
+struct Vernaux_data
+{
+ // Hash of dependency name.
+ Elf_Word vna_hash;
+ // Bit flags (VER_FLG_*).
+ Elf_Half vna_flags;
+ // Version index used in SHT_GNU_versym entries.
+ Elf_Half vna_other;
+ // Offset in string table of version name.
+ Elf_Word vna_name;
+ // Byte offset to next Vernaux entry.
+ Elf_Word vna_next;
+};
+
} // End namespace internal.
} // End namespace elfcpp.