[PATCH] D60353: ELF: Add basic partition data structures and behaviours.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 17 06:11:38 PDT 2019


ruiu added a comment.

Do you have another change for adding synthetic sections for partitioning? This change looks pretty straightforward to me, although I'd like to somehow continue using the term "Live" instead of Partition is zero" to explain liveness in code and comments, though.



================
Comment at: lld/ELF/Driver.cpp:1378
+static void readSymbolPartitionSection(InputSectionBase *S) {
+  Symbol *Sym;
+  if (S->AreRelocsRela)
----------------
Could you add a brief comment as to what this Sym is? I think this is a "root" symbol for each partition.


================
Comment at: lld/ELF/Driver.cpp:1400
+          ": partitions cannot be used with the SECTIONS command");
+  if (Script->hasPhdrsCommands())
+    error(toString(S->File) +
----------------
I first thought that we may want to completely ban linker scripts when this feature is in use, but no, we can't do that, because on Linux libc.so is actually a linker script...


================
Comment at: lld/ELF/InputSection.h:78
 
+  unsigned : 1;
+
----------------
It's not clear to me why you needed a one bit padding here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60353





More information about the llvm-commits mailing list