Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Source project has a limited visibility.
  • Peter Trommler's avatar
    3ea34922
    Link temporary shared objects with `--no-as-needed` · 3ea34922
    Peter Trommler authored and Herbert Valerio Riedel's avatar Herbert Valerio Riedel committed
    Some ELF link editors default to `--as-needed` and record only
    those libraries in DT_NEEDED tags that are needed to resolve
    undefined symbols in the shared object to be created.
    
    In Template Haskell we rely on all symbols that were defined
    in modules compiled so far to be available in the current
    temporary shared object. To prevent the link editor from
    dropping the DT_NEEDED tag for the previously linked temporary
    shared object we need to override the link editors default and
    specify `--no-as-needed` on the command line. This is for GNU ld
    and GOLD ld.
    
    This addresses #10110
    
    TODO: regression test
    
    (cherry picked from commit 1b7f5976)
    3ea34922
    History
    Link temporary shared objects with `--no-as-needed`
    Peter Trommler authored and Herbert Valerio Riedel's avatar Herbert Valerio Riedel committed
    Some ELF link editors default to `--as-needed` and record only
    those libraries in DT_NEEDED tags that are needed to resolve
    undefined symbols in the shared object to be created.
    
    In Template Haskell we rely on all symbols that were defined
    in modules compiled so far to be available in the current
    temporary shared object. To prevent the link editor from
    dropping the DT_NEEDED tag for the previously linked temporary
    shared object we need to override the link editors default and
    specify `--no-as-needed` on the command line. This is for GNU ld
    and GOLD ld.
    
    This addresses #10110
    
    TODO: regression test
    
    (cherry picked from commit 1b7f5976)
Code owners
Assign users and groups as approvers for specific file changes. Learn more.