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] Commented: (STDCXX-441) [IBM VAC++ 6.0] ld duplicate symbol warnings for trivially inline functions
Date Thu, 07 Jun 2007 23:26:26 GMT

    [ https://issues.apache.org/jira/browse/STDCXX-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12502573
] 

Martin Sebor commented on STDCXX-441:
-------------------------------------

As can be seen below the linker warnings are helpful since the symbols actually end up getting
duplicated in the shared library! How horribly inefficient!

$ nm 1.o 2.o lib.so 
1.o:
.S::foo()            T          76
.bar(S)              T           0
S::foo()             D         148          12
S::foo()             d         132           4
TOC                  d         128
bar(S)               D         136          12
bar(S)               d         128           4
t.cpp                f           -
2.o:
.S::foo()            T          76
.baz(S)              T           0
S::foo()             D         148          12
S::foo()             d         132           4
TOC                  d         128
baz(S)               D         136          12
baz(S)               d         128           4
t.cpp                f           -
lib.so:
                     f           -
.S::foo()            T   268435828
.S::foo()            T   268435956
.bar(S)              T   268435752
.baz(S)              T   268435880
S::foo()             D   536871492          12
TOC                  d   536871516
__rtld               U           -
bar(S)               D   536871480          12
baz(S)               D   536871504          12
t.cpp                f           -
t.cpp                f           -


> [IBM VAC++ 6.0] ld duplicate symbol warnings for trivially inline functions
> ---------------------------------------------------------------------------
>
>                 Key: STDCXX-441
>                 URL: https://issues.apache.org/jira/browse/STDCXX-441
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: External
>         Environment: VisualAge C++ 6.0
>            Reporter: Martin Sebor
>
> $ cat t.cpp && xlC -qversion || true && 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
> struct S { void foo () { } };
> #ifdef TU1
> void bar (S s) { s.foo (); }
> #else
> void baz (S s) { s.foo (); }
> #endif
> C for AIX version 6.0.0.0
> ld: 0711-224 WARNING: Duplicate symbol: .S::foo()
> ld: 0711-224 WARNING: Duplicate symbol: S::foo()
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.

-- 
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