[cfe-dev] LLVM linker substitute for GNU's '-sectcreate'
Nick Kledzik
kledzik at apple.com
Thu Mar 10 12:52:38 PST 2011
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.
-Nick
On Mar 10, 2011, at 4:47 AM, karl at pitrich.com wrote:
> Greetings,
>
> 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.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list