mirror of
https://github.com/serge1/ELFIO.git
synced 2024-12-26 18:15:40 +00:00
To make memory_size bigger than file_size, set memory_size prior calling 'save' function
This commit is contained in:
parent
b3b7aed245
commit
2cddbab258
@ -479,7 +479,8 @@ class elfio
|
||||
}
|
||||
|
||||
segments[i]->set_file_size( current_data_pos - current_file_pos );
|
||||
segments[i]->set_memory_size( current_data_pos - current_file_pos );
|
||||
segments[i]->set_memory_size( current_data_pos - current_file_pos +
|
||||
segments[i]->get_memory_size() );
|
||||
segments[i]->save( f, (std::streamoff)segment_header_position, (std::streamoff)current_file_pos );
|
||||
current_file_pos = current_data_pos;
|
||||
segment_header_position += header->get_segment_entry_size();
|
||||
|
@ -36,7 +36,7 @@ class section
|
||||
public:
|
||||
virtual ~section() {};
|
||||
|
||||
virtual Elf_Half get_index() const = 0;
|
||||
virtual Elf_Half get_index() const = 0;
|
||||
|
||||
ELFIO_GET_SET_ACCESS_DECL( std::string, name );
|
||||
ELFIO_GET_SET_ACCESS_DECL( Elf_Word, type );
|
||||
|
Loading…
Reference in New Issue
Block a user