This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ Frontend and combining files
Thanks for all the help. I have tried a few things now and decided to
try and create a new section called .edoc I tried using .comment on my
machine, however there is already data in .comment on my machine and
it will make parsing the data from the section to find my data a
little more difficult as it becomes intermixed.
At least for the moment I don't think it necessary to play with linker
scripts. I tried a few things on my machine:
* linking single .o file to create exe
* linking multiple .o files to create exe
* creating .a file from multiple .o files and linking that to create exe
where each .o file had a defined .edoc section with some data in it
and in all cases the resulting exe has a .edoc section with the data
from each .o file .edoc section appended to each other.
This works well for my purposes (Though I guess I( should try on a few
different platforms as I really would like to support at least NetBSD,
Linux and Win32 using MinGW. The last is most likely a problem
platform but ill see how I go). However when I tried using the
.comment section, I ended up with my data intermixed within a number
of other comments that I did not insert. I would need to find some way
of separating my data from the other inserted data which starts to get
more complex. By using my own section I don't think I need to define
any symbols or sync headers for my data or anything like that.
Thanks again for the help. I now have somethings I can try.
Brendon.