Skip navigation.
 
mlGetting binary data linked into an executable
FROM : Paul Thomas
DATE : Mon Jun 02 20:53:51 2008

I've got some huge test data that I need to access as C arrays inside 
a command line test app. I don't want use file I/O at runtime and the 
compiler is groaning under the weight if I generate source files with 
the data in hex or what have you.

Does anyone know a way to simply link the data into my executable?

It seems that most ELF systems allow this using GNU objcopy or even ld 
(ld -r) but apple's tools aren't playing ball.

ta,
pt.

Related mailsAuthorDate
mlGetting binary data linked into an executable Paul Thomas Jun 2, 20:53
mlRe: Getting binary data linked into an executable Paul Thomas Jun 2, 21:02
mlRe: Getting binary data linked into an executable Edward Patel Jun 2, 21:20
mlRe: Getting binary data linked into an executable James Montgomerie Jun 3, 11:17
mlRe: Getting binary data linked into an executable Michael Vannorsdel Jun 3, 11:56
mlRe: Getting binary data linked into an executable Markus Hitter Jun 3, 13:16