On Aug 25, 2010, at 10:30 AM, Eric Gorr wrote: On Aug 25, 2010, at 3:27 AM, Ken Thomases wrote: On Aug 24, 2010, at 3:53 PM, Eric Gorr wrote: So, I want to set the SDKROOT to be the 10.6 SDK and the Deployment Target to be Mac OS X 10.5.
However, I think I must be missing something. When I build a library with these settings and then use nm to see what symbols are in the library, nm will correctly output the symbols under 10.6, but not under 10.5.
Show the commands Xcode is using to build your library.
There is a sample project at:
which reproduces the part of the problem where nm returns an error under 10.5, but not 10.6. That error again is:
nm: object: /Volumes/Glamdring/Users/egorr/Desktop/SDKROOT/build/Debug/SDKROOTLib.bundle/Contents/MacOS/SDKROOTLib malformed object (unknown load command 4)
Under, 10.6, nm correctly returns:
~ $nm /Volumes/Glamdring/Users/egorr/Desktop/SDKROOT/build/Debug/SDKROOTLib.bundle/Contents/MacOS/SDKROOTLib 00000e4e T __Z17PluginLibraryMainl 00000e40 t __dyld_func_lookup 00000000 t __mh_bundle_header 00000e1c t dyld_stub_binding_helper
It seems to me that nm should be returning the same results under both 10.5 and 10.6. Is this not correct?
I have not been able to reproduce(yet) the other part of the problem where
functionPtr = CFBundleGetFunctionPointerForName( bundleLibrary, CFSTR( "plugin_main" ) );
returns NULL, but I am still working on it.
So, it turns out these two issues were separate, which I did not initially expect. The problem with CFBundleGetFunctionPointerForName returning NULL had to do with a problem involving how libcrypto and libssl were being linked in ( resolved in http://bit.ly/9uIhlq ).
I am still not certain why building it under 10.6 with a Deployment Target of 10.5 would cause nm to fail to show the symbols in 10.5. Perhaps this was a bug with nm in 10.5?
In any case, the sample project mentioned above has been updated such that the only remaining issue is with using nm under 10.5 to see what the symbols are in the library. If anyone has anything to offer, I would be interested.
|