[ELF] - Linkerscript: support MIN and MAX.
authorGeorge Rimar <grimar@accesssoftek.com>
Wed, 28 Mar 2018 11:33:00 +0000 (11:33 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Wed, 28 Mar 2018 11:33:00 +0000 (11:33 +0000)
commitfd11560f6e6ae03c3026f25956339c81c627408d
tree4896cc3b51d9f9e9909d31ed19f24bc96778d521
parentcdac172e2a6d8b1efc130ede138e157e21568c85
[ELF] - Linkerscript: support MIN and MAX.

Sample for the OVERLAY command from the spec
(https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Using_ld_the_GNU_Linker/sections.html)
uses MAX command that we do not support currently:

. = 0x1000 + MAX (SIZEOF (.text0), SIZEOF (.text1));

This patch implements support for MIN and MAX.

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

llvm-svn: 328696
lld/ELF/ScriptParser.cpp
lld/test/ELF/linkerscript/operators.test