This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: inline-unit-growth trouble
- From: Andreas Krebbel <krebbel1 at de dot ibm dot com>
- To: Joe Buck <Joe dot Buck at synopsys dot COM>
- Cc: gcc-patches at gcc dot gnu dot org, julian at codesourcery dot com
- Date: Mon, 18 Apr 2005 19:20:34 +0200
- Subject: Re: inline-unit-growth trouble
- Organization: IBM Deutschland Entwicklung GmbH
- References: <20050415160115.GA3649@de.ibm.com> <35166C0A-ADE3-11D9-B4A4-003065BDF310@apple.com> <20050415192420.GB28550@synopsys.com>
Hi,
thanks for your responses.
I've debugged a little further and found out that
the testcase breakage was caused by (the elfos.h part):
http://gcc.gnu.org/ml/gcc-patches/2005-04/msg00913.html
The elfos.h part of the patch was reverted on 04/14/2005:
http://gcc.gnu.org/ml/gcc-patches/2005-04/msg01604.html
and since then everything is back working again.
As already pointed out in the discussion thread, it is probably not
the patch to blame here. It seems that the patch reveals a linker problem.
Without the patch reverted I can reproduce the following failure on
31bit (s390) as well as on 64bit (s390x) using
binutils-2.15.92.0.2 from kernel.org:
/usr/bin/ld: Warning: size of symbol `__gnu_cxx::__common_pool_policy<__gnu_cxx::__pool, true>::_S_get_pool()' changed from 136 in ta.o to 208 in tc.o
/usr/bin/ld: Warning: size of symbol `__gnu_cxx::__common_pool_policy<__gnu_cxx::__pool, true>::_S_destroy_thread_key(void*)' changed from 56 in ta.o to 216 in tc.o
/usr/bin/ld: Warning: size of symbol `__gnu_cxx::__common_pool_policy<__gnu_cxx::__pool, true>::_S_initialize()' changed from 56 in ta.o to 224 in tc.o
/usr/bin/ld: Warning: size of symbol `__gnu_cxx::__common_pool_policy<__gnu_cxx::__pool, true>::_S_initialize_once()' changed from 116 in ta.o to 288 in tc.o
The warnings disappear when --parm inline-unit-growth=.. is used to increase the treshold.
But you are right that they can also be triggered using different optimization
levels. So I agree that the linker should be able to sort this out.
Without the patch the symbols above are marked as "weak" in both object files. With the
patch both are "global"._bfd_elf_merge_symbol in binutils wants to see one of
them to be "weak" in order to accept a different size.
Because both of the symbols are in comdat .group sections and therefore are
explicitly supposed to be merged the linker should accept a size change
even if they are marked "global". This is already fixed in the current binutils cvs.
Bye,
-Andreas-