[rtmpdump] [PATCH 1/2] darwin dylibs should used twolevel_namespace and dynamic_lookup
Scott D. Davilla
davilla at xbmc.org
Fri Jul 29 17:41:02 CEST 2011
>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
infor-
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
other
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.
Scott
More information about the rtmpdump
mailing list