Thread: Linux and -export-dynamic

Linux and -export-dynamic

From
Bruce Momjian
Date:
Can someone on Linux check to see of -export-dynamic and -Bdynamic do
the same thing?

Thanks.

--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026


Re: [HACKERS] Linux and -export-dynamic

From
Bruce Momjian
Date:
> Can someone on Linux check to see of -export-dynamic and -Bdynamic do
> the same thing?
>
> Thanks.

I am also interested if -Bdynamic is the same as -export-dynamic.

--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026


Re: [HACKERS] Linux and -export-dynamic

From
Tatsuo Ishii
Date:
>> Can someone on Linux check to see of -export-dynamic and -Bdynamic do
>> the same thing?

I think they are different. From the man page of ld:

-export-dynamic
            When creating an ELF file, add all symbols  to  the
            dynamic symbol table.  Normally, the dynamic symbol
            table contains only symbols which are used by a dy-
            namic  object.  This option is needed for some uses
            of dlopen.

-Bdynamic
            Link against dynamic libraries.  This is only mean-
            ingful  on platforms for which shared libraries are
            supported.  This option is normally the default  on
            such platforms.
--
Tatsuo Ishii
t-ishii@sra.co.jp

Re: [HACKERS] Linux and -export-dynamic

From
Bruce Momjian
Date:
> >> Can someone on Linux check to see of -export-dynamic and -Bdynamic do
> >> the same thing?
>
> I think they are different. From the man page of ld:
>
> -export-dynamic
>             When creating an ELF file, add all symbols  to  the
>             dynamic symbol table.  Normally, the dynamic symbol
>             table contains only symbols which are used by a dy-
>             namic  object.  This option is needed for some uses
>             of dlopen.
>
> -Bdynamic
>             Link against dynamic libraries.  This is only mean-
>             ingful  on platforms for which shared libraries are
>             supported.  This option is normally the default  on
>             such platforms.

I figured that out as I read some more.  Thanks.  BSDI mentions
-rdynamic for such uses, but seems to understand -export-dyanamic too,
so I am using that.

--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026