This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: gas .incbin pseudo-op
- To: Binutils List <binutils at sources dot redhat dot com>
- Subject: Re: PATCH: gas .incbin pseudo-op
- From: Michael Schwingen <rincewind at discworld dot dascon dot de>
- Date: Sun, 8 Jul 2001 20:20:24 +0200
- References: <993829827.23471.10.camel@localhost> <20010705234829.U16275@bubble.sa.bigpond.net.au>
On Thu, Jul 05, 2001 at 11:48:29PM +0930, Alan Modra wrote:
> It's already possible to include binary files using the linker, which
> is probably why no one has found this feature necessary.
Right. However, you need to pass the binary file through objcopy *and* ld
(with a special linker script) just to get a linkable object with arbitrary
section (not .data) and symbols for start/end address. This is at least ugly
in that it requires an extra linker script and temporary files.
I would also find an .incbin pseudo-op very useful. I had to work around
this in two cases: once for including graphics in the program, and once to
link the compressed kernel executable into the boot loader, which needs to
know the start address/length.
I would think there are enough uses for such an extension to justify its
inclusion in gas.
cu
Michael
--
In the beginning there was nothing, which exploded.