From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1544 invoked by alias); 3 Mar 2004 22:54:14 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 1478 invoked by alias); 3 Mar 2004 22:54:13 -0000 Date: Wed, 03 Mar 2004 22:54:00 -0000 Message-ID: <20040303225413.1477.qmail@sources.redhat.com> From: "dje at watson dot ibm dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040127083113.13878.joerg.richter@pdv-fs.de> References: <20040127083113.13878.joerg.richter@pdv-fs.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/13878] Uncaught exception on AIX with shared libraries X-Bugzilla-Reason: CC X-SW-Source: 2004-03/txt/msg00515.txt.bz2 List-Id: ------- 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