This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Feature request: Globalize symbol
- From: James E Wilson <wilson at specifixinc dot com>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Cc: fredrik dot hugosson at axis dot com, gcc at gcc dot gnu dot org
- Date: Thu, 10 Mar 2005 17:36:37 -0800
- Subject: Re: Feature request: Globalize symbol
- References: <200503110055.j2B0t8eF007002@ignucius.se.axis.com>
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