From 167c5cd690abba9df660d78c8ee14aa51e9d2c08 Mon Sep 17 00:00:00 2001 From: Serge Lamikhov-Center Date: Wed, 31 Mar 2021 10:34:02 +0300 Subject: [PATCH] Improve usage instructions --- examples/writer/writer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/writer/writer.cpp b/examples/writer/writer.cpp index 51cd6e5..2156751 100644 --- a/examples/writer/writer.cpp +++ b/examples/writer/writer.cpp @@ -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" );