Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Source project has a limited visibility.
  • Rodrigo Mesquita's avatar
    b663c9e0
    rts: Make addDLL a wrapper around loadNativeObj · b663c9e0
    Rodrigo Mesquita authored and Andreas Klebinger's avatar Andreas Klebinger 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.
    
    (cherry picked from commit dcfaa190)
    b663c9e0
    History
    rts: Make addDLL a wrapper around loadNativeObj
    Rodrigo Mesquita authored and Andreas Klebinger's avatar Andreas Klebinger 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.
    
    (cherry picked from commit dcfaa190)
Code owners
Assign users and groups as approvers for specific file changes. Learn more.