[lld] [lld][GNU Properties] Refactor storage of PAuth ABI core info (PR #141920)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Thu May 29 06:49:22 PDT 2025
================
@@ -344,20 +344,22 @@ void GnuPropertySection::writeTo(uint8_t *buf) {
offset += 16;
}
- if (!ctx.aarch64PauthAbiCoreInfo.empty()) {
+ if (ctx.aarch64PauthAbiCoreInfo) {
write32(ctx, buf + offset + 0, GNU_PROPERTY_AARCH64_FEATURE_PAUTH);
- write32(ctx, buf + offset + 4, ctx.aarch64PauthAbiCoreInfo.size());
- memcpy(buf + offset + 8, ctx.aarch64PauthAbiCoreInfo.data(),
- ctx.aarch64PauthAbiCoreInfo.size());
+ write32(ctx, buf + offset + 4, sizeof(uint64_t) * 2);
----------------
smithp35 wrote:
could add a `size()` const member function to aarch64PauthAbiCoreInfo so that the size lines don't need to change.
could even add a `writeTo()` method which could be passed (buf + offset + 8) as a parameter.
https://github.com/llvm/llvm-project/pull/141920
More information about the llvm-commits
mailing list