Re: Stripped binary insertion with the GNU Linker suggestions (fwd)

From: Larry McVoy (
Date: Fri Jul 11 2003 - 10:35:57 EST

On Fri, Jul 11, 2003 at 04:19:55PM +0100, Jon Masters wrote:
> I have seen other nasty ways to do this involving converting the image to
> byte values in very large arrays or inserting literal byte values in to
> the output file but there just has to be a generic method for inserting
> an image in to the middle of an output file.

No, there isn't, at least I haven't found one. The BK installer does
exactly what you want (and you can have the source if you like, BSD
license) on the platforms listed below. We had to play some nasty
games to make this work, I believe it was HP-UX which "knew" that your
array was full of zeros and did not allocate it, it did it at runtime.
Any sort of predictable pattern it figured out, the following fools it
for now:

unsigned char data_data[3866327] = {

platforms that this technique works on:


Larry McVoy              lm at
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue Jul 15 2003 - 22:00:40 EST