My command-line program\'s build process generates a binary file (over 500KB) that currently has to be referenced by path from argv. I would like to embed this file in the execu
During the link phase, pass the arguments -sectcreate
to the linker. If you're driving the linker via an invocation of the compiler, which is pretty common, you'd pass it as -Wl,-sectcreate,
.
You'd make up segment and section names.
You would use the getsectdata() function along with _dyld_get_image_vmaddr_slide() to get a pointer to the data at runtime.