[PATCH] D71242: [LLD][ELF]{ARM][AArch64] Add missing classof to patch sections.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 09:23:12 PST 2019


MaskRay accepted this revision.
MaskRay added a comment.

> [LLD][ELF]{ARM][AArch64] Add missing classof to patch sections.

`{` -> `[`



================
Comment at: lld/ELF/ARMErrataFix.cpp:86
+  static bool classof(const SectionBase *d) {
+    return d->kind() == InputSectionBase::Synthetic && d->name ==".text.patch";
+  }
----------------
A C function named `patch` will reside in `.text.patch` when compiled with -ffunction-sections. This does not matter, because it is only used to break a tie:

  lang=cpp
  auto mergeCmp = [](const InputSection *a, const InputSection *b) {
    if (a->outSecOff != b->outSecOff)
      return a->outSecOff < b->outSecOff;
    return isa<Patch657417Section>(a) && !isa<Patch657417Section>(b);
  };



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

https://reviews.llvm.org/D71242





More information about the llvm-commits mailing list