Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Dynamic Shared Library in Android Another Approach - Don't Use android Linker
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Susmith M R  
View profile  
 More options Feb 9 2008, 8:36 am
From: Susmith M R <susmith...@india.com>
Date: Sat, 9 Feb 2008 05:36:37 -0800 (PST)
Local: Sat, Feb 9 2008 8:36 am
Subject: Dynamic Shared Library in Android Another Approach - Don't Use android Linker
Hai all,
    Anroid is using a linker that is different from historical linux
linkers like ld.so,ld-linux.so.2,ld-linux.so.3.
I think ld.so is for a.out ld-linux.so.2 is for elf and ld-linux.so.3
is the new one which is different
from normal elf linker. Correct me if i am wrong.

I actually usded the ld-linux.so.3 instead of /system/bin/linker of
android.

So we will start with a simple program
hello.c
#include<stdio.h>
int main()
{
        printf("\n Hello World \n");
        return 0;

}

Toolchain is from Code Sourcery (arm gnu/linux)
arm-none-linux-gnueabi-gcc -o hello.out hello.c -Wl,-dynamic-linker=/
system/lib/ld-linux.so.6  (...DO NOT USE -static let it link
dynamically )

Just check the hello.out to findout the dependencies.
I just guessed(because i dont have ldd in my cywin) that it needs
ld-linux.so.6,
libgcc_s.so,
libc.so.6

I took these files from toolchain library (libc/usr/lib) and pushed
into the emulator directory /system/lib

Now push the hello.out to the emulator and give the permission to
execute (chmod) and u can see ur output
without static linking.

So every program whether it is DSO or any thing , if it is created
successfully with the toolchiain in
ur host system it can be executed in the emulator. U have to only push
the needed dynamic shared libraries
into the emulator system library and whenever u r linking dynamically
use the option " -Wl,-dynamic-linker=/system/lib/ld-linux.so.6 "

Good Luck ..
Best Regards
 Susmith M R


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Detro  
View profile  
 More options Feb 23 2008, 6:46 am
From: Detro <detroniza...@gmail.com>
Date: Sat, 23 Feb 2008 03:46:41 -0800 (PST)
Local: Sat, Feb 23 2008 6:46 am
Subject: Re: Dynamic Shared Library in Android Another Approach - Don't Use android Linker
Hi.

Just wondering.
I think this "3rd" linking system is based on the "Symbian way".
Because name resolution is expensive, whenever you compile a library,
it has to have a table that associate integers with function names.
Then, at linking time, you call these integers instead of names, so
it's much faster.
(Obviously, this is a raw explaination).

On Feb 9, 1:36 pm, Susmith M R <susmith...@india.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Susmith M R  
View profile  
 More options Feb 24 2008, 1:22 pm
From: Susmith M R <susmith...@india.com>
Date: Sun, 24 Feb 2008 10:22:11 -0800 (PST)
Local: Sun, Feb 24 2008 1:22 pm
Subject: Re: Dynamic Shared Library in Android Another Approach - Don't Use android Linker
Hai Detro,
 I faced a lot of problem with android linker while i was porting my c+
+ application. I found it is impossible to port it with the libc of
android. So here
i explained the way i ported my application to android and it was
successful. What is not clear for u. Have u tried this way.

On Feb 23, 4:46 pm, Detro <detroniza...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »