[lld] [llvm] [lld][AArch64][Build Attributes] Add support for converting AArch64 Build Attributes to GNU Properties (PR #131990)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 11 10:23:25 PDT 2025


================
@@ -239,9 +240,11 @@ class ELFFileBase : public InputFile {
 public:
   // Name of source file obtained from STT_FILE, if present.
   StringRef sourceFile;
+  std::unique_ptr<std::string> sourceFileStorage;
   uint32_t andFeatures = 0;
   bool hasCommonSyms = false;
   ArrayRef<uint8_t> aarch64PauthAbiCoreInfo;
----------------
smithp35 wrote:

An alternative that involves a bit of refactoring of the existing aarch64PauthABICoreInfo, which is optimal for a note section, but not ideal for build attributes, is to deserialize the aarch64PauthABICoreInfo and store the members as two uint64_t instead of an arrayRef. We'll need to update the comparison code in Driver.cpp and in the .note.gnu.property writing code, but it may be neater overall. 

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


More information about the llvm-commits mailing list