public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/37454]  New: gcc: unrecognized option '-rdynamic'
@ 2008-09-10  6:46 YLitvinenko at astana dot oilfield dot slb dot com
  2008-09-13 13:05 ` [Bug c/37454] " rguenth at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: YLitvinenko at astana dot oilfield dot slb dot com @ 2008-09-10  6:46 UTC (permalink / raw)
  To: gcc-bugs

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


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

end of thread, other threads:[~2010-04-28 20:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-10  6:46 [Bug c/37454] New: gcc: unrecognized option '-rdynamic' YLitvinenko at astana dot oilfield dot slb dot com
2008-09-13 13:05 ` [Bug c/37454] " rguenth at gcc dot gnu dot org
2008-09-14  4:45 ` [Bug target/37454] " pinskia at gcc dot gnu dot org
2008-09-14  7:07 ` pluto at agmk dot net
2010-01-08 21:55 ` sje at gcc dot gnu dot org
2010-01-10 20:23 ` sje at gcc dot gnu dot org
2010-04-28 20:32 ` ro at gcc dot gnu dot org
2010-04-28 20:34 ` ro at gcc dot gnu dot org
2010-04-28 20:52 ` pluto at agmk dot net

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).