Skip to content

Commit

Permalink
Fix: 32 typos
Browse files Browse the repository at this point in the history
Signed-off-by: RoboSchmied <github@roboschmie.de>
  • Loading branch information
RoboSchmied authored and serge1 committed Mar 26, 2024
1 parent 8a08b5b commit 7302074
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions elfio/elfio.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1076,7 +1076,7 @@ class elfio
std::unique_ptr<elf_header> header = nullptr;
std::vector<std::unique_ptr<section>> sections_;
std::vector<std::unique_ptr<segment>> segments_;
endianess_convertor convertor;
endianness_convertor convertor;
address_translator addr_translator;
std::shared_ptr<compression_interface> compression = nullptr;

Expand Down
4 changes: 2 additions & 2 deletions elfio/elfio_array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ template <class S, typename T> 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<const T*>( array_section->get_data() +
index * sizeof( T ) );
Expand All @@ -64,7 +64,7 @@ template <class S, typename T> 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<char*>( &temp ),
Expand Down
4 changes: 2 additions & 2 deletions elfio/elfio_dynamic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ template <class S> 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 ||
Expand Down Expand Up @@ -203,7 +203,7 @@ template <class S> class dynamic_section_accessor_template
template <class T>
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;

Expand Down
4 changes: 2 additions & 2 deletions elfio/elfio_header.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ template <class T> 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 )
Expand Down Expand Up @@ -144,7 +144,7 @@ template <class T> class elf_header_impl : public elf_header

private:
T header = {};
endianess_convertor* convertor = nullptr;
endianness_convertor* convertor = nullptr;
const address_translator* translator = nullptr;
};

Expand Down
6 changes: 3 additions & 3 deletions elfio/elfio_note.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ) );
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions elfio/elfio_relocation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ template <class S> 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;
Expand All @@ -349,7 +349,7 @@ template <class S> 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;
Expand All @@ -374,7 +374,7 @@ template <class S> 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<T*>( reinterpret_cast<const T*>(
relocation_section->get_data() +
Expand All @@ -399,7 +399,7 @@ template <class S> 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<T*>( reinterpret_cast<const T*>(
relocation_section->get_data() +
Expand All @@ -422,7 +422,7 @@ template <class S> class relocation_section_accessor_template
template <class T>
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 );
Expand All @@ -439,7 +439,7 @@ template <class S> 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;
Expand Down
4 changes: 2 additions & 2 deletions elfio/elfio_section.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ template <class T> 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_interface>& compression )
: convertor( convertor ), translator( translator ),
Expand Down Expand Up @@ -366,7 +366,7 @@ template <class T> class section_impl : public section
std::string name;
mutable std::unique_ptr<char[]> 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_interface> compression = nullptr;
bool is_address_set = false;
Expand Down
4 changes: 2 additions & 2 deletions elfio/elfio_segment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ template <class T> 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 )
{
Expand Down Expand Up @@ -254,7 +254,7 @@ template <class T> class segment_impl : public segment
Elf_Half index = 0;
mutable std::unique_ptr<char[]> data;
std::vector<Elf_Half> 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;
Expand Down
12 changes: 6 additions & 6 deletions elfio/elfio_symbols.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ template <class S> 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;
Expand Down Expand Up @@ -296,7 +296,7 @@ template <class S> 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 );
Expand Down Expand Up @@ -335,7 +335,7 @@ template <class S> 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 );
Expand Down Expand Up @@ -447,7 +447,7 @@ template <class S> 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()];
Expand Down Expand Up @@ -479,7 +479,7 @@ template <class S> 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 );
Expand All @@ -505,7 +505,7 @@ template <class S> class symbol_section_accessor_template
Elf_Xword generic_arrange_local_symbols(
std::function<void( Elf_Xword first, Elf_Xword second )> 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
Expand Down
6 changes: 3 additions & 3 deletions elfio/elfio_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ THE SOFTWARE.
namespace ELFIO {

//------------------------------------------------------------------------------
class endianess_convertor
class endianness_convertor
{
public:
//------------------------------------------------------------------------------
Expand Down Expand Up @@ -285,7 +285,7 @@ class compression_interface
*/
virtual std::unique_ptr<char[]>
inflate( const char* data,
const endianess_convertor* convertor,
const endianness_convertor* convertor,
Elf_Xword compressed_size,
Elf_Xword& uncompressed_size ) const = 0;

Expand All @@ -300,7 +300,7 @@ class compression_interface
*/
virtual std::unique_ptr<char[]>
deflate( const char* data,
const endianess_convertor* convertor,
const endianness_convertor* convertor,
Elf_Xword decompressed_size,
Elf_Xword& compressed_size ) const = 0;
};
Expand Down
4 changes: 2 additions & 2 deletions tests/ELFIOTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ class mock_wiiu_compression : public compression_interface
public:
std::unique_ptr<char[]>
inflate( const char* data,
const endianess_convertor* convertor,
const endianness_convertor* convertor,
Elf_Xword compressed_size,
Elf_Xword& uncompressed_size ) const override
{
Expand All @@ -1020,7 +1020,7 @@ class mock_wiiu_compression : public compression_interface
}

std::unique_ptr<char[]> deflate( const char* data,
const endianess_convertor* convertor,
const endianness_convertor* convertor,
Elf_Xword decompressed_size,
Elf_Xword& compressed_size ) const override
{
Expand Down

0 comments on commit 7302074

Please sign in to comment.