public inbox for linux-assembly@vger.kernel.org
 help / color / mirror / Atom feed
From: ishare <june.tune.sea@gmail.com>
To: Sofiane Akermoun <akersof@gmail.com>
Cc: linux-assembly@vger.kernel.org
Subject: Re: how does ld.so call ELF's entry?
Date: Sun, 7 Apr 2013 11:39:13 +0800	[thread overview]
Message-ID: <20130407033913.GB9617@debian.localdomain> (raw)
In-Reply-To: <CAN0_x-Je1=2mtN8tY2mvBa-X7_P0dBoG9KRh0P63uW91eE5H2Q@mail.gmail.com>

On Sun, Apr 07, 2013 at 05:11:28AM +0200, Sofiane Akermoun wrote:
> Hello,
> 
> 
> The interpreter is specified during linking process and the program header
> of your binary is filled with good values.
> Then when the operating system load your binary, he finds next the
> interpreter to use.
> The linker ld sets the good values by default but you can overwrite it or
> specify other values if you want.
> The steps are:
> 1)The operating system loads your binary
> 2)The program loader system execute the Interpreter specifiy in the binary
> 3)The interpreter gather all the dynamic libraries needed in memory


> 4)The Control is passed to the entry point of your program

  How does  the step 4 been  done ?
  
  thanks!
> 
> The entry point is specified in your code source as a "global". And could
> be find in your object file by the linker.
> In theory there are some default tag to specify entry point, like "..start"
> for nasm, but you can also passed it to the linker.
> 
> regards,
> 
> Sofiane Akermoun
> akersof@gmail.com
> 
> 
> 
> 
> 
> 2013/4/7 ishare <june.tune.sea@gmail.com>
> 
> >
> >   For an ELF ,which needs a interpreter , how is it  been called by the
> > interpreter ?
> >
> >   As I know the interpreter is loaded first and do something essential
> > ,then call the main routine of ELF .
> >   How is this procedure implemented ?
> >
> >   Thanks!
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-assembly"
> > in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
> 
> 
> 
> -- 
> Sofiane AKERMOUN
> akersof@gmail.com

  parent reply	other threads:[~2013-04-07  3:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-07  2:19 how does ld.so call ELF's entry? ishare
2013-04-07  3:13 ` Sofiane Akermoun
     [not found] ` <CAN0_x-Je1=2mtN8tY2mvBa-X7_P0dBoG9KRh0P63uW91eE5H2Q@mail.gmail.com>
2013-04-07  3:39   ` ishare [this message]
2013-04-07  3:43     ` Chris Evans
2013-04-07  3:45       ` ishare
2013-04-07  4:45         ` Sofiane Akermoun
2013-04-07  4:52           ` ishare
2013-04-07  6:26             ` Sofiane Akermoun
2013-04-07  6:56               ` ishare
2013-04-07  7:47                 ` Sofiane Akermoun
2013-04-07  4:40     ` Sofiane Akermoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130407033913.GB9617@debian.localdomain \
    --to=june.tune.sea@gmail.com \
    --cc=akersof@gmail.com \
    --cc=linux-assembly@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox