[lld] [llvm] [lld][AArch64][Build Attributes] Add support for AArch64 Build Attributes (PR #147970)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 11 09:21:30 PDT 2025


================
@@ -552,8 +591,23 @@ template <class ELFT> void ObjFile<ELFT>::parse(bool ignoreComdats) {
   StringRef shstrtab = CHECK2(obj.getSectionStringTable(objSections), this);
   uint64_t size = objSections.size();
   sections.resize(size);
+
+  AArch64BuildAttrSubsections aarch64BAsubSections;
+  bool hasAArch64BuildAttributes = false;
+
   for (size_t i = 0; i != size; ++i) {
     const Elf_Shdr &sec = objSections[i];
+    // Read GNU property section into a per-InputFile structure that will be
----------------
MaskRay wrote:

We implement a partial parallel input file scanning. `parse` is sequential while `initSectionsAndLocalSyms` is parallel.
Here, the `if (LLVM_LIKELY(sec.sh_type == SHT_PROGBITS))` condition attempts to skip most work for the sequential part. Now you are adding section name overhead to most sections and other targets as well.

readGnuProperty is now called twice.

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


More information about the llvm-commits mailing list