// elfcpp_internal.h -- internals for elfcpp -*- C++ -*-
-// Copyright (C) 2006-2014 Free Software Foundation, Inc.
+// Copyright (C) 2006-2018 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of elfcpp.
typename Elf_types<size>::Elf_WXword sh_entsize;
};
+// An ELF compression header.
+
+template<int size>
+struct Chdr_data;
+
+template<>
+struct Chdr_data<32>
+{
+ Elf_Word ch_type;
+ Elf_Word ch_size;
+ Elf_Word ch_addralign;
+};
+
+template<>
+struct Chdr_data<64>
+{
+ Elf_Word ch_type;
+ Elf_Word ch_reserved;
+ Elf_Xword ch_size;
+ Elf_Xword ch_addralign;
+};
+
// An ELF segment header. We use template specialization for the
// 32-bit and 64-bit versions because the fields are in a different
// order.
typename Elf_types<size>::Elf_Swxword r_addend;
};
+// MIPS-64 has a non-standard layout for relocations.
+
+struct Mips64_rel_data
+{
+ Elf_types<64>::Elf_Addr r_offset;
+ Elf_Word r_sym;
+ unsigned char r_ssym;
+ unsigned char r_type3;
+ unsigned char r_type2;
+ unsigned char r_type;
+};
+
+struct Mips64_rela_data
+{
+ Elf_types<64>::Elf_Addr r_offset;
+ Elf_Word r_sym;
+ unsigned char r_ssym;
+ unsigned char r_type3;
+ unsigned char r_type2;
+ unsigned char r_type;
+ Elf_types<64>::Elf_Swxword r_addend;
+};
+
// An entry in the ELF SHT_DYNAMIC section aka PT_DYNAMIC segment.
template<int size>