PATCH: gas .incbin pseudo-op

Michael Schwingen rincewind@discworld.dascon.de
Sun Jul 8 12:12:00 GMT 2001


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.



More information about the Binutils mailing list