This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PowerPC [target/17828] -O2 -fPIC doesn't work with switches in linkonce functions and new binutils
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 29 Jul 2005 09:51:37 +0930
- Subject: Re: PowerPC [target/17828] -O2 -fPIC doesn't work with switches in linkonce functions and new binutils
- References: <20050727022115.GB21279@bubble.grove.modra.org>
On Wed, Jul 27, 2005 at 11:51:15AM +0930, Alan Modra wrote:
> This fixes a powerpc-linux problem with the .got2 section. When gcc
[snip]
> function's sections. This means that constants in .got2 are not shared
> across functions when using -ffunction-sections -fdata-sections, an
> improvement if the per-translation unit .got2 was overflowing, but
> otherwise resulting in bloat. For example, libstdc++.so .got2 increases
> from 0xfa0 to 0x2fe4 bytes, which I'm not really happy about. I fixed
> ld --gc-sections to work on shared libs, but that doesn't help very
> much. Is there a good reason why libstdc++ is compiled with
> -ffunction-sections -fdata-sections? It seems useless when not using
> --gc-sections.
David informs me there is some work in the pipeline to rearrange data
section layout for powerpc. Since my patch may affect this work, and
I'm not happy with the .got2 size blowout, I formally withdraw this
patch. Instead, I'll make the linker simply ignore the problem.
--
Alan Modra
IBM OzLabs - Linux Technology Centre