-flat_namespace and -undefined suppress

Joshua Root jmr at macports.org
Sat Nov 1 01:25:04 PDT 2008


Joshua Root wrote:
> Before Panther, there was only flat namespace. The dynamic linker always
> loaded symbols from the first-loaded library that defined them.
> 
> Panther introduced two-level namespace, which keeps track of which
> library each symbol is meant to come from. Two-level namespace has been
> the default for a long time now.

A correction: it turns out that two-level namespace was actually first
introduced in Puma (10.1). The relevant feature introduced in Panther is
"-undefined dynamic_lookup", which is now the recommended way to link
plugin-type objects that reference symbols in the executable into which
they will be loaded but are not explicitly linked against it, rather
than using "-flat_namespace -undefined suppress".

Reference:
<http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachOTopics/Articles/executing_files.html>

- Josh


More information about the macports-dev mailing list