All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Singer <elf@buici.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Destination link address
Date: Tue, 8 Jul 2003 07:07:00 -0700	[thread overview]
Message-ID: <20030708140659.GA26624@buici.com> (raw)
In-Reply-To: <20030708105653.1569CC6D82@atlas.denx.de>

On Tue, Jul 08, 2003 at 12:56:48PM +0200, Wolfgang Denk wrote:
> In message <20030708025405.GA3093@buici.com> you wrote:
> > Wolfgang, you say that most targets link to the NV address instead of
> 
> Not most targets. All targets  shall  do  this,  to  make  the  setup
> identical  to  all  architectures. I don't like special cases when we
> can avoid them.
> 
> > the execution address.  Doesn't this make it difficult to debug?
> 
> It doesn't make it easier, but not really difficult either.

Let me rephrase that.  It makes it impossible to use GDB since the
symbols don't point to the correct base.  I suppose that there might
be a command in GDB to move the base address.  I've never looked for
one because it is too easy to make the linker do the heavy lifting.

> > Instead, I changed the u-boot.lds file (not for KEV7A400) to properly
> > set the load address and the execution address.
> 
> What do you mean by "properly"?

When I was working on the x86 version, I wanted to be able to debug
all of the code using gdb.  This means telling the linker exactly what
is going on.  It has directives to indicate the difference between
load address and execution address for just this purpose.  So,
'proper' means that the ELF file reflects what is happen when the
program runs.

What I don't see is the utility of linking code to an address where it
definitely won't execute.  If it is moved elsewhere due to exigencies
of the target then there is nothing we can do about that.  However, if
it is likely to execute at a known address it is helpful to make that
clear in the ELF file.

Cheers.

  reply	other threads:[~2003-07-08 14:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-08  2:54 [U-Boot-Users] Destination link address Marc Singer
2003-07-08 10:56 ` Wolfgang Denk
2003-07-08 14:07   ` Marc Singer [this message]
2003-07-08 14:20     ` Wolfgang Denk

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=20030708140659.GA26624@buici.com \
    --to=elf@buici.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.