[fpc-pascal] program interpreter for arm eabi is wrong

Terry Kemp tkemp at klc.net.nz
Thu Apr 16 23:35:19 CEST 2009


I can't seem to find the secret sauce that gives me program interpreter
= ld-linux.so.3 for my arm eabi prgrams so I am having to
symlink /lib/ld-linux.so.2 to /lib/ld-linux.so.3 on my gumstix.

It used to work for me with the FPC_ARMEL ifdef in tlinux.pas 
{$ifdef arm}
{$ifdef FPC_ARMEL}
     defdynlinker:='/lib/ld-linux.so.3';
{$else FPC_ARMEL}
     defdynlinker:='/lib/ld-linux.so.2';
{$endif FPC_ARMEL}
{$endif arm}

but not it seems any more.
Any clues as to what is overriding this?

thanks

Terry


toolchain is..
arm-angstrom-linux-gnueabi-

fpc-svn arm eabi built with...

make clean crosszipinstall CPU_TARGET=arm CROSSOPT='-CaEABI -dFPC_ARMEL
-dFPC_ABI_EABI -CfSOFT -gl -O-' FPC=ppcx64-2.2.2
cd ./utils/fppkg
make clean all CPU_TARGET=arm CROSSOPT='-CaEABI -dFPC_ARMEL
-dFPC_ABI_EABI -CfSOFT -gl -O-' FPC=../../compiler/ppcrossarm 
cd ../../
make crosszipinstall CPU_TARGET=arm CROSSOPT='-CaEABI -dFPC_ARMEL
-dFPC_ABI_EABI -CfSOFT -gl -O-' FPC=ppcx64-2.2.2

(I don't usually use the -CaEABI -dFPC_ABI_EABI and -FD options but I'm
covering all bases here) 

compile command...
ppcrossarm-2.3.1 -a -B -Xd -MObjFPC -darm231qt -dUSE_QT_44 -dQTOPIA
-CfSOFT -dFPC_ARMEL -dFPC_ABI_EABI -O- -Fl~/bin/Qt-arm -CaEABI
-FD/build/gumstix/gumstix-oe/tmp/cross/arm-angstrom-linux-gnueabi/bin
-gl dbtest.lpr

file dbtest: ELF 32-bit LSB executable, ARM, version 1 (SYSV),
dynamically linked (uses shared libs), not stripped

couple of bits of info from readelf...
readelf -a dbtest | less

<snip>
Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg
Align
  PHDR           0x000034 0x00008034 0x00008034 0x000c0 0x000c0 R E 0x4
  INTERP         0x0000f4 0x000080f4 0x000080f4 0x00013 0x00013 R   0x1

      [Requesting program interpreter: /lib/ld-linux.so.2]

  LOAD           0x000000 0x00008000 0x00008000 0x32f3cc 0x32f3cc R E
0x8000
  LOAD           0x32f3cc 0x0033f3cc 0x0033f3cc 0x0fc00 0x25a74 RW
0x8000
  DYNAMIC        0x32f3cc 0x0033f3cc 0x0033f3cc 0x000d0 0x000d0 RW  0x4
  GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x4

Section to Segment mapping:
  Segment Sections...
   00     
   01     .interp 

02     .interp .hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.plt .plt .text .rodata 
   03     .dynamic .got .data .bss 
   04     .dynamic 
-----------------------
-----------------------
Version needs section '.gnu.version_r' contains 2 entries:
Addr: 0x000000000001487c  Offset: 0x00c87c  Link: 4 (.dynstr)
  000000: Version: 1  File: libdl.so.2  Cnt: 1
  0x0010:   Name: GLIBC_2.4  Flags: none  Version: 3
  0x0020: Version: 1  File: libc.so.6  Cnt: 1
  0x0030:   Name: GLIBC_2.4  Flags: none  Version: 2
Attribute Section: aeabi
File Attributes
  Tag_CPU_arch: v5TE
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-1
</snip>





More information about the fpc-pascal mailing list