[llvm] [JITLink][AArch32] Fix Unaligned Data Symbol Address Resolution (PR #97030)

Stefan Gränitz via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 28 03:29:57 PDT 2024


================
@@ -200,6 +200,9 @@ class ELFLinkGraphBuilder_aarch32
 
 protected:
   TargetFlagsType makeTargetFlags(const typename ELFT::Sym &Sym) override {
+    // Data symbols do not have Arm or Thumb flags.
+    if (Sym.getType() == ELF::STT_OBJECT)
+      return TargetFlagsType{};
----------------
weliveindetail wrote:

With your fix in `getRawOffset()` this check shouldn't be necessary anymore, isn't it? Instead we might want to assert that all symbols with the `ThumbSymbol` target flag are `ELF::STT_FUNC`.

https://github.com/llvm/llvm-project/pull/97030


More information about the llvm-commits mailing list