[fpc-pascal] fpc on Armel issues

Nataraj S Narayan natarajsn at gmail.com
Tue Aug 25 14:16:47 CEST 2009


Hi

Fpc compiled binary:-
root at at91sam9263ek:~$ readelf -h firework
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x8f1c
  Start of program headers:          52 (bytes into file)
  Start of section headers:          257344 (bytes into file)
  Flags:                             0x5000002, has entry point, Version5 EABI
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         6
  Size of section headers:           40 (bytes)
  Number of section headers:         34
  Section header string table index: 31

Other Binary:-
root at at91sam9263ek:~$ readelf -h formshow
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0xab64
  Start of program headers:          52 (bytes into file)
  Start of section headers:          21324 (bytes into file)
  Flags:                             0x4000002, has entry point, Version4 EABI
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         8
  Size of section headers:           40 (bytes)
  Number of section headers:         37
  Section header string table index: 34

Could it be that arm-linux is not ready for Version5 EABI?

regards

Nataraj



On Tue, Aug 25, 2009 at 5:40 PM, Jonas Maebe<jonas.maebe at elis.ugent.be> wrote:
>
> On 25 Aug 2009, at 13:44, Nataraj S Narayan wrote:
>
>> Tried all the tricks.
>>
>> chmod +x firework
>>
>> sh firework
>> firework: firework: 1: Syntax error: word unexpect
>
> That is normal, because as mentioned before firework is not a shell script.
> The above command tells sh to try to read the compiled program as a shell
> script. That can never work.
>
>> ./firework
>> -sh: ./firework: not found
>> ed (expecting ")")
>
> Which version of binutils are you using for cross-compiling and how were
> they compiled?
>
> Can you also show the output of "readelf -h" for both an FPC-compiled binary
> and another one?
>
>
> Jonas
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>



More information about the fpc-pascal mailing list