public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Basile STARYNKEVITCH <basile@starynkevitch.net>
To: Basile Starynkevitch <basile@starynkevitch.net>, gcc@gcc.gnu.org
Subject: Re: libiberty should be a shared library when cc1 has plugin  enabled.
Date: Thu, 09 Jul 2009 13:01:00 -0000	[thread overview]
Message-ID: <4A55EA0D.2080509@starynkevitch.net> (raw)
In-Reply-To: <20090709125004.GA4445@caradoc.them.org>

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	other threads:[~2009-07-09 13:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-09  8:49 Basile Starynkevitch
2009-07-09 11:41 ` Dave Korn
2009-07-09 11:58   ` Basile STARYNKEVITCH
2009-07-09 12:17     ` Dave Korn
2009-07-09 12:38       ` Basile STARYNKEVITCH
2009-07-09 12:50 ` Daniel Jacobowitz
2009-07-09 13:01   ` Basile STARYNKEVITCH [this message]
2009-07-09 13:43     ` Daniel Jacobowitz
2009-07-09 13:46       ` Basile STARYNKEVITCH
2009-07-09 13:59         ` Daniel Jacobowitz
2009-07-09 14:06           ` Basile STARYNKEVITCH
2009-07-09 15:07       ` Ralf Wildenhues
2009-07-09 15:20         ` Basile STARYNKEVITCH
2009-07-09 13:07   ` Ralf Wildenhues

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A55EA0D.2080509@starynkevitch.net \
    --to=basile@starynkevitch.net \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).