[PATCH] D59216: [LLD][ELF][ARM] Redesign of .ARM.exidx handling to use a SyntheticSection

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 14:40:11 PDT 2019


ruiu added a comment.

Thanks Peter, I think I like this approach than the other one.



================
Comment at: ELF/SyntheticSections.cpp:3058
 
-ARMExidxSentinelSection::ARMExidxSentinelSection()
+const uint8_t ARMExidxSyntheticSection::CantUnwindData[8] = {
+    0, 0, 0, 0,  // PREL31 to target
----------------
Since you are using this variable only in ARMExidxSyntheticSection::writeTo, you can move this to that function.


================
Comment at: ELF/SyntheticSections.cpp:3066
+  for (InputSectionBase *IS : InputSections) {
+    if (isa<InputSection>(IS) && IS->Type == SHT_ARM_EXIDX)
+      IS->Live = false;
----------------
nit: I'd add `{}` to `if` if its `else if` has `{}`.


================
Comment at: ELF/SyntheticSections.cpp:3095
+
+static bool isDuplicateArmExidxSec(InputSection *Prev, InputSection *Cur) {
+
----------------
Could you add a brief function comment?


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

https://reviews.llvm.org/D59216





More information about the llvm-commits mailing list