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
Prelink issues on Froyo
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
  14 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
 
cyanogen  
View profile  
 More options Jun 30 2010, 12:36 am
From: cyanogen <steve.kon...@gmail.com>
Date: Tue, 29 Jun 2010 21:36:23 -0700 (PDT)
Local: Wed, Jun 30 2010 12:36 am
Subject: Prelink issues on Froyo
We are running into some strange issues on Froyo when building for
Sapphire. Notably, issues with prelinked libraries not loading into
the right address space. libaudio was the first, and a quick fix there
was to just disable prelinking for it. Now it gets stranger with
libcamera/liboemcamera..

E/QualcommCameraHardware(   64): FATAL ERROR: could not dlopen
liboemcamera.so: Cannot load library: reserve_mem_region[831]:
OOPS:    64      prelinked library 'liboemcamera.so' mapped at
0x40b0c000, not at 0xa9400000

When the linker mmaps the library, it's ending up in the wrong place.
The isprelinked tool says that it's OK though:

shade@toxygene: sapphire/proprietary $ isprelinked liboemcamera.so
liboemcamera.so: 0xa9400000

For some reason this is only happening on Sapphire/Dream. Passion
builds work just fine.

Ideas?


 
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.
aBiNg  
View profile  
 More options Jun 30 2010, 4:09 am
From: aBiNg <cn.fyo...@gmail.com>
Date: Wed, 30 Jun 2010 01:09:58 -0700 (PDT)
Local: Wed, Jun 30 2010 4:09 am
Subject: Re: Prelink issues on Froyo
Hi, cyanogen

I can confirm this issue, which also came up on my Tattoo. Hope the
devs from google can fix it.

On Jun 30, 12:36 pm, cyanogen <steve.kon...@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.
aBiNg  
View profile  
 More options Jun 30 2010, 6:00 am
From: aBiNg <cn.fyo...@gmail.com>
Date: Wed, 30 Jun 2010 03:00:19 -0700 (PDT)
Local: Wed, Jun 30 2010 6:00 am
Subject: Re: Prelink issues on Froyo
Here is the logcat while libspeech.so dlopen-ed after I set the
DLINKER_DEBUG to 1:

E/linker  (  523): bionic/linker/linker.c:672| WARNING: `/system/lib/
libspeech.so` is not a prelinked library
E/linker  (  523):    59 mapping library 'libspeech.so' at 80900000
(index 00000009) through buddy allocator.
E/linker  (  523): bionic/linker/linker.c:1280| ERROR:    59 cannot
locate '_ZN7android11AudioRecordC1EijiiijPFviPvS1_ES1_i'...
E/linker  (  523):
E/linker  (  523): bionic/linker/linker.c:1995| ERROR: failed to link
libspeech.so
E/linker  (  523):
I/dalvikvm(  523): Unable to dlopen(/system/lib/libspeech.so): Cannot
load library: link_image[1995]: failed to link libspeech.so

There seems to be some illogic codes in linker.c file.

Regards,

On Jun 30, 4:09 pm, aBiNg <cn.fyo...@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.
cyanogen  
View profile  
 More options Jun 30 2010, 9:49 am
From: cyanogen <steve.kon...@gmail.com>
Date: Wed, 30 Jun 2010 06:49:39 -0700 (PDT)
Local: Wed, Jun 30 2010 9:49 am
Subject: Re: Prelink issues on Froyo
Your issue looks like a different problem (missing symbols), but I
could be wrong.

On Jun 30, 6:00 am, aBiNg <cn.fyo...@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.
David Turner  
View profile  
 More options Jun 30 2010, 11:03 am
From: David Turner <di...@android.com>
Date: Wed, 30 Jun 2010 08:03:06 -0700
Local: Wed, Jun 30 2010 11:03 am
Subject: Re: Prelink issues on Froyo

I would assume that some of the prelinked libraries loaded are larger than
what the prelink
map expects, resulting in overlaps/conflicts. You will probably need to
modify the prelink map.

A prelinked library cannot be relocated to a different address (on purpose,
the goal
is to get rid of all internal relocations, to speed up loading and reduce
code size),
which is why the linker is complaining with a fatal error.

isprelinked returns true for your library because it detects that it has
already been
"pre-relocated" for 0xa94000000, but that doesn't mean it can always be
loaded
into a process' address space.

Hope this helps


 
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.
cyanogen  
View profile  
 More options Jun 30 2010, 2:11 pm
From: cyanogen <steve.kon...@gmail.com>
Date: Wed, 30 Jun 2010 11:11:59 -0700 (PDT)
Local: Wed, Jun 30 2010 2:11 pm
Subject: Re: Prelink issues on Froyo
Thanks for the response.  I checked this, but the alloted space in the
prelink map is 2MB and the library in question is only 300k.  The same
problem happens with a different library (libaudio) and there is
plenty of space for it as well.  Everything is fine on Passion builds,
it's only happening when building for Dream/Sapphire.

I found this regarding a similar problem but haven't yet looked into
if/why it's "growing":
http://groups.google.com/group/android-porting/browse_thread/thread/2...

On Jun 30, 11:03 am, David Turner <di...@android.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.
fadden  
View profile  
 More options Jun 30 2010, 4:51 pm
