bionic linker

This topic contains 1 reply, has 2 voices, and was last updated by  Casper49 6 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31375

    teresatao
    Member

    Hello there,

    Currently we are using Android 2.2 as the base and we found that the dlopen() can’t support get symbols from main. So the dlopen(NULL,flags) will crash since there is no protection. We heard that the bionic linker in Gingerbread has added the support and we wonder does current MIPs port version had this patch for both of 2.2 and 2.3?

     

    Thanks and Best Regards,

     

    Teresa Tao

    #37776

    Casper49
    Member
    In gingerbread: bionic/libc/CHANGES.TXT

    – <dlfcn.h>: fixed dlopen() implementation to support dlopen(NULL, …).
      This allows one to look at the dynamic symbols exported by an executable.

     

    The following source code allows passing “NULL”.

     

    (In linker/linker.c)

    soinfo *find_library(const char *name)
    {

        soinfo *si;

        const char *bname;

     

    #if ALLOW_SYMBOLS_FROM_MAIN
        if (name == NULL)

            return somain;

    #else

        if (name == NULL)

            return NULL;

    #endif

     


    In froyo linker/linker.c, we doesn't have this code.

    So, I think only gingerbread (2.3) and later can support this feature. 2.2 doesn't.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.