[PATCH] D43819: [ELF] - Restrict section offsets that exceeds file size.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 28 03:38:56 PST 2018


jhenderson added a comment.

Could you extend the test to show that we don't emit an error for NOBITS sections in this situation, please. Otherwise, looks reasonable.



================
Comment at: ELF/Writer.cpp:1913
+            rangeToString(Sec->Offset, Sec->Offset + Sec->Size) +
+            ", check your linker script for overflows");
+  }
----------------
grimar wrote:
> jhenderson wrote:
> > ", check" -> ". Check"
> I do not think we use dots + uppercases in error messages. I used `;` instead,
> it seems a bit hard to find few long error for reference, but at least it is consistent with
> "can't create dynamic relocation R_386_GOT32X against symbol: foo in readonly segment; recompile object files with -fPIC"
Okay, that's far enough.


https://reviews.llvm.org/D43819





More information about the llvm-commits mailing list