Daniel Jacobowitz wrote:
On Thu, Jul 09, 2009 at 10:49:49AM +0200, Basile Starynkevitch wrote:
But it seems to me that a plugin can call a libliberty function only if that
function is already referenced (e.g. called) from cc1. This is not the case
of all libiberty functions.

So... link libiberty into your plugin and get make_temp_file that way.

As far as I understand ELF shared objects, it is not recommended to link a static library into a dynamic plugin (i.e. an ELF shared object), because the static library is not compiled with -fPIC. (if you do that, the resulting plugin is getting a huge lot of relocation information). In simpler words, *.so have to be compiled with -fPIC, and libiberty is not compiled with -fPIC.

I am clear enough or should I explain more?

Regards.

--
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***

Reply via email to