C++ Frontend and combining files

Mike Stump mrs@apple.com
Tue Oct 3 19:21:00 GMT 2006


On Oct 2, 2006, at 9:24 PM, Brendon Costa wrote:
> * Modify the ASM spec used for compiling .s files into .o files so
> that it will somehow rename the /tmp/foo1.s.edc files to
> /tmp/gah1.o.edc files where /tmp/gah1.o is the name of the output .o
> file that comes from the assembler.


> * Write a wrapper for ld, that looks for .edc files for each .o file
> given and merges them before calling the real ld. This would also look
> for .edc files associated with any libraries being statically linked
> with and merge those as well.

Hum, on second thought, why not just encode the information you want  
into the .o file.  Just put it into a special section, in whatever  
format you like, the linker will combine them, no additional files, .a  
files work, ld -r foo.o bar.o -o new.o works and so on.  You can then  
fish the information back out from the .o files or the executable as  
you want.



More information about the Gcc mailing list