[rtmpdump] [PATCH 1/2] darwin dylibs should used twolevel_namespace and dynamic_lookup
hyc at highlandsun.com
Fri Jul 29 20:29:16 CEST 2011
Thanks for the explanation. Neither of your patches applied cleanly, they
appear to have been corrupted by a mailer somewhere. I applied the changes
Scott D. Davilla wrote:
>> Can you please provide more explanation of what this patch does or
>> why it's needed?
> From 'man ld' on osx
> "Two-level namespace
> By default all references resolved to a dynamic library record
> the library to which they were resolved. At runtime, dyld uses that
> mation to directly resolve symobls. The alternative is to use
> the -flat_namespace option. With flat namespace, the library is not
> recorded. At runtime, dyld will search each dynamic library in
> load order when resolving symbols. This is slower, but more like how
> operating systems resolve symbols."
> We have found that using flat_namespace also risks symbol collision
> with malformed libs.
> The change from 'undefined suppress' to 'undefined dynamic' is
> required when using a twolevel_namespace.
> This patch is not 'required' as the lib will fuction just fine as it
> is linked, the change just makes it more proper. Using flat_namespace
> was the old way (ie. 10.4SDK) to create dylibs. twolevel_namespace
> has replaced it and is still 10.4SDK compatible.
More information about the rtmpdump