aboutsummaryrefslogtreecommitdiff
path: root/elfcpp/elfcpp_internal.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2006-09-29 19:58:17 +0000
committerIan Lance Taylor <iant@google.com>2006-09-29 19:58:17 +0000
commit61ba1cf93601b0a0877a8ade94ba3c674a09f77e (patch)
treeffa744ec1dffd7f2dae13150b1dd7784728ed0a4 /elfcpp/elfcpp_internal.h
parent4dba4b2419ccdbf48fd016edb7e0e10016897827 (diff)
downloadgdb-61ba1cf93601b0a0877a8ade94ba3c674a09f77e.zip
gdb-61ba1cf93601b0a0877a8ade94ba3c674a09f77e.tar.gz
gdb-61ba1cf93601b0a0877a8ade94ba3c674a09f77e.tar.bz2
Snapshot. Now able to produce a minimal executable which actually
runs.
Diffstat (limited to 'elfcpp/elfcpp_internal.h')
-rw-r--r--elfcpp/elfcpp_internal.h30
1 files changed, 28 insertions, 2 deletions
diff --git a/elfcpp/elfcpp_internal.h b/elfcpp/elfcpp_internal.h
index 696343a..0d69bae 100644
--- a/elfcpp/elfcpp_internal.h
+++ b/elfcpp/elfcpp_internal.h
@@ -158,8 +158,17 @@ convert_off(typename Elf_types<size>::Elf_Off v)
// Convert Elf_WXword.
template<int size, bool big_endian>
-inline typename Elf_types<size>::Elf_Off
-convert_wxword(typename Elf_types<size>::Elf_Off v)
+inline typename Elf_types<size>::Elf_WXword
+convert_wxword(typename Elf_types<size>::Elf_WXword v)
+{
+ return convert_addr_size<size, big_endian == host_big_endian>(v);
+}
+
+// Convert ELF_Swxword.
+
+template<int size, bool big_endian>
+inline typename Elf_types<size>::Elf_Swxword
+convert_swxword(typename Elf_types<size>::Elf_Swxword v)
{
return convert_addr_size<size, big_endian == host_big_endian>(v);
}
@@ -264,6 +273,23 @@ struct Sym_data<64>
Elf_Xword st_size;
};
+// Elf relocation table entries.
+
+template<int size>
+struct Rel_data
+{
+ typename Elf_types<size>::Elf_Addr r_offset;
+ typename Elf_types<size>::Elf_WXword r_info;
+};
+
+template<int size>
+struct Rela_data
+{
+ typename Elf_types<size>::Elf_Addr r_offset;
+ typename Elf_types<size>::Elf_WXword r_info;
+ typename Elf_types<size>::Elf_Swxword r_addend;
+};
+
} // End namespace internal.
} // End namespace elfcpp.