[PATCH] D150631: [LLD] Emit DT_PPC64_OPT into the dynamic section

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 15 20:01:21 PDT 2023


MaskRay added inline comments.


================
Comment at: lld/ELF/SyntheticSections.cpp:1536
+  if (config->emachine == EM_PPC64 &&
+      getPPC64TargetInfo()->dynamicSectionOptFlags != -1)
+    addInt(DT_LOPROC + 3, getPPC64TargetInfo()->dynamicSectionOptFlags);
----------------
Since `dynamicSectionOptFlags >= 0` for PPC64, the condition is unneeded.


================
Comment at: lld/ELF/SyntheticSections.cpp:1537
+      getPPC64TargetInfo()->dynamicSectionOptFlags != -1)
+    addInt(DT_LOPROC + 3, getPPC64TargetInfo()->dynamicSectionOptFlags);
+
----------------
DT_PPC64_OPT


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150631



More information about the llvm-commits mailing list