From bd520a5e83f02782d7c043806dc23d7814a860a2 Mon Sep 17 00:00:00 2001 From: Serge Lamikhov-Center Date: Thu, 22 Oct 2020 12:12:12 +0300 Subject: [PATCH] Add clarification comment on base of question #49 --- examples/writer/writer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/writer/writer.cpp b/examples/writer/writer.cpp index 484f0bb..5a687e2 100644 --- a/examples/writer/writer.cpp +++ b/examples/writer/writer.cpp @@ -98,7 +98,11 @@ int main( void ) char descr[6] = { 0x31, 0x32, 0x33, 0x34, 0x35, 0x36 }; note_writer.add_note( 0x01, "Never easier!", descr, sizeof( descr ) ); - // Setup entry point + // Setup entry point. Usually, a linker sets this address on base of + // ‘_start’ label. + // 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( 0x08048000 ); // Create ELF file