summaryrefslogtreecommitdiff
path: root/Kernel/ELFLoader.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-12-29 03:28:55 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-12-29 03:28:55 +0100
commit46ce47a98460cc5dba0cbfabce97cdd45f591021 (patch)
tree8b6c25d997621dc23c93390a41764fa8e9ba46bb /Kernel/ELFLoader.h
parentab72666f4816c3d913a4ddcde226ef4ffc89cce0 (diff)
downloadserenity-46ce47a98460cc5dba0cbfabce97cdd45f591021.zip
Use the entry point address from the ELF header instead of looking up _start.
I love these kind of dumb gotcha moments. Turns out you can find the entry address right there in the header. :^)
Diffstat (limited to 'Kernel/ELFLoader.h')
-rw-r--r--Kernel/ELFLoader.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/ELFLoader.h b/Kernel/ELFLoader.h
index b364ce7299..8ae4628083 100644
--- a/Kernel/ELFLoader.h
+++ b/Kernel/ELFLoader.h
@@ -17,6 +17,7 @@ public:
char* symbol_ptr(const char* name);
bool allocate_section(LinearAddress, size_t, size_t alignment, bool is_readable, bool is_writable);
bool map_section(LinearAddress, size_t, size_t alignment, size_t offset_in_image, bool is_readable, bool is_writable);
+ LinearAddress entry() const { return m_image.entry(); }
private:
bool layout();