public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: meena <ashagow@gmail.com>
To: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] Need help in cross compiling LTP for android
Date: Thu, 29 May 2014 11:21:27 +0000 (UTC)	[thread overview]
Message-ID: <loom.20140529T131657-599@post.gmane.org> (raw)
In-Reply-To: 20120502120742.GB366@saboteur.suse.cz


Thanks,
Cyril Hrubis <chrubis@...> writes:

> 
> Hi!
> > +
> /u/ltp/android-ndk-r7b/toolchains/arm-linux-androideabi-
4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc
> -march=armv7-a -mtune=xscale -msoft-float -fpic -mthumb-interwork -
ffunction-sections
> -funwind-tables -fstack-protector -fno-short-enums -O2 -fomit-frame-
pointer -funswitch-loops
> -finline-limit=300 -g -O2 -fno-strict-aliasing -pipe -Wall
> -I/u/ltp/android-ndk-r7b/platforms/android-14/arch-arm/usr/include -
D__ARM_ARCH_7__
> -D__ARM_ARCH_7A__ -D__ARM_ARCH_7R__ -D__ARM_ARCH_7M__ -DANDROID -
D__linux__ -DDEV_BSIZE=512
> -DSIGCLD=SIGCHLD -D_FILE_OFFSET_BITS=64 -I/u/ltp/ltp-full-
20120104/testcases/kernel/include
> -D_GNU_SOURCE -I/u/ltp/ltp-full-
20120104/testcases/kernel/timers/clock_gettime/../include
> -I../../../../include -I../../../../include -nostdlib -Bdynamic -Wl,-
dynamic-linker,/syst
>  em/bin/linker -Wl,--gc-sections -Wl,-z,nocopyreloc
> -L/u/ltp/android-ndk-r7b/platforms/android-14/arch-arm/usr/lib -
L../../../../lib
> clock_gettime02.c /u/ltp/android-ndk-r7b/platforms/android-1
> >  4/arch-arm/usr/lib/crtbegin_dynamic.o
> -Wl,-rpath-link=/u/ltp/android-ndk-r7b/platforms/android-14/arch-
arm/usr/lib
> /u/ltp/android-ndk-r7b/toolchains/arm-linux-androideabi-
4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/libgcc.a
> -lc /u/ltp/android-ndk-r7b/platforms/android-14/arch-
arm/usr/lib/crtend_android.o
> -L/u/ltp/android-ndk-r7b/platforms/android-14/arch-arm/usr/lib -lltp -o 
clock_gettime02
> > ../../../../lib/libltp.a(parse_opts.o): In function `usc_test_looping':
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:716: undefined reference to 
`__aeabi_fcmpeq'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:725: undefined reference to 
`__aeabi_fcmpeq'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:734: undefined reference to 
`__aeabi_fcmpeq'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:735: undefined reference to 
`__aeabi_i2f'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:735: undefined reference to 
`__aeabi_fmul'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:735: undefined reference to 
`__aeabi_f2iz'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:746: undefined reference to 
`__aeabi_fcmpeq'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:772: undefined reference to 
`__aeabi_fcmpeq'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:716: undefined reference to 
`__aeabi_fcmpeq'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:727: undefined reference to 
`__aeabi_fmul'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:727: undefined reference to 
`__aeabi_f2iz'
> > ../../../../lib/libltp.a(parse_opts.o): In function `parse_opts':
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:289: undefined reference to 
`__aeabi_d2f'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:293: undefined reference to 
`__aeabi_d2f'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:294: undefined reference to 
`__aeabi_fcmpeq'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:438: undefined reference to 
`__aeabi_fcmpge'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:441: undefined reference to 
`__aeabi_f2d'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:421: undefined reference to 
`__aeabi_fcmpge'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:425: undefined reference to 
`__aeabi_fcmpeq'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:408: undefined reference to 
`__aeabi_fcmpge'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:413: undefined reference to 
`__aeabi_fcmpeq'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:424: undefined reference to 
`__aeabi_f2d'
> > /u/ltp/ltp-full-20120104/lib/parse_opts.c:411: undefined reference to 
`__aeabi_f2d'
> > collect2: ld returned 1 exit status
> 
> That suggets that the linker wasn't been able to pick up symbols from
> libgcc.a, possibly because linker flags and static libraries are passed
> to it in the wrong order.
> 
Hi,

I am able to cross compile for android but not able to execute it on android 
platform.
I if execute any of the binaries i am getting " no such file or directory"
I checked that the issue with dynamic linker :


readelf --program

Elf file type is EXEC (Executable file)
Entry point 0x87e8
There are 8 program headers, starting at offset 52

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  EXIDX          0x000a7c 0x00008a7c 0x00008a7c 0x00048 0x00048 R   0x4
  PHDR           0x000034 0x00008034 0x00008034 0x00100 0x00100 R E 0x4
  INTERP         0x000134 0x00008134 0x00008134 0x00013 0x00013 R   0x1
      [Requesting program interpreter: /lib/ld-linux.so.3]
  LOAD           0x000000 0x00008000 0x00008000 0x00ac8 0x00ac8 R E 0x8000
  LOAD           0x000ac8 0x00010ac8 0x00010ac8 0x00148 0x00158 RW  0x8000
  DYNAMIC        0x000ad4 0x00010ad4 0x00010ad4 0x000f0 0x000f0 RW  0x4
  NOTE           0x000148 0x00008148 0x00008148 0x00020 0x00020 R   0x4
  GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x10

Its taking default linker file as /lib/ld-linux, it should be 
/system/bin/linker for android i guess.
Can someone suggest me hoe to change this.





------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

      reply	other threads:[~2014-05-29 11:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28  9:56 [LTP] Need help in cross compiling LTP for android rejish
2012-02-29 16:22 ` Cyril Hrubis
     [not found]   ` <6F91E0FFDA542149961F7BDED2D2B94B549365C4B6@EXGMBX01.sasken.com>
2012-03-02 12:58     ` Cyril Hrubis
     [not found]       ` <6F91E0FFDA542149961F7BDED2D2B94B549F7328E7@EXGMBX01.sasken.com>
     [not found]         ` <CAMhs6YzaQ_1gKqCskOX1F8db-nKg=P_Zsy-FgHYnhczDvm9UhQ@mail.gmail.com>
     [not found]           ` <6F91E0FFDA542149961F7BDED2D2B94B56372F8DCD@EXGMBX01.sasken.com>
     [not found]             ` <CAMhs6Yyv_-v_TWKpVxv6tVeyg=jnH_VDZpaOQYnkZxF5C-O2fQ@mail.gmail.com>
     [not found]               ` <6F91E0FFDA542149961F7BDED2D2B94B56372F8DEA@EXGMBX01.sasken.com>
2012-04-11  9:23                 ` Garrett Cooper
2012-04-11  9:28                   ` Rejish Rajagopala
2012-05-02 12:07                     ` Cyril Hrubis
2014-05-29 11:21                       ` meena [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20140529T131657-599@post.gmane.org \
    --to=ashagow@gmail.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox