[fpc-devel] Re: Building the Android branch

Sven Barth pascaldragon at googlemail.com
Wed Dec 19 16:20:44 CET 2012


Am 18.12.2012 17:47, schrieb Thomas Schatzl:
> Looking through compiler/systems/t_android.pas, you may want to try 
> commmenting line 343, the one that adds info.Dynamiclinker to the 
> input files. Looks wrong. (system/bin/linker is passed to ld later as 
> --dynamic-linker option later anyway).

Ok... by removing the addition of the dynamic linker I can successfully 
compile and link the DLL, but when starting it I get an illegal 
instruction error... I have not yet tested whether this can be 
reproduced with an empty library as well.

=== logcat begin ===

I/lclapp  (  269): Trying to load liblclapp.so
D/dalvikvm(  269): Trying to load lib 
/data/data/com.pascal.lcltest/lib/liblclapp.so 0x45f3d248
I/DEBUG   (   31): *** *** *** *** *** *** *** *** *** *** *** *** *** 
*** *** ***
I/DEBUG   (   31): Build fingerprint: 
'generic/sdk/generic/:2.2/FRF91/43546:eng/test-keys'
I/DEBUG   (   31): pid: 269, tid: 269  >>> com.pascal.lcltest <<<
I/DEBUG   (   31): signal 4 (SIGILL), fault addr 810c9754
I/DEBUG   (   31):  r0 4395408c  r1 00000000  r2 bedbf670  r3 8144864c
I/DEBUG   (   31):  r4 00000038  r5 00000008  r6 b001037c  r7 00000000
I/DEBUG   (   31):  r8 80813b00  r9 0000ccb0  10 4208bc38  fp bedbf744
I/DEBUG   (   31):  ip 8144864c  sp bedbf668  lr 8114e29c  pc 810c9754  
cpsr 60000010
I/DEBUG   (   31):          #00  pc 000c9754 
/data/data/com.pascal.lcltest/lib/liblclapp.so
I/DEBUG   (   31):          #01  lr 8114e29c 
/data/data/com.pascal.lcltest/lib/liblclapp.so
I/DEBUG   (   31):
I/DEBUG   (   31): code around pc:
I/DEBUG   (   31): 810c9734 e1901f9f e2811001 e1802f91 e3520000
I/DEBUG   (   31): 810c9744 1afffffa e1a00001 e12fff1e e12fff1e
I/DEBUG   (   31): 810c9754 e1902f9f e1803f91 e3530000 1afffffb
I/DEBUG   (   31): 810c9764 e1a00002 e12fff1e e12fff1e e1902f9f
I/DEBUG   (   31): 810c9774 e081c002 e1803f9c e3530000 1afffffa
I/DEBUG   (   31):
I/DEBUG   (   31): code around lr:
I/DEBUG   (   31): 8114e27c e5810028 e59d0004 e5900028 ebfe5425
I/DEBUG   (   31): 8114e28c e59d0004 e280002c e3a01000 ebfded2d
I/DEBUG   (   31): 8114e29c e59d0004 e2800030 e3a01000 ebfded29
I/DEBUG   (   31): 8114e2ac e3a03000 e3a02000 e3a01001 e3a00000
I/DEBUG   (   31): 8114e2bc ebfe53d6 e59d1004 e581000c e59d0004
I/DEBUG   (   31):
I/DEBUG   (   31): stack:
I/DEBUG   (   31):     bedbf628  b001037c
I/DEBUG   (   31):     bedbf62c  00000000
I/DEBUG   (   31):     bedbf630  80813b00  /system/lib/libdvm.so
I/DEBUG   (   31):     bedbf634  810e225c 
/data/data/com.pascal.lcltest/lib/liblclapp.so
I/DEBUG   (   31):     bedbf638  80813b00  /system/lib/libdvm.so
I/DEBUG   (   31):     bedbf63c  bedbf650  [stack]
I/DEBUG   (   31):     bedbf640  00000008
I/DEBUG   (   31):     bedbf644  8136d958 
/data/data/com.pascal.lcltest/lib/liblclapp.so
I/DEBUG   (   31):     bedbf648  00000008
I/DEBUG   (   31):     bedbf64c  810dba2c 
/data/data/com.pascal.lcltest/lib/liblclapp.so
I/DEBUG   (   31):     bedbf650  43954060
I/DEBUG   (   31):     bedbf654  810db9ec 
/data/data/com.pascal.lcltest/lib/liblclapp.so
I/DEBUG   (   31):     bedbf658  00000038
I/DEBUG   (   31):     bedbf65c  810e3338 
/data/data/com.pascal.lcltest/lib/liblclapp.so
I/DEBUG   (   31):     bedbf660  b001037c
I/DEBUG   (   31):     bedbf664  8114e28c 
/data/data/com.pascal.lcltest/lib/liblclapp.so
I/DEBUG   (   31): #00 bedbf668  8136d958 
/data/data/com.pascal.lcltest/lib/liblclapp.so
I/DEBUG   (   31):     bedbf66c  43954060
I/DEBUG   (   31):     bedbf670  bedbf67c  [stack]
I/DEBUG   (   31):     bedbf674  00000000
I/DEBUG   (   31):     bedbf678  00000001
I/DEBUG   (   31):     bedbf67c  00000038
I/DEBUG   (   31):     bedbf680  00000008
I/DEBUG   (   31):     bedbf684  b001037c
I/DEBUG   (   31):     bedbf688  00000000
I/DEBUG   (   31):     bedbf68c  80813b00  /system/lib/libdvm.so
I/DEBUG   (   31):     bedbf690  0000ccb0  [heap]
I/DEBUG   (   31):     bedbf694  4208bc38
I/DEBUG   (   31):     bedbf698  bedbf744  [stack]
I/DEBUG   (   31):     bedbf69c  bedbf668  [stack]
I/DEBUG   (   31):     bedbf6a0  8114e25c 
/data/data/com.pascal.lcltest/lib/liblclapp.so
I/DEBUG   (   31):     bedbf6a4  00000000
I/DEBUG   (   31):     bedbf6a8  00000000
I/DEBUG   (   31):     bedbf6ac  afa00304  /system/lib/liblog.so
D/Zygote  (   33): Process 269 terminated by signal (4)
I/ActivityManager(   59): Process com.pascal.lcltest (pid 269) has died.

=== logcat end ===

Edit: Linking with debug information I could resolve the address to 
InterlockedExchange. Hmm... It seems that the SDK's QEMU does not 
emulate a ARMv6 device?

Regards,
Sven



More information about the fpc-devel mailing list