LLVM linker substitute for GNU's '-sectcreate'


I have a legacy project that I need to recompile with current XCode that comes with
  ld -v
    @(#)PROGRAM:ld PROJECT:ld64-123.2
    llvm version 2.9svn, from Apple Clang 2.0 (build 137)

I have previously used the GNU Linker's options -seg1addr and -sectcreate to add some arbitrary binary data,
contained in an external file, in my resulting (Mach-O) Object file.
Unfortunately, the new XCode4 LLVM Linker does not seem to have -sectcreate or something similar.

Can anyone recommend a workaround so that I can, at compile- or link time, add a section of arbitrary binary code to my binaries?

Thanks a lot,

- Karl

PS: I'm not subscribed to this ML, I'd appreciate a Cc - thanks.

The Xcode4 linker *does* support the -sectcreate and -seg1addr options. What makes you think it does not?

Also, to see the linker version actually being used in an Xode build, add -Wl,-v to the "Other linker flags" for the target. Xcode has a couple copies of linkers, so it may be not running the one in /usr/bin.