mirror of
https://github.com/serge1/ELFIO.git
synced 2024-12-26 09:14:29 +00:00
Just reformatting
This commit is contained in:
parent
e2a3d0ada4
commit
d33fadb34a
@ -75,7 +75,7 @@ template <class T> class elf_header_impl : public elf_header
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------------
|
||||
elf_header_impl( endianness_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 = {};
|
||||
endianness_convertor* convertor = nullptr;
|
||||
endianness_convertor* convertor = nullptr;
|
||||
const address_translator* translator = nullptr;
|
||||
};
|
||||
|
||||
|
@ -132,9 +132,9 @@ class note_section_accessor_template
|
||||
void process_section()
|
||||
{
|
||||
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;
|
||||
const char* data = notes->get_data();
|
||||
Elf_Xword size = ( notes->*F_get_size )();
|
||||
Elf_Xword current = 0;
|
||||
|
||||
note_start_positions.clear();
|
||||
|
||||
|
@ -96,22 +96,22 @@ template <class S> class relocation_section_accessor_template
|
||||
|
||||
if ( elf_file.get_class() == ELFCLASS32 ) {
|
||||
if ( SHT_REL == relocation_section->get_type() ) {
|
||||
return generic_get_entry_rel<Elf32_Rel>( index, offset, symbol, type,
|
||||
addend );
|
||||
return generic_get_entry_rel<Elf32_Rel>( index, offset, symbol,
|
||||
type, addend );
|
||||
}
|
||||
else if ( SHT_RELA == relocation_section->get_type() ) {
|
||||
return generic_get_entry_rela<Elf32_Rela>( index, offset, symbol, type,
|
||||
addend );
|
||||
return generic_get_entry_rela<Elf32_Rela>(
|
||||
index, offset, symbol, type, addend );
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ( SHT_REL == relocation_section->get_type() ) {
|
||||
return generic_get_entry_rel<Elf64_Rel>( index, offset, symbol, type,
|
||||
addend );
|
||||
return generic_get_entry_rel<Elf64_Rel>( index, offset, symbol,
|
||||
type, addend );
|
||||
}
|
||||
else if ( SHT_RELA == relocation_section->get_type() ) {
|
||||
return generic_get_entry_rela<Elf64_Rela>( index, offset, symbol, type,
|
||||
addend );
|
||||
return generic_get_entry_rela<Elf64_Rela>(
|
||||
index, offset, symbol, type, addend );
|
||||
}
|
||||
}
|
||||
// Unknown relocation section type.
|
||||
@ -327,7 +327,7 @@ template <class S> class relocation_section_accessor_template
|
||||
{
|
||||
const endianness_convertor& convertor = elf_file.get_convertor();
|
||||
|
||||
if (relocation_section->get_entry_size() < sizeof( T ) ) {
|
||||
if ( relocation_section->get_entry_size() < sizeof( T ) ) {
|
||||
return false;
|
||||
}
|
||||
const T* pEntry = reinterpret_cast<const T*>(
|
||||
@ -351,7 +351,7 @@ template <class S> class relocation_section_accessor_template
|
||||
{
|
||||
const endianness_convertor& convertor = elf_file.get_convertor();
|
||||
|
||||
if (relocation_section->get_entry_size() < sizeof( T ) ) {
|
||||
if ( relocation_section->get_entry_size() < sizeof( T ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ template <class T> class section_impl : public section
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------------
|
||||
section_impl( const endianness_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 endianness_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;
|
||||
|
@ -77,7 +77,7 @@ template <class T> class segment_impl : public segment
|
||||
public:
|
||||
//------------------------------------------------------------------------------
|
||||
segment_impl( const endianness_convertor* convertor,
|
||||
const address_translator* translator )
|
||||
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 endianness_convertor* convertor = nullptr;
|
||||
const endianness_convertor* convertor = nullptr;
|
||||
const address_translator* translator = nullptr;
|
||||
size_t stream_size = 0;
|
||||
bool is_offset_set = false;
|
||||
|
@ -295,7 +295,7 @@ template <class S> class symbol_section_accessor_template
|
||||
Elf_Half& section_index,
|
||||
unsigned char& other ) const
|
||||
{
|
||||
bool ret = false;
|
||||
bool ret = false;
|
||||
const endianness_convertor& convertor = elf_file.get_convertor();
|
||||
|
||||
Elf_Word nbucket = *(const Elf_Word*)hash_section->get_data();
|
||||
@ -334,7 +334,7 @@ template <class S> class symbol_section_accessor_template
|
||||
Elf_Half& section_index,
|
||||
unsigned char& other ) const
|
||||
{
|
||||
bool ret = false;
|
||||
bool ret = false;
|
||||
const endianness_convertor& convertor = elf_file.get_convertor();
|
||||
|
||||
uint32_t nbuckets = *( (uint32_t*)hash_section->get_data() + 0 );
|
||||
|
@ -284,10 +284,10 @@ class compression_interface
|
||||
* @returns a smart pointer to the decompressed data.
|
||||
*/
|
||||
virtual std::unique_ptr<char[]>
|
||||
inflate( const char* data,
|
||||
inflate( const char* data,
|
||||
const endianness_convertor* convertor,
|
||||
Elf_Xword compressed_size,
|
||||
Elf_Xword& uncompressed_size ) const = 0;
|
||||
Elf_Xword compressed_size,
|
||||
Elf_Xword& uncompressed_size ) const = 0;
|
||||
|
||||
/**
|
||||
* compresses a section
|
||||
@ -299,10 +299,10 @@ class compression_interface
|
||||
* @returns a smart pointer to the compressed data.
|
||||
*/
|
||||
virtual std::unique_ptr<char[]>
|
||||
deflate( const char* data,
|
||||
deflate( const char* data,
|
||||
const endianness_convertor* convertor,
|
||||
Elf_Xword decompressed_size,
|
||||
Elf_Xword& compressed_size ) const = 0;
|
||||
Elf_Xword decompressed_size,
|
||||
Elf_Xword& compressed_size ) const = 0;
|
||||
};
|
||||
|
||||
} // namespace ELFIO
|
||||
|
Loading…
Reference in New Issue
Block a user