public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Gary Thomas <gary@mlbassoc.com>
To: "Doyle, Patrick" <WPD@dtccom.com>
Cc: ecos discuss list <ecos-discuss@sources.redhat.com>
Subject: Re: [ECOS] binutils wizardry
Date: Fri, 30 Jul 2004 13:08:00 -0000	[thread overview]
Message-ID: <1091191787.10813.177.camel@hermes> (raw)
In-Reply-To: <F18ED44D2778844592DFB732956B66510225C608@DTCNT40S4>

On Fri, 2004-07-30 at 06:42, Doyle, Patrick wrote:
> I have an existing application that I load onto my device with RedBoot.  I
> have a raw binary data file that I also load onto my device that my
> application expects to find in memory at address 0x80000.  I would like to
> figure out some method, preferably _after_ I've linked my main application,
> to glue these two pieces together into a single ELF file so that I could
> download both pieces in one swell foop.
> 
> I'm reasonably sure I can do this with some subset of the programs in
> binutils, but I'm not too sure where to start.  I vaguely remember looking
> at how Linux gets gzip'ed for booting (10 or more years ago), so I'll
> probably start there, but, in the mean time, I thought I would ask for some
> pointers.

This probably wouldn't help much with your situation.

> 
> Any pointers?

Arrange to have your special data in it's own ELF section.  Then you can
use objcopy to adjust the address of that section (and leave the rest 
alone).  You should be able to work out the details to get your program
to load one place and the data in a totally different one.

With some magic spells, you could probably even make this happen 
directly at link time (by editing the linker scripts).

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

  reply	other threads:[~2004-07-30 12:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-30 12:59 Doyle, Patrick
2004-07-30 13:08 ` Gary Thomas [this message]
2004-07-30 13:48 Doyle, Patrick
2004-07-30 14:18 ` Gary Thomas
2004-07-30 15:05 ` Sergei Organov
2004-07-30 16:17 Doyle, Patrick
2004-08-01 22:52 Andrew Dyer
2004-08-02 21:13 Doyle, Patrick

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=1091191787.10813.177.camel@hermes \
    --to=gary@mlbassoc.com \
    --cc=WPD@dtccom.com \
    --cc=ecos-discuss@sources.redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).