[PATCH] D33824: [ELF] - Do not merge relocation sections by name when using --emit-relocs.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 00:40:03 PDT 2017


grimar added inline comments.


================
Comment at: ELF/OutputSections.cpp:345
+      (IS->Type == SHT_REL || IS->Type == SHT_RELA)) {
+    InputSection *Sec = cast<InputSection>(IS);
+    OutputSection *Out = Sec->getRelocatedSection()->getOutputSection();
----------------
ruiu wrote:
> Use `auto`.
Done.


================
Comment at: ELF/OutputSections.h:70-71
 
+  // Pointer to relocation section. Used for --emit-relocs, where we about to
+  // merge relocation sections if their target sections were merged.
+  OutputSection *RelocationSection = nullptr;
----------------
ruiu wrote:
> Pointer to a relocation section for this section. Usually nullptr because we consume relocations, but if --emit-relocs is specified (which is rare), it may have a non-null value.
Done.


https://reviews.llvm.org/D33824





More information about the llvm-commits mailing list