mirror of
https://github.com/serge1/ELFIO.git
synced 2024-11-02 11:27:03 +00:00
Improve usage instructions
This commit is contained in:
parent
f591a3b74e
commit
167c5cd690
@ -21,14 +21,14 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This example shows how to create ELF object file for Linux on x86
|
||||
* This example shows how to create ELF executable file for Linux on x86-64
|
||||
*
|
||||
* Instructions:
|
||||
* 1. Compile and link this file with ELFIO library
|
||||
* g++ writer.cpp -o writer
|
||||
* 2. Execute result file write_obj
|
||||
* 2. Execute result file writer
|
||||
* ./writer
|
||||
* 3. Add executable flag to the output file
|
||||
* 3. Add executable flag for the output file
|
||||
* chmod +x hello_x86_64
|
||||
* 4. Run the result file:
|
||||
* ./hello_x86_64
|
||||
@ -125,7 +125,7 @@ int main( void )
|
||||
// In this example, the code starts at the first address of the
|
||||
// 'text_seg' segment. Therefore, the start address is set
|
||||
// to be equal to the segment location
|
||||
writer.set_entry( CODE_ADDR );
|
||||
writer.set_entry( text_seg->get_virtual_address() );
|
||||
|
||||
// Create ELF file
|
||||
writer.save( "hello_x86_64" );
|
||||
|
Loading…
Reference in New Issue
Block a user