• Rodger Combs's avatar
    configure: add linker export script support on Darwin · 63fbeebf
    Rodger Combs authored
    This isn't a "version script" in the usual sense, since it doesn't set symbol
    versions directly. Instead, the version for the whole .dylib is set in the
    linker flags, and we generate a list of symbol patterns to export. This allows
    us to keep our local symbols (e.g. ff_*) local on the platform.
    
    The Darwin linker's exported_symbols_list format is a bit different than the
    one used by the GNU linker. It doesn't handle local symbols at all, since when
    a list is provided, all unlisted symbols are local by default; thus, we remove
    local sections. It doesn't handle per-version sections, so we remove the
    headers and brackets. It expects symbols to be prefixed with an underscore.
    It errors if a listed symbol with no wildcards is not present in the output,
    so we append an asterisk to any symbol that doesn't already end in one.
    63fbeebf
configure 220 KB