[PATCH] D38846: [ELF] - Linkerscript: Fix issues with SUBALIGN.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 09:35:17 PDT 2017


grimar added inline comments.


================
Comment at: ELF/LinkerScript.cpp:881
+    if (CanUseDot)
       return {Ctx->OutSec, false, Dot - Ctx->OutSec->Addr, Loc};
     error(Loc + ": unable to get location counter value");
----------------
jhenderson wrote:
> Is Ctx always going to be available here? Was the old check redundant?
No, it was not redundant, and in this patch `Ctx` is always should be available when `CanUseDot` is set,
otherwise something is wrong.

For example it is not set outside `SECTIONS` command.


https://reviews.llvm.org/D38846





More information about the llvm-commits mailing list