From 73020740ebec7dfe981e6c0d56b89bf1bfee96a6 Mon Sep 17 00:00:00 2001 From: RoboSchmied Date: Tue, 26 Mar 2024 03:20:46 +0100 Subject: [PATCH] Fix: 32 typos Signed-off-by: RoboSchmied --- elfio/elfio.hpp | 4 ++-- elfio/elfio_array.hpp | 4 ++-- elfio/elfio_dynamic.hpp | 4 ++-- elfio/elfio_header.hpp | 4 ++-- elfio/elfio_note.hpp | 6 +++--- elfio/elfio_relocation.hpp | 12 ++++++------ elfio/elfio_section.hpp | 4 ++-- elfio/elfio_segment.hpp | 4 ++-- elfio/elfio_symbols.hpp | 12 ++++++------ elfio/elfio_utils.hpp | 6 +++--- tests/ELFIOTest.cpp | 4 ++-- 11 files changed, 32 insertions(+), 32 deletions(-) diff --git a/elfio/elfio.hpp b/elfio/elfio.hpp index 63415a4..a75c9f5 100644 --- a/elfio/elfio.hpp +++ b/elfio/elfio.hpp @@ -263,7 +263,7 @@ class elfio ELFIO_HEADER_ACCESS_GET_SET( Elf_Half, section_name_str_index ); //------------------------------------------------------------------------------ - const endianess_convertor& get_convertor() const { return convertor; } + const endianness_convertor& get_convertor() const { return convertor; } //------------------------------------------------------------------------------ Elf_Xword get_default_entry_size( Elf_Word section_type ) const @@ -1076,7 +1076,7 @@ class elfio std::unique_ptr header = nullptr; std::vector> sections_; std::vector> segments_; - endianess_convertor convertor; + endianness_convertor convertor; address_translator addr_translator; std::shared_ptr compression = nullptr; diff --git a/elfio/elfio_array.hpp b/elfio/elfio_array.hpp index 190c075..0ca302d 100644 --- a/elfio/elfio_array.hpp +++ b/elfio/elfio_array.hpp @@ -52,7 +52,7 @@ template class array_section_accessor_template return false; } - const endianess_convertor& convertor = elf_file.get_convertor(); + const endianness_convertor& convertor = elf_file.get_convertor(); const T temp = *reinterpret_cast( array_section->get_data() + index * sizeof( T ) ); @@ -64,7 +64,7 @@ template class array_section_accessor_template //------------------------------------------------------------------------------ void add_entry( Elf64_Addr address ) { - const endianess_convertor& convertor = elf_file.get_convertor(); + const endianness_convertor& convertor = elf_file.get_convertor(); T temp = convertor( (T)address ); array_section->append_data( reinterpret_cast( &temp ), diff --git a/elfio/elfio_dynamic.hpp b/elfio/elfio_dynamic.hpp index 035e67d..6d9b706 100644 --- a/elfio/elfio_dynamic.hpp +++ b/elfio/elfio_dynamic.hpp @@ -139,7 +139,7 @@ template class dynamic_section_accessor_template Elf_Xword& tag, Elf_Xword& value ) const { - const endianess_convertor& convertor = elf_file.get_convertor(); + const endianness_convertor& convertor = elf_file.get_convertor(); // Check unusual case when dynamic section has no data if ( dynamic_section->get_data() == nullptr || @@ -203,7 +203,7 @@ template class dynamic_section_accessor_template template void generic_add_entry_dyn( Elf_Xword tag, Elf_Xword value ) { - const endianess_convertor& convertor = elf_file.get_convertor(); + const endianness_convertor& convertor = elf_file.get_convertor(); T entry; diff --git a/elfio/elfio_header.hpp b/elfio/elfio_header.hpp index eccae13..e100394 100644 --- a/elfio/elfio_header.hpp +++ b/elfio/elfio_header.hpp @@ -75,7 +75,7 @@ template class elf_header_impl : public elf_header { public: //------------------------------------------------------------------------------ - elf_header_impl( endianess_convertor* convertor, + elf_header_impl( endianness_convertor* convertor, unsigned char encoding, const address_translator* translator ) : convertor( convertor ), translator( translator ) @@ -144,7 +144,7 @@ template class elf_header_impl : public elf_header private: T header = {}; - endianess_convertor* convertor = nullptr; + endianness_convertor* convertor = nullptr; const address_translator* translator = nullptr; }; diff --git a/elfio/elfio_note.hpp b/elfio/elfio_note.hpp index 63ef102..9b30759 100644 --- a/elfio/elfio_note.hpp +++ b/elfio/elfio_note.hpp @@ -69,7 +69,7 @@ class note_section_accessor_template const char* pData = notes->get_data() + note_start_positions[index]; int align = sizeof( Elf_Word ); - const endianess_convertor& convertor = elf_file.get_convertor(); + const endianness_convertor& convertor = elf_file.get_convertor(); type = convertor( *(const Elf_Word*)( pData + 2 * (size_t)align ) ); Elf_Word namesz = convertor( *(const Elf_Word*)( pData ) ); descSize = convertor( *(const Elf_Word*)( pData + sizeof( namesz ) ) ); @@ -99,7 +99,7 @@ class note_section_accessor_template const char* desc, Elf_Word descSize ) { - const endianess_convertor& convertor = elf_file.get_convertor(); + const endianness_convertor& convertor = elf_file.get_convertor(); int align = sizeof( Elf_Word ); Elf_Word nameLen = (Elf_Word)name.size() + 1; @@ -131,7 +131,7 @@ class note_section_accessor_template //------------------------------------------------------------------------------ void process_section() { - const endianess_convertor& convertor = elf_file.get_convertor(); + const endianness_convertor& convertor = elf_file.get_convertor(); const char* data = notes->get_data(); Elf_Xword size = ( notes->*F_get_size )(); Elf_Xword current = 0; diff --git a/elfio/elfio_relocation.hpp b/elfio/elfio_relocation.hpp index 1da8c92..5bd1847 100644 --- a/elfio/elfio_relocation.hpp +++ b/elfio/elfio_relocation.hpp @@ -325,7 +325,7 @@ template class relocation_section_accessor_template unsigned& type, Elf_Sxword& addend ) const { - const endianess_convertor& convertor = elf_file.get_convertor(); + const endianness_convertor& convertor = elf_file.get_convertor(); if (relocation_section->get_entry_size() < sizeof( T ) ) { return false; @@ -349,7 +349,7 @@ template class relocation_section_accessor_template unsigned& type, Elf_Sxword& addend ) const { - const endianess_convertor& convertor = elf_file.get_convertor(); + const endianness_convertor& convertor = elf_file.get_convertor(); if (relocation_section->get_entry_size() < sizeof( T ) ) { return false; @@ -374,7 +374,7 @@ template class relocation_section_accessor_template unsigned type, Elf_Sxword ) { - const endianess_convertor& convertor = elf_file.get_convertor(); + const endianness_convertor& convertor = elf_file.get_convertor(); T* pEntry = const_cast( reinterpret_cast( relocation_section->get_data() + @@ -399,7 +399,7 @@ template class relocation_section_accessor_template unsigned type, Elf_Sxword addend ) { - const endianess_convertor& convertor = elf_file.get_convertor(); + const endianness_convertor& convertor = elf_file.get_convertor(); T* pEntry = const_cast( reinterpret_cast( relocation_section->get_data() + @@ -422,7 +422,7 @@ template class relocation_section_accessor_template template void generic_add_entry( Elf64_Addr offset, Elf_Xword info ) { - const endianess_convertor& convertor = elf_file.get_convertor(); + const endianness_convertor& convertor = elf_file.get_convertor(); T entry; entry.r_offset = decltype( entry.r_offset )( offset ); @@ -439,7 +439,7 @@ template class relocation_section_accessor_template void generic_add_entry( Elf64_Addr offset, Elf_Xword info, Elf_Sxword addend ) { - const endianess_convertor& convertor = elf_file.get_convertor(); + const endianness_convertor& convertor = elf_file.get_convertor(); T entry; entry.r_offset = offset; diff --git a/elfio/elfio_section.hpp b/elfio/elfio_section.hpp index 716dc46..46e3312 100644 --- a/elfio/elfio_section.hpp +++ b/elfio/elfio_section.hpp @@ -79,7 +79,7 @@ template class section_impl : public section { public: //------------------------------------------------------------------------------ - section_impl( const endianess_convertor* convertor, + section_impl( const endianness_convertor* convertor, const address_translator* translator, const std::shared_ptr& compression ) : convertor( convertor ), translator( translator ), @@ -366,7 +366,7 @@ template class section_impl : public section std::string name; mutable std::unique_ptr data; mutable Elf_Word data_size = 0; - const endianess_convertor* convertor = nullptr; + const endianness_convertor* convertor = nullptr; const address_translator* translator = nullptr; const std::shared_ptr compression = nullptr; bool is_address_set = false; diff --git a/elfio/elfio_segment.hpp b/elfio/elfio_segment.hpp index 21f6d4d..5770277 100644 --- a/elfio/elfio_segment.hpp +++ b/elfio/elfio_segment.hpp @@ -76,7 +76,7 @@ template class segment_impl : public segment { public: //------------------------------------------------------------------------------ - segment_impl( const endianess_convertor* convertor, + segment_impl( const endianness_convertor* convertor, const address_translator* translator ) : convertor( convertor ), translator( translator ) { @@ -254,7 +254,7 @@ template class segment_impl : public segment Elf_Half index = 0; mutable std::unique_ptr data; std::vector sections; - const endianess_convertor* convertor = nullptr; + const endianness_convertor* convertor = nullptr; const address_translator* translator = nullptr; size_t stream_size = 0; bool is_offset_set = false; diff --git a/elfio/elfio_symbols.hpp b/elfio/elfio_symbols.hpp index 71b240a..8618af5 100644 --- a/elfio/elfio_symbols.hpp +++ b/elfio/elfio_symbols.hpp @@ -141,7 +141,7 @@ template class symbol_section_accessor_template unsigned char& other ) const { - const endianess_convertor& convertor = elf_file.get_convertor(); + const endianness_convertor& convertor = elf_file.get_convertor(); Elf_Xword idx = 0; bool match = false; @@ -296,7 +296,7 @@ template class symbol_section_accessor_template unsigned char& other ) const { bool ret = false; - const endianess_convertor& convertor = elf_file.get_convertor(); + const endianness_convertor& convertor = elf_file.get_convertor(); Elf_Word nbucket = *(const Elf_Word*)hash_section->get_data(); nbucket = convertor( nbucket ); @@ -335,7 +335,7 @@ template class symbol_section_accessor_template unsigned char& other ) const { bool ret = false; - const endianess_convertor& convertor = elf_file.get_convertor(); + const endianness_convertor& convertor = elf_file.get_convertor(); uint32_t nbuckets = *( (uint32_t*)hash_section->get_data() + 0 ); uint32_t symoffset = *( (uint32_t*)hash_section->get_data() + 1 ); @@ -447,7 +447,7 @@ template class symbol_section_accessor_template symbol_section->get_data() + index * symbol_section->get_entry_size() ); - const endianess_convertor& convertor = elf_file.get_convertor(); + const endianness_convertor& convertor = elf_file.get_convertor(); section* string_section = elf_file.sections[get_string_table_index()]; @@ -479,7 +479,7 @@ template class symbol_section_accessor_template unsigned char other, Elf_Half shndx ) { - const endianess_convertor& convertor = elf_file.get_convertor(); + const endianness_convertor& convertor = elf_file.get_convertor(); T entry; entry.st_name = convertor( name ); @@ -505,7 +505,7 @@ template class symbol_section_accessor_template Elf_Xword generic_arrange_local_symbols( std::function func ) { - const endianess_convertor& convertor = elf_file.get_convertor(); + const endianness_convertor& convertor = elf_file.get_convertor(); Elf_Word first_not_local = 1; // Skip the first entry. It is always NOTYPE diff --git a/elfio/elfio_utils.hpp b/elfio/elfio_utils.hpp index ae5c24a..2162c9e 100644 --- a/elfio/elfio_utils.hpp +++ b/elfio/elfio_utils.hpp @@ -56,7 +56,7 @@ THE SOFTWARE. namespace ELFIO { //------------------------------------------------------------------------------ -class endianess_convertor +class endianness_convertor { public: //------------------------------------------------------------------------------ @@ -285,7 +285,7 @@ class compression_interface */ virtual std::unique_ptr inflate( const char* data, - const endianess_convertor* convertor, + const endianness_convertor* convertor, Elf_Xword compressed_size, Elf_Xword& uncompressed_size ) const = 0; @@ -300,7 +300,7 @@ class compression_interface */ virtual std::unique_ptr deflate( const char* data, - const endianess_convertor* convertor, + const endianness_convertor* convertor, Elf_Xword decompressed_size, Elf_Xword& compressed_size ) const = 0; }; diff --git a/tests/ELFIOTest.cpp b/tests/ELFIOTest.cpp index 76d5903..40a6583 100644 --- a/tests/ELFIOTest.cpp +++ b/tests/ELFIOTest.cpp @@ -1010,7 +1010,7 @@ class mock_wiiu_compression : public compression_interface public: std::unique_ptr inflate( const char* data, - const endianess_convertor* convertor, + const endianness_convertor* convertor, Elf_Xword compressed_size, Elf_Xword& uncompressed_size ) const override { @@ -1020,7 +1020,7 @@ class mock_wiiu_compression : public compression_interface } std::unique_ptr deflate( const char* data, - const endianess_convertor* convertor, + const endianness_convertor* convertor, Elf_Xword decompressed_size, Elf_Xword& compressed_size ) const override {