Hi, I have downloaded FPC 2.0.0 for ARM and installed. I have compiling a project in pascal with socket. To compile the program I need to use Xc switch ("pass --shared to the linker (Unix only)"). but when I run the executable program I receive a segmentation fault!
If I don't use Xc switch I have problem in link stage: ------------------------------------------------------------------------ ------------------ /usr/local/lib/fpc/2.0.0/units/arm-linux/rtl/cprt0.o(.text+0x64): In function `_haltproc': : undefined reference to `_fini' /usr/local/lib/fpc/2.0.0/units/arm-linux/rtl/cprt0.o(.text+0x6c): In function `_haltproc': : undefined reference to `_init' ------------------------------------------------------------------------ ------------------ I'm crosscompiling the program host x86 target arm. What is the problem with _fini and _init? (I suppose is due that libc is dynamic library?) But If I use Xc ("pass --shared") I receive a segmentation fault. Using gdb I receive ------------------------------------------------------------------------ ------------------ Program received signal SIGSEGV, Segmentation fault. 0x2a042c2c in _start () ------------------------------------------------------------------------ ------------------ It seems like linker has link my program with libc in a wrong way? tia! best regards _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal