Skip to content
Snippets Groups Projects
Commit 3ea34922 authored by Peter Trommler's avatar Peter Trommler :drum: Committed by Herbert Valerio Riedel
Browse files

Link temporary shared objects with `--no-as-needed`

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)
parent 65753a9d
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment