On 01/23/2013 10:56 AM, Marco van de Voort wrote:
Afaik the correct way is:

1. Avoid any explicit linking commands ($L/$linklib) to libc related files.
I understand that this is exactly what /rtl/unix/dl.pp does. (I only did it in a testing program to find out where the problem in the RTL is located.)
2. to force linking to libc, USES unit initc, it should contain a $linklib C,
    or whatever else. (linklib root on beos iirc). It also contains access to
    the threadsafe C errno.
Will rtl/unix/dl.pp be fixed according to this guidelines ? (unfortunately I don't think that I would be knowledgeable enough to do this.)

BTW.: I understand that the way of the fpc RTL is reducing the use of libc as far as possible and provide the functionality locally whenever possible. (This of course introduces more problems with supporting different processor flavors.) So, is it really necessary to use libc for dynamic linking ?
3. Anything else is up to the compiler t_* code that creates the linker script. 
This
    code should recognize the need for the switch from prt0 to cprt0
   (linkliblist contains "c"), and prepare everything that is needed.

Sorry. I can't follow here (I suppose this goes out to those that might be able to modify dl.pp or whatever appropriately).

Thanks,
-Michael

_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to