[ELF] Allow output section data commands to take expressions
authorMeador Inge <meadori@codesourcery.com>
Thu, 8 Dec 2016 23:21:30 +0000 (23:21 +0000)
committerMeador Inge <meadori@codesourcery.com>
Thu, 8 Dec 2016 23:21:30 +0000 (23:21 +0000)
commit95c7d8d2a7b02bf56132ca137f3960bd917ea84b
tree18d8db28bb7498822d34e75d34680097d946db17
parentb641aa3f14488af3ed6ee4d5cdc8aefe80a476c1
[ELF] Allow output section data commands to take expressions

The current implementation of the output section data store commands
can only handle integer literals, but it should really handle arbitrary
expressions [1].  This commit fixes that.

[1] https://sourceware.org/binutils/docs-2.27/ld/Output-Section-Data.html#Output-Section-Data

Differential Revision: https://reviews.llvm.org/D27561

llvm-svn: 289152
lld/ELF/LinkerScript.cpp
lld/ELF/LinkerScript.h
lld/test/ELF/linkerscript/data-commands.s