[Top][All Lists]

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

Re: [Tinycc-devel] PIC code

From: fabrice . bellard
Subject: Re: [Tinycc-devel] PIC code
Date: Thu, 24 Oct 2002 11:42:05 +0200 (CEST)
User-agent: IMP/PHP IMAP webmail program 2.2.6

Quoting Basile STARYNKEVITCH <address@hidden>:

> A few questions on TCC
> does the -shared flag produce a position independent code (=PIC)
> shared
> library (*.so) or not?

TCC does not generate PIC code, although this feature could be easily added (TCC
does not use the ebx register!). If it is really critical for you I can look at
 it for the 0.9.14 release.

> Is it possible to compile to an object file .o with PIC code, so that
> the generated object could be linked [with other PIC object files] (by
> ld -shared) to produce a PIC *.so?

No, although the reverse may be possible (creating PIC objects with gcc and
linking them with TCC built-in linker).

> I also know that non-PIC .so are doable, but requires lot of
> relocation at dynamic loading time.

When speed of the code is critical, non-PIC .so are an interesting option. I am
surprised that no one uses them.


reply via email to

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