This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Understanding in detail how linux prepares to execute a program


On Mon, Oct 13, 2008 at 9:20 AM, Stephen Torri <torrisa@auburn.edu> wrote:
> I am investigating reverse engineering of binary programs on the Linux
> platform. Where can I find information of the steps Linux takes to
> execute a program (e.g. /bin/cp)? My search has lead me to think that I
> need to study glibc, specifically ld-<version>.so, for my answer.

Yep, the dynamic linker/loader ld.so is one of the responsible
parties.  You don't need to reverse engineer anything.  Just use
readelf, objdump, nm, and your architecture's ELF ABI supplement to
figure out what is going on.

There's also a book by John R. Levine called: "Linkers and Loaders"
that may be helpful.

> The question I am trying to answer with the knowledge of the steps Linux
> takes to execute a program is how the segment registers are loaded from
> the information in the ELF header.

The ELF ABI supplement for your architecture should indicate how an
executable file is mapped into memory by the loader.

Ryan S. Arnold


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]