PATCH to collect2 to handle --[no-]demangle flags

Per Bothner per@bothner.com
Tue Jul 13 12:15:00 GMT 2004


Currently, passing --no-demangle to collect2 directly,
or indirectly from gcc as -Wl,--no-demangle, has no effect.
This patch fixes that, and also handles --demangle[=STYLE].

There are two cases: If HAVE_LD_DEMANLE, then we pass these
options to the inferior ld.  Otherwise, we do *not* pass
these options to ld (another change), but call cplus_demangle;
this patch sets the style and no_demangle correctly in this case.

I need to be able to turn off demangling, for a script I wrote
which generates stubs for missing symbols.  This is one (working
but kludgey) approach to reducing size of Java applications when
static linking.

No regressions on GNU/Linux (which for some strange reason does
not set HAVE_LD_DEMANGLE - perhaps to avoid version skew?).
I also did some manual testing.

Ok for mainline?
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: collect2.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040713/54978a96/attachment.ksh>


More information about the Gcc-patches mailing list