mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27:35 +00:00
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. :^)
This commit is contained in:
parent
ab72666f48
commit
46ce47a984
3 changed files with 5 additions and 2 deletions
|
@ -155,6 +155,8 @@ public:
|
|||
bool is_executable() const { return header().e_type == ET_EXEC; }
|
||||
bool is_relocatable() const { return header().e_type == ET_REL; }
|
||||
|
||||
LinearAddress entry() const { return LinearAddress(header().e_entry); }
|
||||
|
||||
private:
|
||||
bool parseHeader();
|
||||
const char* raw_data(unsigned offset) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue