From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24254 invoked by alias); 10 Sep 2008 06:46:07 -0000 Received: (qmail 23847 invoked by uid 48); 10 Sep 2008 06:44:48 -0000 Date: Wed, 10 Sep 2008 06:46:00 -0000 Subject: [Bug c/37454] New: gcc: unrecognized option '-rdynamic' X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "YLitvinenko at astana dot oilfield dot slb dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-09/txt/msg01190.txt.bz2 gcc doesn't know -rdynamic option >>From gcc-4.3.1 man page -rdynamic Pass the flag -export-dynamic to the ELF linker, on targets that support it. This instructs the linker to add all symbols, not only used ones, to the dynamic symbol table. This option is needed for some uses of "dlopen" or to allow obtaining backtraces from within a program. >>From ld 2.18 man page --export-dynamic When creating a dynamically linked executable, add all symbols to the dynamic symbol table. The dynamic symbol table is the set of symbols which are visible from dynamic objects at run time. So I believe that gcc should know "-rdynamic" My fix was to add the following line to the #define LINK_SPEC in the file gcc-4.3.1/gcc/config/sol2.h at line 145: %{rdynamic:--export-dynamic} \ OS and tools SunOS solaris 5.11 snv_95 i86pc i386 i86pc Solaris gcc (GCC) 4.3.1 ld (GNU Binutils) 2.18 -- Summary: gcc: unrecognized option '-rdynamic' Product: gcc Version: 4.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: YLitvinenko at astana dot oilfield dot slb dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37454