[fpc-pascal] ARM Linux crosscompiler: compiles but... executable gives segmentation fault
Reinier Olislagers
reinierolislagers at gmail.com
Fri Jan 10 15:44:30 CET 2014
On 10/01/2014 14:29, Pierre Free Pascal wrote:
>> Am 10.01.14 13:27, schrieb Reinier Olislagers:
>>> a segmentation fault. Running under gdb gives
>>> (gdb) run
>>> Starting program: /root/simple
>>>
>>> Program received signal SIGSEGV, Segmentation fault.
>>> 0x0002b6e4 in
>>> SYSTEM_$$_ARRAYSTRINGTOPPCHAR$array_of_ANSISTRING$LONGINT$$PPCHAR ()
>
> Maybe it is just using an unsupported instruction?
>
> what does "x /10i $pc" return?
(gdb) run
Starting program: /root/simple
Program received signal SIGSEGV, Segmentation fault.
0x0002b6e4 in
SYSTEM_$$_ARRAYSTRINGTOPPCHAR$array_of_ANSISTRING$LONGINT$$PPCHAR ()
(gdb) bt
#0 0x0002b6e4 in
SYSTEM_$$_ARRAYSTRINGTOPPCHAR$array_of_ANSISTRING$LONGINT$$PPCHAR ()
#1 0x00008124 in _start ()
(gdb) x /10i $pc
=> 0x2b6e4
<SYSTEM_$$_ARRAYSTRINGTOPPCHAR$array_of_ANSISTRING$LONGINT$$PPCHAR+168>:
str r0, [r2, r1]
0x2b6e8
<SYSTEM_$$_ARRAYSTRINGTOPPCHAR$array_of_ANSISTRING$LONGINT$$PPCHAR+172>:
ldr r7, [r11, #-48] ; 0x30
0x2b6ec
<SYSTEM_$$_ARRAYSTRINGTOPPCHAR$array_of_ANSISTRING$LONGINT$$PPCHAR+176>:
mov r0, r7
0x2b6f0
<SYSTEM_$$_ARRAYSTRINGTOPPCHAR$array_of_ANSISTRING$LONGINT$$PPCHAR+180>:
ldmdb r11, {r4, r5, r6, r7, r8, r9, r11, sp, pc}
0x2b6f4
<SYSTEM_$$_ARRAYSTRINGTOPPCHAR$array_of_ANSISTRING$LONGINT$$PPCHAR+184>:
andeq r7, r1, r4, lsr #23
0x2b6f8
<SYSTEM_$$_ARRAYSTRINGTOPPCHAR$array_of_ANSISTRING$LONGINT$$PPCHAR+188>:
andeq r0, r0, r0, ror #4
0x2b6fc <SYSTEM_$$_STRINGTOPPCHAR$ANSISTRING$SMALLINT$$PPCHAR>:
push {r4, lr}
0x2b700 <SYSTEM_$$_STRINGTOPPCHAR$ANSISTRING$SMALLINT$$PPCHAR+4>:
ldr r4, [pc, #24] ; 0x2b720
<SYSTEM_$$_STRINGTOPPCHAR$ANSISTRING$SMALLINT$$PPCHAR+36>
0x2b704 <SYSTEM_$$_STRINGTOPPCHAR$ANSISTRING$SMALLINT$$PPCHAR+8>:
add r4, pc, r4
0x2b708 <SYSTEM_$$_STRINGTOPPCHAR$ANSISTRING$SMALLINT$$PPCHAR+12>:
ldr r0, [r0]
More information about the fpc-pascal
mailing list