* elf.c (elfcore_write_note): Pad to 4-byte boundary.
[deliverable/binutils-gdb.git] / elfcpp / elfcpp_internal.h
index 696343a805d63dbf8c93b24aed2988c851f091be..e4c863644aa61e327bf33cc58348ccbc120ed9a0 100644 (file)
@@ -16,7 +16,7 @@ namespace elfcpp
 namespace internal
 {
 
-#ifdef WORDS_BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
 const bool host_big_endian = true;
 #else
 const bool host_big_endian = false;
@@ -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.
This page took 0.023855 seconds and 4 git commands to generate.