mirror of
https://github.com/serge1/ELFIO.git
synced 2024-12-27 12:17:28 +00:00
Created How to modify section data (markdown)
parent
6d740ae669
commit
376fd21bcd
8
How-to-modify-section-data.md
Normal file
8
How-to-modify-section-data.md
Normal file
@ -0,0 +1,8 @@
|
||||
The primarily design of the library is to use 'elfio' object as a read-only reader or as a writer for newly created ELF object or executable files. In both such scenarios, modification of existing section data is not required.
|
||||
|
||||
Saying this, there are couple of ways to alternate the section data.
|
||||
One of the ways is demonstrated in 'anonymizer' example. An external file is modified on base of the parsed information.
|
||||
|
||||
The second way is just alternating raw memory pointed by section->get_data(). An example of this can be found in generic_set_entry_rel() function in elfio_relocation.hpp file.
|
||||
|
||||
Please be warned: read/modify/write scenario may or may not work - there are too many cross references inside the format and it is easy to damage them. This will lead to incorrect object/executable file
|
Loading…
Reference in New Issue
Block a user