[PATCH] D11266: LLD: ELF: Correctly identify SHT_NOTE sections with !SHF_ALLOC as type*Note

Tom Stellard thomas.stellard at amd.com
Wed Aug 5 18:41:10 PDT 2015


tstellarAMD added inline comments.

================
Comment at: lib/ReaderWriter/ELF/Atoms.cpp:77
@@ -75,1 +76,3 @@
+    if (_section->sh_type == SHT_NOTE)
+      return (flags == SHF_WRITE) ? typeRWNote : typeRONote;
     return _contentType = typeNoAlloc;
----------------
ruiu wrote:
> Don't you have to assign it to _contentType?
I don't think this is necessary.  This function is called from only one place: ELFDefinedAtom<ELFT>::contentType()
and the return value is assigned to _contentType here.


http://reviews.llvm.org/D11266





More information about the llvm-commits mailing list