[PATCH] D88637: [LLD] Set alignment as part of Characteristics in TLS table.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 13 11:19:51 PDT 2020


rnk added a comment.

Thanks for the fix!



================
Comment at: llvm/include/llvm/Object/COFF.h:592
+      assert(P2Align <= 13 && "invalid alignment requested");
+      Characteristics |= (P2Align + 1) << 20;
+    }
----------------
If there is already some non-zero alignment, you would have to mask it out, right? Maybe structure this as:
- build the new alignment characteristic bits, 0 or some value
- load, mask, or in, and store them in one operation

As this setter is currently used, this bug is probably not observable, but it's best to be safe.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88637



More information about the llvm-commits mailing list