[PATCH] D27712: [ELF] - Do not crash when move location counter backward.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 13 09:23:06 PST 2016
ruiu added inline comments.
================
Comment at: ELF/LinkerScript.cpp:467-469
+ uintX_t Val = AssignCmd->Expression(Dot);
+ if (Val < Dot)
+ error("unable to move location counter backward for: " + CurOutSec->Name);
----------------
If `Dot` overflows towards negative, your expression cannot detect the error because `Val` would be a very large number. Can you handle this case as well?
https://reviews.llvm.org/D27712
More information about the llvm-commits
mailing list