[LinkerScript] Implement linker script expression evaluation
authorRafael Auler <rafaelauler@gmail.com>
Mon, 9 Mar 2015 21:43:35 +0000 (21:43 +0000)
committerRafael Auler <rafaelauler@gmail.com>
Mon, 9 Mar 2015 21:43:35 +0000 (21:43 +0000)
commitad11d4c1961cc55c96f735659edaa96a55938678
tree131cfbf36f8caefedb6f354a6984b63a3c00889d
parentd157e195620ae9047129d705b5a9f93cf2a20b0b
[LinkerScript] Implement linker script expression evaluation

The expression evaluation is needed when interpreting linker scripts, in order
to calculate the value for new symbols or to determine a new position to load
sections in memory. This commit extends Expression nodes from the linker script
AST with evaluation functions, and also contains a unit test.

http://reviews.llvm.org/D8156

llvm-svn: 231707
lld/include/lld/Core/Error.h
lld/include/lld/ReaderWriter/ELFLinkingContext.h
lld/include/lld/ReaderWriter/LinkerScript.h
lld/lib/Core/Error.cpp
lld/lib/ReaderWriter/LinkerScript.cpp
lld/unittests/DriverTests/GnuLdDriverTest.cpp