Menu

#17 Undefined symbols on Mac OS X

open
nobody
None
5
2005-12-14
2005-12-14
Darren Bane
No

Full details, including a patch (which should probably be conditionally-
compiled out for the portable release), are at http://
bugzilla.opendarwin.org/show_bug.cgi?id=6080

Discussion

  • Peter da Silva

    Peter da Silva - 2008-05-20

    Logged In: YES
    user_id=104286
    Originator: NO

    bugzilla.opendarwin.org is 404-compliant.

     
  • Lindberg G Williams Jr

    Logged In: YES
    user_id=2163712
    Originator: NO

    One of the first procedures called in any executable on POSIX is the symbol "_init" but this doesn't occur on Mac OS X or Darwin. TSOCKS uses procedure _init to link to the regular procedures that it *spoofs* so to speak. The issue is probably taken care of with this thread of ports http://giig.ugr.es/~rgarcia/tsocks/. Alternatively, you would have to modify each of the following procedures: connect, poll, select, close, and res_init (if SOCKS DNS is enabled) to handle what _init does. For example procedure res_init would need to contain do the following before trying to call realresinit:

    if (realresinit == NULL) {
    #ifndef USE_OLD_DLSYM
    realresinit = dlsym(RTLD_NEXT, "res_init");
    #else
    void *lib = dlopen(LIBCONNECT, RTLD_LAZY);
    realresinit = dlsym(lib, "res_init");
    dlclose(lib);
    #endif
    if (realresinit == NULL) {
    show_msg(MSGERR, "Unresolved symbol: res_init\n");
    return(-1);
    }
    }

     

Log in to post a comment.