Dominique Leducq a écrit :
Hi,

I have linking problems when cross-compiling from win32 to i386-linux and linking with libc (dynamically). I use FPC 2.0.2, the libs are from a Debian Sarge (glibc-2.3.6, I tried with glibc 2.3.2 with same results),
cross ld is :
ld.exe -V
GNU ld version 2.15
  Supported emulations:
   elf_i386
   i386linux


OK, I solved this by replacing 2.15 cross-binutils by 2.17

I get the following errors :
fpc -Mdelphi -Tlinux test.pas -Fl'c:\FPC\2.0.2\lib\i386-linux'
Free Pascal Compiler version 2.0.2 [2005/11/26] for i386
Copyright (c) 1993-2005 by Florian Klaempfl
Target OS: Linux for i386
Compiling test.pas
Linking test
C:\FPC\2.0.2\lib\i386-linux\/libdl.so: undefined reference to [EMAIL PROTECTED]' C:\FPC\2.0.2\lib\i386-linux\/libc.so: undefined reference to [EMAIL PROTECTED]' C:\FPC\2.0.2\lib\i386-linux\/libc.so: undefined reference to [EMAIL PROTECTED]' C:\FPC\2.0.2\lib\i386-linux\/libdl.so: undefined reference to [EMAIL PROTECTED]' C:\FPC\2.0.2\lib\i386-linux\/libc.so: undefined reference to [EMAIL PROTECTED]' C:\FPC\2.0.2\lib\i386-linux\/libc.so: undefined reference to [EMAIL PROTECTED]' C:\FPC\2.0.2\lib\i386-linux\/libc.so: undefined reference to [EMAIL PROTECTED]' C:\FPC\2.0.2\lib\i386-linux\/libc.so: undefined reference to [EMAIL PROTECTED]' C:\FPC\2.0.2\lib\i386-linux\/libdl.so: undefined reference to [EMAIL PROTECTED]'
testthreads.pas(37,1) Error: Error while linking
Error: c:\FPC\2.0.2\bin\i386-Win32\ppc386.exe returned an error exitcode (normal if you did not specify a source file to be compiled)


while

 nm -D ld-linux.so.2
0000e6a0 T ___tls_get_addr
00015f1c D __libc_enable_secure
000101b0 W __libc_memalign
00015f18 D __libc_stack_end
0000de70 T __tls_get_addr
0000e610 T _dl_allocate_tls
0000e3f0 T _dl_allocate_tls_init
00015e8c D _dl_argv
0000e640 T _dl_deallocate_tls
0000c450 T _dl_debug_state
0000e330 T _dl_get_tls_static_info
0000ec60 T _dl_make_stack_executable
0000db30 T _dl_mcount
00012258 R _dl_out_of_memory
00006840 T _dl_rtld_di_serinfo
0000e1f0 T _dl_tls_setup
000164e4 B _r_debug
00016020 D _rtld_global
00015cc0 D _rtld_global_ro
000103d0 W calloc
0000fda0 W free
00000000 A GLIBC_2.0
00000000 A GLIBC_2.1
00000000 A GLIBC_2.3
00000000 A GLIBC_PRIVATE
000102f0 W malloc
00010320 W realloc

the difference in the symbols is only the '@GLIBC...' part.
I have no problem linking the same code on Linux, on the very same system the libs came from.

I can link statically ( with -Xt), however.

Dominique.


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to