Re: [fpc-pascal] Linking error with unit initc on arm

2015-08-22 Thread Martin Schreiber
On Saturday 22 August 2015 10:25:19 Jonas Maebe wrote: > Martin Schreiber wrote: > > Looks the same with > > > > Linux X86 cross: 2.24.0.20141017 > > from binutils-2_24-branch. > > Try > * generating linker maps (ppcarm -Xm) for both binaries and comparing them > * running "readelf -aW" on both bin

Re: [fpc-pascal] Linking error with unit initc on arm

2015-08-22 Thread Jonas Maebe
Martin Schreiber wrote: Looks the same with Linux X86 cross: 2.24.0.20141017 from binutils-2_24-branch. Try * generating linker maps (ppcarm -Xm) for both binaries and comparing them * running "readelf -aW" on both binaries and compare the output * runrunning "objdump -DR" on both binaries and

Re: [fpc-pascal] Linking error with unit initc on arm

2015-08-21 Thread Martin Schreiber
On Friday 21 August 2015 15:25:56 Martin Schreiber wrote: > On Friday 21 August 2015 15:04:23 Jonas Maebe wrote: > > Does it have the same version of binutils as you use to cross-compile? > > No. > Linux X86 cross: 2.25.51 > Linux arm eabihf Raspberry Pi: 2.24.51 > Looks the same with Linux X86 c

Re: [fpc-pascal] Linking error with unit initc on arm

2015-08-21 Thread Martin Schreiber
On Friday 21 August 2015 15:04:23 Jonas Maebe wrote: > > Does it have the same version of binutils as you use to cross-compile? > No. Linux X86 cross: 2.25.51 Linux arm eabihf Raspberry Pi: 2.24.51 Martin ___ fpc-pascal maillist - fpc-pascal@lists.free

Re: [fpc-pascal] Linking error with unit initc on arm

2015-08-21 Thread Jonas Maebe
On 21/08/15 14:51, Martin Schreiber wrote: > On Friday 21 August 2015 14:23:40 Jonas Maebe wrote: > >> Does it work if you compile natively >> on the system? >> > Yes. Does it have the same version of binutils as you use to cross-compile? Jonas ___ fp

Re: [fpc-pascal] Linking error with unit initc on arm

2015-08-21 Thread Martin Schreiber
On Friday 21 August 2015 14:23:40 Jonas Maebe wrote: > > Are their multiple copies of those .o files on the target system, No. > and did you perhaps copy a wrong one? I don't think so. > Does it work if you compile natively > on the system? > Yes. Martin _

Re: [fpc-pascal] Linking error with unit initc on arm

2015-08-21 Thread Jonas Maebe
On 21/08/15 14:21, Martin Schreiber wrote: > On Friday 21 August 2015 14:13:06 Jonas Maebe wrote: >> On 21/08/15 14:03, Martin Schreiber wrote: >>> I got linking working without xlib in uses by copying the necessary >>> *.o's, but now the application crashes when remote gdb tries to set a >>> break

Re: [fpc-pascal] Linking error with unit initc on arm

2015-08-21 Thread Martin Schreiber
On Friday 21 August 2015 14:13:06 Jonas Maebe wrote: > On 21/08/15 14:03, Martin Schreiber wrote: > > On Friday 21 August 2015 12:56:36 Jonas Maebe wrote: > >> That's because the compiler warned that it could not find those files, > >> so it didn't tell the linker to link against them either. You n

Re: [fpc-pascal] Linking error with unit initc on arm

2015-08-21 Thread Jonas Maebe
On 21/08/15 14:03, Martin Schreiber wrote: > On Friday 21 August 2015 12:56:36 Jonas Maebe wrote: >> That's because the compiler warned that it could not find those files, >> so it didn't tell the linker to link against them either. You need the >> armhf sysroot for that and tell the compiler where

Re: [fpc-pascal] Linking error with unit initc on arm

2015-08-21 Thread Martin Schreiber
On Friday 21 August 2015 12:56:36 Jonas Maebe wrote: > On 21/08/15 12:47, Martin Schreiber wrote: > > The missing "_fini" and "_init" symbols from rtl/linux/arm/cprt0.as which > > cause the linking error are defined in one of the crt*.o files? > > Yes. > > > The linker > > does not try to load crt*

Re: [fpc-pascal] Linking error with unit initc on arm

2015-08-21 Thread Jonas Maebe
On 21/08/15 12:47, Martin Schreiber wrote: > The missing "_fini" and "_init" symbols from rtl/linux/arm/cprt0.as which > cause the linking error are defined in one of the crt*.o files? Yes. > The linker > does not try to load crt*.o files: That's because the compiler warned that it could not f

Re: [fpc-pascal] Linking error with unit initc on arm

2015-08-21 Thread Martin Schreiber
On Friday 21 August 2015 11:55:49 Jonas Maebe wrote: [...] > As mentioned in the "Issue with linking" thread, you will have to > separately tell FPC where to find crtbegin.o and crtend.o, as their > location depends on the GCC version used. Since the sysroot path (-XR > parameter) should be prepend

Re: [fpc-pascal] Linking error with unit initc on arm

2015-08-21 Thread Michael Schnell
On 08/21/2015 11:55 AM, Jonas Maebe wrote: To be able to cross-compile a program that depends on a library for any Unix platform, you need to have a sysroot available with all of those libraries and their own requirements (such as crti.o and crtn.o for glibc, and crtbegin.o and crtend.o for g

Re: [fpc-pascal] Linking error with unit initc on arm

2015-08-21 Thread Jonas Maebe
Martin Schreiber wrote on Fri, 21 Aug 2015: Cross compiling Linux-x86->eabihf of the program: " program rpiconsole; uses initc; begin end. " produces the messages: " Free Pascal Compiler version 3.0.1 [2015/08/14] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others Target OS: Linux

[fpc-pascal] Linking error with unit initc on arm

2015-08-21 Thread Martin Schreiber
Hi, Cross compiling Linux-x86->eabihf of the program: " program rpiconsole; uses initc; begin end. " produces the messages: " Free Pascal Compiler version 3.0.1 [2015/08/14] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others Target OS: Linux for ARMHF Compiling rpiconsole.pas Assemblin