[ELF] - Linkerscript: implemented += operator.
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 28 Jul 2016 21:08:56 +0000 (21:08 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 28 Jul 2016 21:08:56 +0000 (21:08 +0000)
commit30835ea47a17f1a147bcda2d851e7c90bbbbfc18
tree7881197cde9e66a2ab601a8bfafd93f16291184a
parentad10c3d8d48565333b347aa8267c79105d39ac0c
[ELF] - Linkerscript: implemented += operator.

Sometimes += is used to move the location counter.
Example from the wild is:

.dbg_excpt _DBG_EXCPT_ADDR (NOLOAD) :
{
  . += (DEFINED (_DEBUGGER) ? 0x8 : 0x0);
https://github.com/chipKIT32/pic32-Arduino-USB-Bootloader-original/blob/master/boot-linkerscript.ld

Patch implements it and opens way for others type of assignments (-= *= etc), though I think only += is
actual to support.

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

llvm-svn: 277035
lld/ELF/LinkerScript.cpp
lld/test/ELF/linkerscript/linkerscript-locationcounter.s