This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: binary to elf conversion


So objcopy from binary to  linkable file isn't really the best
or most reliable way.

Sounds like I need to change  the  procedure on my side
to generate a .s file which defines the same symbolic
information around an incbin as objcopy did and then
assemble it with the same flags as the rest of the application.
Right?

Or would I be better off to write a program to dump the
binary file as a C file with an initialized array?

You can use one of the many available "bin2c" style programs for this; binutils contains one (used during SPU support builds), the kernel contains one.

Or you can just use a linker script, if you have one target
only.

I am looking for something cross-target and reliable.

I'd go for bin2c then.



Segher



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