This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Determining size of embedded blobs
- From: Jean Hoderd <jhoderd at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 21 Oct 2008 07:48:09 -0700 (PDT)
- Subject: Re: Determining size of embedded blobs
- Reply-to: jhoderd at yahoo dot com
> I want to embed an image into an executable. I managed
> to do it by running "ld -r -b binary -o blob.o
> blob.png"
> on the blob.png file, thus creating a blob.o that I can
> link into my main program. I have access to the binary
> blob by declaring an extern variable:
Hi,
Thank you all for the help! I have tried both ways, and it
does work. It didn't work before because I was trying to
use _end directly as pointer (my C is bit rusty). Anyway,
I'll use the pointer subtraction method because, according
to Kevin, it is more robust than using size.
Regards,
Jean