This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/8360: HP-UX gcc 3.2 does not construct global/static objects when using 'shl_load'
- From: george dot benavides at calebtech dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 25 Oct 2002 20:06:36 -0000
- Subject: c++/8360: HP-UX gcc 3.2 does not construct global/static objects when using 'shl_load'
- Reply-to: george dot benavides at calebtech dot com
>Number: 8360
>Category: c++
>Synopsis: HP-UX gcc 3.2 does not construct global/static objects when using 'shl_load'
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Oct 25 13:16:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: george.benavides@calebtech.com
>Release: gcc 3.2 on HP-UX
>Organization:
>Environment:
HP-UX 11.0
>Description:
A problem exists where global/static objects are not getting constructed in a shared library that is dynamically loaded using HP 'shl_load' interface. If the library is linked during compile time, the objects are constructed without problem.
The shared library and executable are both compiled using g++ 3.2. Here are the commands used to build,which are provided in a Makefile:
g++ -fPIC -c test_shared.cpp -o test_shared.o
g++ -shared -fPIC test_shared.o -o libtestsh.sl
g++ -fPIC -lpthread -ldld -L. test.cpp -o test
This problem seems to be related to HP-UX specific. The testcase provided works on Linux without errors.
Please advise.
>How-To-Repeat:
use testcase on a HP-UX 11.0 system
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: