Hi, I traced the problem a little bit deeper. In linker.c, load_library(), it will invoke get_lib_extents() to get from the ELF the mmap_addr, which should be given in compile time. The code later goes to alloc_mem_region() which then calls reserve_mem_region() to mmap the ELF to mmap_addr. If the hint mmap_addr is not used, it simply un- mapped and returns an error.
Why does it return fail instead of using the address provided by mmap? Why would the mmapping to the given address failed? Low memory? Is it possible to prevent this problem by remove the library from the prelink map? Hank On Apr 16, 9:05 pm, Hank <[email protected]> wrote: > Hi group, > > I encountered a dlopen() failure and got a message of > DL_ERR_CANNOT_FIND_LIBRARY. The target library is under /system/lib. > It is also in the prelink-linux-arm.map. I think low memory might be a > possibility. Thus, I tried to kill some process to release some > memory, but the result is the same. I stopped my trace at find_library > (), linker.c because I can't get log from here and there are several > possible conditions. > > To sum up: > 1. not because the library is not in the filesystem > 2. not because of low memory > 3. not because it is not in the prelink-linux-arm.map > > What else can make dlopen() failed? > Thanks! > > Hank --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---
