This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: inline-unit-growth trouble


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-


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]