objcopy can do this, with the --add-section= directive. Note that
bzImage is *NOT* an ELF object!
As far as converting a binary file to a .o that can be included in
code, GNU ld will do it quite cleanly with:
ld -r -b binary file.bin -o file.o
It creates the symbols _binary_file_bin_{end,size,start} to reference
it.
The only problem is that it puts it in the .data segment, and at least
I can't find a way to put it in the .rodata segment instead. I've
been thinking about submitting a patch to bfd that would define a
"robinary" format (same as binary except it is all .rodata).
> There's actually quite a bit of stuff that's currently arch-specific that
> needn't be.
True enough.
-hpa
-- "The user's computer downloads the ActiveX code and simulates a 'Blue Screen' crash, a generally benign event most users are familiar with and that would not necessarily arouse suspicions." -- Security exploit description on http://www.zks.net/p3/how.aspb- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/