Red Hat Bugzilla – Bug 191618
.rodata reference to symbol defined in discarded section
Last modified: 2007-11-30 17:11:32 EST
Description of problem:
When building a C++ application with g++32 I get linker errors of the form,
`.gnu.linkonce.t.[symbol]' referenced in section `.rodata' of [file].o:
defined in discarded section `.gnu.linkonce.t.[symbol]' of [file].o
The particular cases I have are inlined functions from the boost date_time
library which should be being inlined to the extent that it's unnecessary to
link against libboost_date_time.so.
The same application compiles and links without error using
binutils-184.108.40.206.2.2-2.1 and the compat-* packages from FC4.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
compat-gcc* is provided as is, so bugs like this (which is indeed gcc bug, but
binutils) that were present in earlier versions will be present even in the
versions where it is provided as compatibility package.
I understand the need to preserve backwards compatability here. The problem is
that there's been a change in behaviour with FC5. With FC4 this is reported as a
warning, but the build completes and I get a binary which works on FC3/4/5 and
RHEL 3/4. With FC5 the build just fails.