lkml.org 
[lkml]   [1999]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:1.813 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site