public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Joel Sherrill <joel.sherrill@oarcorp.com>
Cc: Mike Frysinger <vapier@gentoo.org>,
	        "Maciej W. Rozycki" <macro@linux-mips.org>,
	        Andreas Schwab <schwab@suse.de>,
	binutils@sourceware.org,
	        Ralf Corsepius <ralf.corsepius@rtems.org>
Subject: Re: binary to elf conversion
Date: Wed, 22 Aug 2007 01:29:00 -0000	[thread overview]
Message-ID: <daf1fec0979517da960dd82eb72bd5be@kernel.crashing.org> (raw)
In-Reply-To: <46C99EB8.30606@oarcorp.com>

> So objcopy from binary to  linkable file isn't really the best
> or most reliable way.
>
> Sounds like I need to change  the  procedure on my side
> to generate a .s file which defines the same symbolic
> information around an incbin as objcopy did and then
> assemble it with the same flags as the rest of the application.
> Right?
>
> Or would I be better off to write a program to dump the
> binary file as a C file with an initialized array?

You can use one of the many available "bin2c" style programs
for this; binutils contains one (used during SPU support builds),
the kernel contains one.

Or you can just use a linker script, if you have one target
only.

> I am looking for something cross-target and reliable.

I'd go for bin2c then.


Segher

  reply	other threads:[~2007-08-22  1:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-16 14:55 Joel Sherrill
2007-08-16 16:20 ` Sergei Organov
2007-08-16 16:28 ` Andreas Schwab
2007-08-16 17:39   ` Joel Sherrill
2007-08-16 18:04     ` Mike Frysinger
2007-08-17 14:08       ` Maciej W. Rozycki
2007-08-19 17:10         ` Mike Frysinger
2007-08-20 19:54           ` Joel Sherrill
2007-08-22  1:29             ` Segher Boessenkool [this message]
2007-08-16 19:55 ` H.J. Lu

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=daf1fec0979517da960dd82eb72bd5be@kernel.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=binutils@sourceware.org \
    --cc=joel.sherrill@oarcorp.com \
    --cc=macro@linux-mips.org \
    --cc=ralf.corsepius@rtems.org \
    --cc=schwab@suse.de \
    --cc=vapier@gentoo.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).