site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=HQ5JDzL7GzW6UUXYxmohTNc3t1+hsYhlaU1DFoDE9A0dObQm88tE69qjLYrlRsN1QQ9NZDboTD3VzMgGDXjegi2sZIqent1CZQGTYA7bgSOH2r9Ec5LxYc6oiQpppfjzl7HYSpAFvMBKhLYX4b+OfvrHkORgv0jk7U5G4cu5lhQ= Thanks, Nick _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Hi, I'm not sure if this is the right list but I'm hoping someone could shed some light on this problem. I have a plugin that dynamically loads a customized version of curl using dlopen(). The application is compiled with -lcurl but my plugin needs to load its own customized version of curl that was built with some changes. The problem is that the application is linking (via -lcurl) with the version of curl that's in /usr/lib/curl (which I don't want to change). As soon as a I do the following: void * dll = dlopen("libcurlNick.dylib", RTLD_LAZY | RTLD_LOCAL ); I see some of the wrong symbols get bound -- some are using my version and some are the version in /usr/lib: dyld: loaded: /usr/lib/libcurl.3.dylib, cpu-sub-type: 3ype: 3 dyld: loaded: /usr/lib/libz.1.dylib, cpu-sub-type: 3 dyld: loaded: /usr/lib/system/libmathCommon.A.dylib, cpu-sub-type: 3 ....... dyld: loaded: /usr/local/lib/libcurlNick.dylib dyld: bind: libcurlNick.dylib:0x0062d060 = libSystem.B.dylib:_malloc, *0x0062d060 = 0x900030fa dyld: bind: libcurlNick.dylib:0x0062d05c = libSystem.B.dylib:_free, *0x0062d05c = 0x90005ae0 dyld: bind: libcurlNick.dylib:0x0062d058 = libSystem.B.dylib:_realloc, *0x0062d058 = 0x9001409f dyld: bind: libcurlNick.dylib:0x0062d054 = libSystem.B.dylib:_strdup, *0x0062d054 = 0x90013bf0 dyld: loaded: /usr/local/lib/libcurlNick.dylibSystem.B.dylib:_calloc, *0x0062d050 = 0x9000803f dyld: bind: libcurlNick.dylib:0x0062d060 = libSystem.B.dylib:_malloc, *0x0062d060 = 0x900030fa000 = 0xa4d87250 dyld: bind: libcurlNick.dylib:0x0062d05c = libSystem.B.dylib:_free, *0x0062d05c = 0x90005ae0x0062e004 = 0xa4d87050 dyld: bind: libcurlNick.dylib:0x0062d058 = libSystem.B.dylib:_realloc, *0x0062d058 = 0x9001409f08 = 0xa4d87220 dyld: bind: libcurlNick.dylib:0x0062d054 = libSystem.B.dylib:_strdup, *0x0062d054 = 0x90013bf000c = 0xa4d8705c dyld: bind: libcurlNick.dylib:0x0062d050 = libSystem.B.dylib:_calloc, *0x0062d050 = 0x9000803f062e010 = 0xa4d87060 ....... dyld: bind: libcurlNick.dylib:_Curl_telnet_done$non_lazy_ptr = libcurl.3.dylib:_Curl_telnet_done, *0x0042e03c = 0x94d9de20 dyld: bind: libcurlNick.dylib:_Curl_tftp_done$non_lazy_ptr = libcurlNick.dylib:_Curl_tftp_done, *0x0042e040 = 0x00427b3c dyld: bind: libcurlNick.dylib:_Curl_http_connect$non_lazy_ptr = libcurl.3.dylib:_Curl_http_connect, *0x0042e044 = 0x94d8ecd3 dyld: bind: libcurlNick.dylib:_Curl_ftp_nextconnect$non_lazy_ptr = libcurl.3.dylib:_Curl_ftp_nextconnect, *0x0042e048 = 0x94d933c7 dyld: bind: libcurlNick.dylib:_Curl_tftp$non_lazy_ptr = libcurlNick.dylib:_Curl_tftp, *0x0042e04c = 0x0042826c dyld: bind: libcurlNick.dylib:_Curl_ftp_done$non_lazy_ptr = libcurl. 3.dylib:_Curl_ftp_done, *0x0042e050 = 0x94d91156 dyld: bind: libcurlNick.dylib:_Curl_ldap$non_lazy_ptr = libcurl. 3.dylib:_Curl_ldap, *0x0042e054 = 0x94d990bc dyld: bind: libcurlNick.dylib:_curl_jmpenv$non_lazy_ptr = libcurl. 3.dylib:_curl_jmpenv, *0x0042e058 = 0xa4d87580 First, why isn't dyld using all the symbols from libcurlNick.dylib -- I promise to you they are there. I want the main application to use / usr/lib/libcurl.3.dylib but I want my plugin inside the application to use /usr/local/lib/libcurlNick.dylib. What am I doing wrong -- is this even possible to do? This email sent to site_archiver@lists.apple.com
participants (1)
-
Nick Forte