Re: config procfs patch

J. Sean Connell (ankh@canuck.gen.nz)
Mon, 2 Jun 1997 06:55:33 +1200 (NZST)


On Fri, 23 May 1997, Alan Cox wrote:

> Oh for the benefit of people not on the list for long enough someone
> suggests wasting 20K of kernel memory on this, someone else suggests compressing
> it and we drop the idea about every 4 months. Last time someone suggested the
> far more sensible idea of linking the config file into the final zImage as
> an extra ELF segment, thus taking no RAM, but nobody did it.
>
> So save the discussion and just do the ELF thing

That's what I've just spent the last hour looking at, but I can't see any
way to do it. Here's what I think happens (note that this is after I've
been up probably thirty hours, so I may well have missed something):

vmlinux is built, which is an ELF object. It is then flattened down into
a straight binary object, which is then wrapped up as an ELF object, then
postpended to head and misc, and then flattened back into a binary object.
There isn't any ELF in the final kernel image to have sections (well, other
than .data, unless I'm seriously missing something).

Add a section to vmlinux, have it disappear before we get to bvmlinux.
(This assumes you're using bzImage, not zImage). Add a section to bvmlinux,
have it disappear out of bvmlinux.out. Try to add something to
bvmlinux.out, get told it's unrecognized (of course, it's a pure binary
image).

What have I missed?

--
J. S. Connell      | Systems Adminstrator, ICONZ.  Any opinions stated above
ankh@canuck.gen.nz | are not my employers', not my boyfriends', my God's, my
ankh@iconz.co.nz   | friends', and probably not even my own.
-------------------+---------------------------------------------------------
            PGP key at http://www.canuck.gen.nz/~ankh/pgpkey.html