public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11137] [3.3 Regression] Linux shared library constructors not called unless there's one global object
       [not found] <bug-11137-4@http.gcc.gnu.org/bugzilla/>
@ 2010-11-16 17:57 ` hjl at gcc dot gnu.org
  0 siblings, 0 replies; 6+ messages in thread
From: hjl at gcc dot gnu.org @ 2010-11-16 17:57 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11137

--- Comment #6 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2010-11-16 17:56:57 UTC ---
Author: hjl
Date: Tue Nov 16 17:56:50 2010
New Revision: 166810

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166810
Log:
Properly demangle a global constructor symbol.

2010-11-16  H.J. Lu  <hongjiu.lu@intel.com>

    PR other/42670
    PR binutils/11137
    * cp-demangle.c (d_make_demangle_mangled_name): New.
    (d_demangle_callback): Use it on DCT_GLOBAL_XTORS.

    * testsuite/demangle-expected: Updated.

Modified:
    trunk/libiberty/ChangeLog
    trunk/libiberty/cp-demangle.c
    trunk/libiberty/testsuite/demangle-expected


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/11137] [3.3 Regression] Linux shared library constructors not called unless there's one global object
  2003-06-09 19:49 [Bug c++/11137] New: " jcalcote@novell.com
                   ` (3 preceding siblings ...)
  2003-07-01 18:15 ` mmitchel at gcc dot gnu dot org
@ 2003-08-12 14:14 ` cvs-commit at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-08-12 14:14 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11137



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-08-12 14:14 -------
Subject: Bug 11137

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_2-rhl8-branch
Changes by:	jakub@gcc.gnu.org	2003-08-12 14:14:49

Modified files:
	gcc            : ChangeLog 
	gcc/cp         : decl2.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/init: attrib1.C 

Log message:
	PR c++/11137
	* decl2.c (generate_ctor_or_dtor_function): Tolerate a
	non-existant ssdf_decls array.
	(finish_file): Call generator_ctor_or_dtor_function when there are
	static constructors or destructors and no other static
	initializations.
	
	PR c++/11137
	* g++.dg/init/attrib1.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.13152.2.657.2.27.2.155&r2=1.13152.2.657.2.27.2.156
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl2.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.520.2.7.2.3.2.7&r2=1.520.2.7.2.3.2.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.1672.2.166.2.8.2.64&r2=1.1672.2.166.2.8.2.65
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/attrib1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=NONE&r2=1.1.16.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/11137] [3.3 Regression] Linux shared library constructors not called unless there's one global object
  2003-06-09 19:49 [Bug c++/11137] New: " jcalcote@novell.com
                   ` (2 preceding siblings ...)
  2003-07-01 18:14 ` cvs-commit at gcc dot gnu dot org
@ 2003-07-01 18:15 ` mmitchel at gcc dot gnu dot org
  2003-08-12 14:14 ` cvs-commit at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-07-01 18:15 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11137


mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From mmitchel at gcc dot gnu dot org  2003-07-01 18:15 -------
Fixed in GCC 3.3.1.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/11137] [3.3 Regression] Linux shared library constructors not called unless there's one global object
  2003-06-09 19:49 [Bug c++/11137] New: " jcalcote@novell.com
  2003-06-10  1:24 ` [Bug c++/11137] [3.3 Regression] " pinskia@physics.uc.edu
  2003-06-29 15:58 ` pinskia at physics dot uc dot edu
@ 2003-07-01 18:14 ` cvs-commit at gcc dot gnu dot org
  2003-07-01 18:15 ` mmitchel at gcc dot gnu dot org
  2003-08-12 14:14 ` cvs-commit at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-07-01 18:14 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11137



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-07-01 18:14 -------
Subject: Bug 11137

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	mmitchel@gcc.gnu.org	2003-07-01 18:14:34

Modified files:
	gcc/cp         : ChangeLog decl2.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/init: attrib1.C 

Log message:
	PR c++/11137
	* decl2.c (generate_ctor_or_dtor_function): Tolerate a
	non-existant ssdf_decls array.
	(finish_file): Call generator_ctor_or_dtor_function when there are
	static constructors or destructors and no other static
	initializations.
	
	PR c++/11137
	* g++.dg/init/attrib1.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.3076.2.171&r2=1.3076.2.172
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl2.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.575.2.31&r2=1.575.2.32
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.211&r2=1.2261.2.212
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/attrib1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.8.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/11137] [3.3 Regression] Linux shared library constructors not called unless there's one global object
  2003-06-09 19:49 [Bug c++/11137] New: " jcalcote@novell.com
  2003-06-10  1:24 ` [Bug c++/11137] [3.3 Regression] " pinskia@physics.uc.edu
@ 2003-06-29 15:58 ` pinskia at physics dot uc dot edu
  2003-07-01 18:14 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-29 15:58 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11137



------- Additional Comments From pinskia at physics dot uc dot edu  2003-06-29 15:58 -------
I forgot to put the testcase I used:
pr11137.cc:
extern "C" int printf(const char*,...);
void f() __attribute__((constructor));
void f()
{
        printf("Hi\n");
}
pr11137.1.cc:
int main() {return 0;}

gcc -shared -o pr11137.so  pr11137.cc
gcc pr11137.1.cc pr11137.so
env LD_LIBRARY_PATH=.:${LD_LIBRARY_PATH} ./a.out

It should be print "Hi" but it does not on 3.3.1 (20030616) because gcc does not create a 
function which calls f() but 3.4 does.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/11137] [3.3 Regression] Linux shared library constructors not called unless there's one global object
  2003-06-09 19:49 [Bug c++/11137] New: " jcalcote@novell.com
@ 2003-06-10  1:24 ` pinskia@physics.uc.edu
  2003-06-29 15:58 ` pinskia at physics dot uc dot edu
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia@physics.uc.edu @ 2003-06-10  1:24 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11137


pinskia@physics.uc.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-06-10 01:24:28
               date|                            |
            Summary|Linux shared library        |[3.3 Regression] Linux
                   |constructors not called     |shared library constructors
                   |unless there's one global   |not called unless there's
                   |object                      |one global object
   Target Milestone|3.4                         |3.3.1


------- Additional Comments From pinskia@physics.uc.edu  2003-06-10 01:24 -------
I could reproduce this on 2.95.2, 3.0.4, 3.2.2, 3.2.3, and 3.3.1 (20030526) but it is fixed on 
the mainline (20030609) and it works on egcs-2.91.66, so this is a regression from that 
which is a very old but still a regression.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-11-16 17:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-11137-4@http.gcc.gnu.org/bugzilla/>
2010-11-16 17:57 ` [Bug c++/11137] [3.3 Regression] Linux shared library constructors not called unless there's one global object hjl at gcc dot gnu.org
2003-06-09 19:49 [Bug c++/11137] New: " jcalcote@novell.com
2003-06-10  1:24 ` [Bug c++/11137] [3.3 Regression] " pinskia@physics.uc.edu
2003-06-29 15:58 ` pinskia at physics dot uc dot edu
2003-07-01 18:14 ` cvs-commit at gcc dot gnu dot org
2003-07-01 18:15 ` mmitchel at gcc dot gnu dot org
2003-08-12 14:14 ` cvs-commit at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).