[PATCH] D73865: [CodeGenModule] Assume dso_local for -fpic -fno-semantic-interposition

serge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 10 11:41:47 PST 2020


serge-sans-paille added inline comments.
Herald added a subscriber: miyuki.


================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:871
     if (!Var->isThreadLocal() &&
-        (RM == llvm::Reloc::Static || CGOpts.PIECopyRelocations))
+        (RM == llvm::Reloc::Static || (LOpts.PIE && CGOpts.PIECopyRelocations)))
       return true;
----------------
in `clang/lib/Driver/ToolChains/Clang.cpp` we have

```
  if (Args.hasFlag(options::OPT_fsemantic_interposition,
                   options::OPT_fno_semantic_interposition, false) &&
      RelocationModel != llvm::Reloc::Static && !IsPIE)
    CmdArgs.push_back("-fsemantic-interposition");
```

reading that diff makes me wonder if that's the right place to put that test?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73865/new/

https://reviews.llvm.org/D73865





More information about the cfe-commits mailing list