LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ian Campbell <ijc@hellion.org.uk>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
linux-kernel@vger.kernel.org,
"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: PATCH/RFC: bzImage payload as compressed ELF file.
Date: Tue, 29 Jan 2008 20:38:32 +0000 [thread overview]
Message-ID: <1201639112.9516.23.camel@cthulhu.hellion.org.uk> (raw)
In-Reply-To: <479F71B6.2010305@zytor.com>
On Tue, 2008-01-29 at 10:34 -0800, H. Peter Anvin wrote:
> Jeremy Fitzhardinge wrote:
> > H. Peter Anvin wrote:
> >> It's also easy enough to either use objdump -h or nm to extract info
> >> from vmlinux; or for some of the simpler stuff, just parse the ELF
> >> directly (perhaps using libelf).
> >>
> >> There is also the -R option to ld, which imports symbols from one
> >> executable into another.
> >
> > Yes, I used -R, though it was necessary to generate a copy of vmlinux
> > with a filtered symbol list to prevent collisions. But I'm not sure any
> > of this is necessary with Ian's approach.
> >
>
> Probably isn't. He just need the start and possibly length of the
> payload section, which should be objdump -h or equivalently reading the
> ELF section table.
I'm currently using "objcopy --extract-symbol -w -N \* -K input_data" to
create a .o with just the symbol I'm interested in and using -R on that.
There's also an option to add a prefix to all symbols which might be
useful.
I finessed the length issue slightly since it happens that the word
before the payload is the payload's length. I'm mulling a variety of
options:
* declare it compression scheme dependant. At least for gzip it
knows when it has reached the end.
* codify the length followed by data thing we happen to have now
* add a length field to the header, using another 4 bytes (is
there any pressure on the size of the header?).
I'd probably go with the later unless we are pressed for space in the
header.
Ian.
--
Ian Campbell
Man who falls in vat of molten optical glass makes spectacle of self.
next prev parent reply other threads:[~2008-01-29 20:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-28 22:42 Ian Campbell
2008-01-28 22:54 ` Jeremy Fitzhardinge
2008-01-29 9:34 ` Ian Campbell
2008-01-29 17:54 ` Jeremy Fitzhardinge
2008-01-29 18:05 ` H. Peter Anvin
2008-01-29 18:31 ` Jeremy Fitzhardinge
2008-01-29 18:34 ` H. Peter Anvin
2008-01-29 20:38 ` Ian Campbell [this message]
2008-01-29 21:50 ` H. Peter Anvin
2008-01-29 21:55 ` Ian Campbell
2008-01-29 22:09 ` H. Peter Anvin
2008-01-28 23:20 ` H. Peter Anvin
2008-01-29 9:31 ` Ian Campbell
2008-02-01 13:10 ` Ingo Molnar
2008-02-01 18:05 ` H. Peter Anvin
2008-02-01 18:15 ` H. Peter Anvin
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=1201639112.9516.23.camel@cthulhu.hellion.org.uk \
--to=ijc@hellion.org.uk \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: PATCH/RFC: bzImage payload as compressed ELF file.' \
/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
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 NNTP newsgroup(s).