stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Created: (STDCXX-442) [IBM XLC++] duplicate symbols for inline functions
Date Thu, 07 Jun 2007 23:36:25 GMT
[IBM XLC++] duplicate symbols for inline functions
--------------------------------------------------

                 Key: STDCXX-442
                 URL: https://issues.apache.org/jira/browse/STDCXX-442
             Project: C++ Standard Library
          Issue Type: Bug
          Components: External
         Environment: VisualAge 6.0, 7.0, and XLC++ 8.0 on AIX
            Reporter: Martin Sebor


PMR 02347,K78,000

Without optimization XLC++ emits duplicate symbols even for trivially inline functions that
the system linker
fails to collapse into one, causing a considerable code bloat in libraries and executables.

$ cat t.cpp && xlC -qversion && xlC -c -DTU1 t.cpp -o 1.o && xlC -c
t.cpp -o 2.o && xlC -G -brtl 1.o 2.o -o lib.so && nm 1.o 2.o lib.so
struct S { void foo () { } };

#ifdef TU1
void bar (S s) { s.foo (); }
#else
void baz (S s) { s.foo (); }
#endif
IBM XL C/C++ Enterprise Edition V8.0 for AIX 
Version: 08.00.0000.0013
1.o:
.S::foo()            T           0
.bar(S)              T          48
S::foo()             D         136          12
S::foo()             d         128           4
TOC                  d         128
bar(S)               D         148          12
bar(S)               d         132           4
t.cpp                f           -
2.o:
.S::foo()            T           0
.baz(S)              T          48
S::foo()             D         136          12
S::foo()             d         128           4
TOC                  d         128
baz(S)               D         148          12
baz(S)               d         132           4
t.cpp                f           -
lib.so:
                     f           -
.S::foo()            T   268435752
.S::foo()            T   268435880
.bar(S)              T   268435800
.baz(S)              T   268435928
S::foo()             D   536871480          12
TOC                  d   536871516
__rtld               U           -
bar(S)               D   536871492          12
baz(S)               D   536871504          12
t.cpp                f           -
t.cpp                f           -


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message