Messages in this thread | | | Date | Thu, 18 Mar 1999 11:44:45 +0100 (MET) | From | "Maciej W. Rozycki" <> | Subject | Re: [PATCH] /proc/config.gz against 2.2.3 |
| |
On 18 Mar 1999, H. Peter Anvin wrote:
> 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).
You may use a ld script similar to the following to achieve the desired effect:
SECTIONS { .rodata : *(.data) }
-- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available +
- 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/
| |