[PATCH] D40652: [ELF] - Produce relocation section name consistent with output section name when --emit-reloc used with linker script.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 30 13:13:28 PST 2017


ruiu added inline comments.


================
Comment at: ELF/Writer.cpp:91
+StringRef elf::getOutputSectionName(InputSectionBase *S) {
+  StringRef Name = S->Name;
+
----------------
This saves only two characters. Just use S->Name instead of Name.


================
Comment at: ELF/Writer.cpp:104-105
+  // technically required, but not doing it is odd). This code guarantees that.
+  if ((S->Type == SHT_REL || S->Type == SHT_RELA) &&
+      !isa<SyntheticSection>(S)) {
+    OutputSection *Out =
----------------
Is it possible that a section is a synthetic section and has type of SHT_REL[A]?


https://reviews.llvm.org/D40652





More information about the llvm-commits mailing list