This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13878] Uncaught exception on AIX with shared libraries
- From: "dje at watson dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Mar 2004 22:54:13 -0000
- Subject: [Bug c++/13878] Uncaught exception on AIX with shared libraries
- References: <20040127083113.13878.joerg.richter@pdv-fs.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dje at watson dot ibm dot com 2004-03-03 22:54 -------
Subject: Re: Uncaught exception on AIX with shared libraries
Can you try the appended patch that disables exporting _GLOBAL_*
symbols in AIX shared libraries?
Thanks, David
Index: collect2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/collect2.c,v
retrieving revision 1.160
diff -c -p -r1.160 collect2.c
*** collect2.c 21 Jan 2004 20:39:52 -0000 1.160
--- collect2.c 3 Mar 2004 22:38:31 -0000
*************** main (int argc, char **argv)
*** 1398,1407 ****
--- 1398,1409 ----
if (! exports.first)
*ld2++ = concat ("-bE:", export_file, NULL);
+ #ifndef LD_INIT_SWITCH
add_to_list (&exports, initname);
add_to_list (&exports, fininame);
add_to_list (&exports, "_GLOBAL__DI");
add_to_list (&exports, "_GLOBAL__DD");
+ #endif
exportf = fopen (export_file, "w");
if (exportf == (FILE *) 0)
fatal_perror ("fopen %s", export_file);
*************** scan_prog_file (const char *prog_name, e
*** 2720,2726 ****
if (! is_shared)
add_to_list (&constructors, name);
#ifdef COLLECT_EXPORT_LIST
! if (which_pass == PASS_OBJ)
add_to_list (&exports, name);
#endif
break;
--- 2722,2728 ----
if (! is_shared)
add_to_list (&constructors, name);
#ifdef COLLECT_EXPORT_LIST
! if (!shared_obj && which_pass == PASS_OBJ)
add_to_list (&exports, name);
#endif
break;
*************** scan_prog_file (const char *prog_name, e
*** 2729,2735 ****
if (! is_shared)
add_to_list (&destructors, name);
#ifdef COLLECT_EXPORT_LIST
! if (which_pass == PASS_OBJ)
add_to_list (&exports, name);
#endif
break;
--- 2731,2737 ----
if (! is_shared)
add_to_list (&destructors, name);
#ifdef COLLECT_EXPORT_LIST
! if (!shared_obj && which_pass == PASS_OBJ)
add_to_list (&exports, name);
#endif
break;
*************** scan_prog_file (const char *prog_name, e
*** 2754,2760 ****
if (! is_shared)
add_to_list (&frame_tables, name);
#ifdef COLLECT_EXPORT_LIST
! if (which_pass == PASS_OBJ)
add_to_list (&exports, name);
#endif
break;
--- 2756,2762 ----
if (! is_shared)
add_to_list (&frame_tables, name);
#ifdef COLLECT_EXPORT_LIST
! if (!shared_obj && which_pass == PASS_OBJ)
add_to_list (&exports, name);
#endif
break;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13878