On Thu, 2005-03-10 at 16:55, Hans-Peter Nilsson wrote: > But that requires source-level instrumentation.
Isn't a compiler option -fglobalize-symbol also a form of source-level instrumentation? Either way, you need the source, and you get different code emitted. If you are interested in implementing this, you should consider how this will interact with other compiler features such as __asm__, attribute ((alias)), and C++/Java name mangling. Also, I think the IPA support will rename variables behind your back to try to avoid conflicts, e.g. if you try to compile two source files into one object file. There are a number of possible complications here for the -fglobal-symbol=SYMBOLNAME option which should be carefully considered when the option is implemented. The meaning of the other two options seems clear enough. -- Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com