[PATCH] D152921: [lld] Synthesize metadata for MTE globals
Mitch Phillips via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 25 07:42:06 PDT 2023
hctim marked 6 inline comments as done.
hctim added inline comments.
================
Comment at: lld/ELF/SyntheticSections.cpp:3923
+
+ for (const auto &sym : symbols) {
+ if (!includeInSymtab(*sym))
----------------
MaskRay wrote:
>
Added the type, but it's actually `const Symbol*` as the container needs to store pointers to allow sorting.
================
Comment at: lld/ELF/SyntheticSections.h:1272
+ bool isNeeded() const override {
+ return !config->isStatic && !symbols.empty();
+ }
----------------
hctim wrote:
> MaskRay wrote:
> > Why is the `!config->isStatic &&` condition?
> >
> > `isConfig` can be toggled by `-Bstatic`/`-static` and `-Bdynamic`.
> > `-Bstatic` can be used with a dynamically linked executable as well.
> MTE globals are not supported for fully static executables, there needs to be a dynamic loader that processes relocations.
>
> Is there a better way to describe this in code? Maybe pulling `needsInterpSection` out of Writer.cpp?
@MaskRay - any suggestions here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152921/new/
https://reviews.llvm.org/D152921
More information about the llvm-commits
mailing list