[cfe-dev] bin2obj using llvm

William Lynch wlynch at wlynch.cx
Wed Jan 13 14:27:17 CST 2010


 As an aside, if you're find with using an alternative tool, I've found gnu
ld to work fine for this.

ld -r -b binary -o foo.o foo.png
objcopy --rename-section .data=.rodata,alloc,load,readonly,data,contents
foo.o

-Bill Lynch

On Wed, Jan 13, 2010 at 12:34 PM, Jochen Wilhelmy <j.wilhelmy at arcor.de>wrote:

> Hi!
>
> as a compiler can generate object files (COFF, ELF etc.) I wonder if
> it is possible to create a bin to object converter (e.g. for image data)
> using llvm.
>
> I have found the classes TargetLoweringObjectFileCOFF but
> I don't know how to fill it with data and save it. Can you give me a hint
> how it works or where in clang I can see how it works.
>
> Thanks,
> Jochen
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.uiuc.edu/pipermail/cfe-dev/attachments/20100113/1a1f1a12/attachment.html 


More information about the cfe-dev mailing list