[cfe-dev] LLVM linker substitute for GNU's '-sectcreate'

karl at pitrich.com karl at pitrich.com
Thu Mar 10 04:47:18 PST 2011


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.



More information about the cfe-dev mailing list