From: fadden <fad...@android.com>
Date: Wed, 30 Jun 2010 13:51:30 -0700 (PDT)
Local: Wed, Jun 30 2010 4:51 pm
Subject: Re: Prelink issues on Froyo
On Jun 30, 11:11 am, cyanogen <steve.kon...@gmail.com> wrote:

> Thanks for the response.  I checked this, but the alloted space in the
> prelink map is 2MB and the library in question is only 300k.  The same
> problem happens with a different library (libaudio) and there is
> plenty of space for it as well.  Everything is fine on Passion builds,
> it's only happening when building for Dream/Sapphire.

Did you check the library *below* the library that's failing?  The
address-specific mmap() call would fail if another library had been
loaded below it and exceeded its bounds.

0x40b0c000 is in the right area for a "next available" space
allocation.  Looking at linker.c, we're not specifying MAP_FIXED, so
this behavior is expected.


 
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.
cyanogen  
View profile  
 More options Jun 30 2010, 8:33 pm
From: cyanogen <steve.kon...@gmail.com>
Date: Wed, 30 Jun 2010 17:33:32 -0700 (PDT)
Local: Wed, Jun 30 2010 8:33 pm
Subject: Re: Prelink issues on Froyo
Checked that, and I also added some extra debug code to print si->size
in reserve_mem_region, and I can't see anywhere it's overrunning the
prelink space. Something is fishy.

On Jun 30, 4:51 pm, fadden <fad...@android.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.
Sean Hodges  
View profile  
 More options Jul 1 2010, 4:12 am
From: Sean Hodges <seanhodge...@googlemail.com>
Date: Thu, 1 Jul 2010 09:12:19 +0100
Local: Thurs, Jul 1 2010 4:12 am
Subject: Re: Prelink issues on Froyo
Is there a chance something, like a system update, might have
disturbed your toolchain?

Do other releases build for the Dream OK?


 
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.
cyanogen  
View profile  
 More options Jul 1 2010, 8:50 am
From: cyanogen <steve.kon...@gmail.com>
Date: Thu, 1 Jul 2010 05:50:27 -0700 (PDT)
Local: Thurs, Jul 1 2010 8:50 am
Subject: Re: Prelink issues on Froyo
There's nothing wrong with my toolchain. This problem is reproducible
by anyone who tries to build AOSP for Dream or Sapphire.

On Jul 1, 4:12 am, Sean Hodges <seanhodge...@googlemail.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.
aBiNg  
View profile   Translate to Translated (View Original)
 More options Jul 1 2010, 9:25 am
From: aBiNg <cn.fyo...@gmail.com>
Date: Thu, 1 Jul 2010 06:25:26 -0700 (PDT)
Local: Thurs, Jul 1 2010 9:25 am
Subject: Re: Prelink issues on Froyo
Hi,

You are right, my libspeech.so issue has been fixed.

As for the liboemcamera.so issue, we have the exactly same problem.
logcat is here:

E/QualcommCameraHardware(   60): FATAL ERROR: could not dlopen
liboemcamera.so: Cannot load library: reserve_mem_region[810]:
OOPS:    60      prelinked library 'liboemcamera.so' mapped at
0x40d0c000, not at 0xa9400000

The corresponding address of 0xa9400000 is referred to
libvorbisidec.so library. Are they overlapped, as fadden said?
And I read reports by other people that dynamic libraries would be
inflated while being called. Is this true?

Regards,

On Jul 1, 8:50 pm, cyanogen <steve.kon...@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.
DJones  
View profile  
 More options Jul 1 2010, 12:00 am
From: DJones <djoneslocker2...@gmail.com>
Date: Wed, 30 Jun 2010 21:00:32 -0700 (PDT)
Local: Thurs, Jul 1 2010 12:00 am
Subject: Re: Prelink issues on Froyo
I posted this issue on mahalo to get some exposure for it.

http://www.mahalo.com/answers/help-solve-android-linux-build-problem-...

Hope this is not counterproductive. and hope we find a fix soon.

On Jun 30, 8:33 pm, cyanogen <steve.kon...@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.
DJones  
View profile  
 More options Jun 30 2010, 11:54 pm
From: DJones <djoneslocker2...@gmail.com>
Date: Wed, 30 Jun 2010 20:54:47 -0700 (PDT)
Local: Wed, Jun 30 2010 11:54 pm
Subject: Re: Prelink issues on Froyo
I posted this issue on mahalo, i hope its not counterproductive.

http://www.mahalo.com/answers/help-solve-android-linux-build-problem-...

On Jun 30, 8:33 pm, cyanogen <steve.kon...@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.
cyanogen  
View profile  
 More options Jul 1 2010, 10:30 pm
From: cyanogen <steve.kon...@gmail.com>
Date: Thu, 1 Jul 2010 19:30:14 -0700 (PDT)
Local: Thurs, Jul 1 2010 10:30 pm
Subject: Re: Prelink issues on Froyo
Nice catch.

It appears they have reorganized the prelink map in Froyo! Some of the
proprietary blobs date back to Donut and are hacked up in various ways
for our custom builds.

Rearranging the prelink map should do the job. There are other blobs
that need adjusted too.

On Jul 1, 9:25 am, aBiNg <cn.fyo...@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 »