[PATCH] D152921: [lld] Synthesize metadata for MTE globals

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 11 10:50:55 PDT 2023


MaskRay added inline comments.


================
Comment at: lld/ELF/SyntheticSections.cpp:3962
+            [](const Symbol *s1, const Symbol *s2) {
+              return s1->getVA() < s2->getVA();
+            });
----------------
If we have aliases, std::sort will exhibit different behaviors for different std::sort implementations or libc++ with https://libcxx.llvm.org/DesignDocs/UnspecifiedBehaviorRandomization.html
Consider stable_sort


================
Comment at: lld/ELF/SyntheticSections.h:1252
 
+class MemtagDescriptors : public SyntheticSection {
+public:
----------------
final


================
Comment at: lld/test/ELF/Inputs/aarch64-memtag-globals.s:383
+	.size	global_extern_untagged_definition_but_tagged_import, 4
+
----------------
no trailing blank line


================
Comment at: lld/test/ELF/aarch64-memtag-globals.s:15
+# RUN: llvm-readelf %t.so --section-headers --relocs --memtag >> %t.out
+# RUN: cat %t.out | FileCheck %s
+# RUN: llvm-objdump -Dz %t.so | FileCheck %s --check-prefix=CHECK-SPECIAL-RELOCS
----------------
`FileCheck %s < %t.out`


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