This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Determining size of embedded blobs


> 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

 


      


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]