This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ Frontend and combining files
Mike Stump wrote:
> 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.
>
That sounds like a great idea! I guess I need to start researching how
to embed data into .o files... Is looking at debug data generated by
the C++ front-end a good place to start?
I assume this can be done by adding certain directives to the
assembler source file (.s), since the assembler generates the .o files.
Anyhow, I will continue to look further into this and may get back
with more questions :-) later. Thanks for the idea.
Thanks,
Brendon.