mirror of
https://github.com/serge1/ELFIO.git
synced 2024-12-26 09:14:29 +00:00
Fix: 32 typos
Signed-off-by: RoboSchmied <github@roboschmie.de>
This commit is contained in:
parent
8a08b5be22
commit
73020740eb
@ -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<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;
|
||||
|
||||
|
@ -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 ) );
|
||||
@ -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 ),
|
||||
|
@ -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 ||
|
||||
@ -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;
|
||||
|
||||
|
@ -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 )
|
||||
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
@ -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;
|
||||
@ -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() +
|
||||
@ -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() +
|
||||
@ -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 );
|
||||
@ -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;
|
||||
|
@ -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 ),
|
||||
@ -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;
|
||||
|
@ -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 )
|
||||
{
|
||||
@ -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;
|
||||
|
@ -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;
|
||||
@ -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 );
|
||||
@ -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 );
|
||||
@ -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()];
|
||||
@ -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 );
|
||||
@ -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
|
||||
|
@ -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<char[]>
|
||||
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<char[]>
|
||||
deflate( const char* data,
|
||||
const endianess_convertor* convertor,
|
||||
const endianness_convertor* convertor,
|
||||
Elf_Xword decompressed_size,
|
||||
Elf_Xword& compressed_size ) const = 0;
|
||||
};
|
||||
|
@ -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
|
||||
{
|
||||
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user