[Nottingham] Stripped binary insertion with the GNU Linker suggestions (fwd)
Jon Masters
nottingham at mailman.lug.org.uk
Fri Jul 11 16:29:01 2003
---------- Forwarded message ----------
Date: Fri, 11 Jul 2003 16:16:13 +0100 (BST)
From: Jon Masters <jonathan@jonmasters.org>
To: oxlug@lists.oxlug.org
Cc: clug@cambridge-lug.org, jcm@jonmasters.org
Subject: Stripped binary insertion with the GNU Linker suggestions
Hi,
I have a linker script which amongst other things contains:
MEMORY
{
sdram_linux : ORIGIN = 0x00500000, LENGTH = 4M
}
SECTIONS {
.linux :
{ linux_kernel } > sdram_linux
}
What I have is a stripped kernel image which I want to shove in to a
section in the output elf file though the Linker complains it does not
recognise the file format (as it perhaps should). I realise that the
above is not the correct way to do this - suggestions are very welcome.
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.
Cheers,
Jon.