Skip to content
  • Rodrigo Mesquita's avatar
    rts: Make addDLL a wrapper around loadNativeObj · dcfaa190
    Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
    Rewrite the implementation of `addDLL` as a wrapper around the more
    principled `loadNativeObj` rts linker function. The latter should be
    preferred while the former is preserved for backwards compatibility.
    
    `loadNativeObj` was previously only available on ELF platforms, so this
    commit further refactors the rts linker to transform loadNativeObj_ELF
    into loadNativeObj_POSIX, which is available in ELF and MachO platforms.
    
    The refactor made it possible to remove the `dl_mutex` mutex in favour
    of always using `linker_mutex` (rather than a combination of both).
    
    Lastly, we implement `loadNativeObj` for Windows too.
    dcfaa190