[fpc-devel] shared libraries on x86_64 Linux ?

Florian Klaempfl florian at freepascal.org
Wed May 24 19:37:36 CEST 2006


Dominique Leducq wrote:
> 
>> -----Message d'origine-----
>> De : Florian Klaempfl [mailto:florian at freepascal.org]
>> Envoyé : lundi 22 mai 2006 19:56
>> À : dleducq at magellan-ing.fr; FPC developers' list
>> Objet : Re: [fpc-devel] shared libraries on x86_64 Linux ?
>>
>> Dominique Leducq wrote:
>>> Hello,
>>>
>>> I'm new to this list (and to Free Pascal...)
>>>
>>> What are the news from bug #6618 (ex 4733), on building shared libraries
>> on a x86_64 architecture?
>>> http://www.freepascal.org/mantis/view.php?id=6618
>>>
>>> I did some tests, and it seems to bee still present in 2.0.2 and current
>> 2.1.1 snapshot (I encountered no problems with i386).
>>> In the BTS I see that the status is still new,open, and there seems to
>> have been no activity on this bug since its submission.
>>> I also had a look at the thread "Hitting bug 4733" on this list
>>> http://lists.freepascal.org/lists/fpc-devel/2006-April/007514.html
>>> and to
>> http://community.freepascal.org:10000/bboards/message?message_id=152498&fo
>> rum_id=24083
>>> in the forums (AMD64 shared library link problem)
>>>
>>> Has anybody had a look at it?
>>> If yes, does it seem to be hard to fix?
>> The problem is that we don't want to compile the default rtl with PIC.
>>
>>> Is it the PIC generation that is broken for x86_64?
>> Afaik not.
>>
>>> Please tell me if there are any plans on the matter. I'm quite willing
>> to help, but would appreciate a little help...
>>
>> You simply need to rebuild the rtl with PIC.
> [Dominique Leducq] 
> 
> Well, I already tried that with 2.0.2 : make rtl "OPT=-Cg" (is that right ?), but it didn't work 
> (yes, I checked that the right system unit was used by the linker)
> I will try again with 2.1.1

I guess it doesn't work completely in 2.0.3

> 
> I had nothing to recompile to make it work with i386 linux: is the default RTL compiled with PIC for i386? 

No, PIC isn't necessary for i386 shared libs. In theory, they aren't
necessary for x86_64 shared libs either but the linux loader/linker
can't handle this.

> If so, why not for x86_64? I know that there are performances losses with PIC, 
> but I thought that this losses where lessened with x86_64 arch?
>>> Thanks a lot,
>>>
>>> Dominique Leducq
>>>
>>>
>>>
>>> _______________________________________________
>>> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
>>> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>>>
> 
> 
> 
> 
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
> 




More information about the fpc-devel mailing list