flat assembler
Message board for the users of flat assembler.

Index > Linux > Read The Header of The Current Executable? is it Possible?

Author
Thread Post new topic Reply to topic
Nameless



Joined: 30 Apr 2010
Posts: 95
Nameless 14 Apr 2011, 09:58
i was wondering if there is a way to read the ELF headers under linux (from the current running executable not other elf files)? like its done on windows by getting the value in ebx at startup (which points to PEB) and reading the image base from it.

how can it be done with linux elf files?

thanks.
Post 14 Apr 2011, 09:58
View user's profile Send private message Reply with quote
Endre



Joined: 29 Dec 2003
Posts: 215
Location: Budapest, Hungary
Endre 15 Apr 2011, 14:26
You read the file in argv[0] and interpret it.
Post 15 Apr 2011, 14:26
View user's profile Send private message Reply with quote
Nameless



Joined: 30 Apr 2010
Posts: 95
Nameless 16 Apr 2011, 03:55
no other way for the executable to find its owen image base?
Post 16 Apr 2011, 03:55
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.