[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -export-* usage when linking program

From: Daniel Sands
Subject: Re: -export-* usage when linking program
Date: Mon, 25 Feb 2008 14:55:54 -0700
User-agent: Thunderbird (X11/20080131)

I've looked through that part of Libtool due to AIX issues and discovered that export-symbols and its counterpart are not used for linking programs at all. Only for libraries.

I don't know if this is intended behavior, but it is the way libtool does things, even with 2.1

Hi all,

I'm running libtool 1.5.24 on linux (binutils 2.18) in link mode to link C program with plugins. And I want to use -export-symbols to export plugin API to plugins via standard linker without reinventing dynamic linker (e.g. pass plugin some structure full of pointers to functions).

When I pass -export-dynamic to libtool, then all symbols are exported from main binary and my plugin using that symbols can be loaded via dlopen() and it works fine, but exporting all symbols is a bit ugly.

When I pass -export-symbols or -export-symbols-regex to link main binary - these options are _silently_ ignored, symbols are not exported and plugin fails to load. :)

I've tested my ld and found that it supports option --dynamic-list, that can be used to implement -export-symbols.

So my questions are:

1.   is it right behavior or is it libtool bug?
1.a  silent ignorance of option
1.b  working -export-dynamic while linking program
1.c  not working -export-symbols while linking program

2.   what platforms support -export-symbols option?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]