[ELF] - Improve diagnostic messages for move location counter errors.

Previously LLD would error out just "ld.lld: error: unable to move location counter backward"
What does not really reveal the place of issue,
Patch adds location to the output.

Differential revision: https://reviews.llvm.org/D30187

llvm-svn: 295720
diff --git a/lld/ELF/LinkerScript.h b/lld/ELF/LinkerScript.h
index a3b9c12..8e5b67a 100644
--- a/lld/ELF/LinkerScript.h
+++ b/lld/ELF/LinkerScript.h
@@ -89,8 +89,9 @@
 
 // This represents ". = <expr>" or "<symbol> = <expr>".
 struct SymbolAssignment : BaseCommand {
-  SymbolAssignment(StringRef Name, Expr E)
-      : BaseCommand(AssignmentKind), Name(Name), Expression(E) {}
+  SymbolAssignment(StringRef Name, Expr E, std::string &&Loc)
+      : BaseCommand(AssignmentKind), Name(Name), Expression(E),
+        Location(std::move(Loc)) {}
 
   static bool classof(const BaseCommand *C);
 
@@ -104,6 +105,8 @@
   // Command attributes for PROVIDE, HIDDEN and PROVIDE_HIDDEN.
   bool Provide = false;
   bool Hidden = false;
+
+  std::string Location;
 };
 
 // Linker scripts allow additional constraints to be put on ouput sections.
@@ -278,7 +281,7 @@
   void assignSymbol(SymbolAssignment *Cmd, bool InSec = false);
   void addSymbol(SymbolAssignment *Cmd);
   void computeInputSections(InputSectionDescription *);
-  void setDot(Expr E, bool InSec = false);
+  void setDot(Expr E, const Twine &Loc, bool InSec = false);
 
   void discard(ArrayRef<InputSectionBase<ELFT> *> V);