Flag Day: g++ and snv_98 -snv_103 can trigger linker relocation warnings


Date: Mon, 08 Dec 2008 14:12:08 -0700
From: Ali Bahrami <Ali.Bahrami at sun dot com>
To: onnv-gate at onnv dot eng dot sun dot com, on-all at eng dot sun dot com
Subject: Flag Day: g++ and snv_98 -snv_103 can trigger linker relocation warnings

This heads up message is of interest if you compile
C++ code using gcc/g++ 3.4.3, on a system running
any version of Solaris in the range snv_98 - snv_103,
inclusive. This includes OpenSolaris 2008.11.

Otherwise, you can stop reading now.

If you build C++ code using gcc, on a build system that
includes the snv_98 fix for

     6735939 ld(1) discarded symbol relocations errors (Studio and GNU).
     6354160 Solaris linker includes more than one copy of code in
             binary when linking gnu object code

and which does not have the subsequent snv_104 fix for

     6763342 sloppy relocations need to get sloppier

then you may see linker warnings of the form

     ld: warning: relocation warning: R_AMD64_PC32: file pics/HBAList.o:
        section .rela.eh_frame:
        symbol .gnu.linkonce.t._ZNSt6vector...EERKS1_ (section):
        relocation against discarded COMDAT section
        .gnu.linkonce.t._ZNSt6vector...EERKS1_:
        symbol not found, relocation ignored

The code that results from such a link is usable, but
the many warnings will slow down compilation, and will
obscure any real problems that may also be reported.

Upgrading your build system to snv_104 or newer will
fix the problem. The workaround is to use Sun Studio
cc instead of gcc. Alternatively, newer (4.x) versions
of gcc do not trigger this issue.

last modified by danmcd on 2009/11/24 14:23
Collectives
Project


© Sun Microsystems Inc. 2009
XWiki Enterprise 1.8.2.19075 - Documentation
Terms Of Use | Privacy | Trademarks | Copyright Policy | Site Guidelines | Site map | Help
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.