[all-commits] [llvm/llvm-project] bb7d2b: [LLD][ELF] - Disambiguate "=fillexp" with a primar...
Georgii Rymar via All-commits
all-commits at lists.llvm.org
Thu Mar 19 02:51:35 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: bb7d2b178022e8590f483714bd9bafa9d3f86e24
https://github.com/llvm/llvm-project/commit/bb7d2b178022e8590f483714bd9bafa9d3f86e24
Author: Georgii Rymar <grimar at accesssoftek.com>
Date: 2020-03-19 (Thu, 19 Mar 2020)
Changed paths:
M lld/ELF/ScriptParser.cpp
M lld/test/ELF/linkerscript/sections-padding.s
Log Message:
-----------
[LLD][ELF] - Disambiguate "=fillexp" with a primary expression to allow =0x90 /DISCARD/
Fixes https://bugs.llvm.org/show_bug.cgi?id=44903
It is about the following case:
```
SECTIONS {
.foo : { *(.foo) } =0x90909090
/DISCARD/ : { *(.bar) }
}
```
Here while parsing the fill expression we treated the
"/" of "/DISCARD/" as operator.
With this change, suggested by Fangrui Song, we do
not allow expressions with operators (e.g. "0x1100 + 0x22")
that are not wrapped into round brackets. It should not
be an issue for users, but helps to resolve parsing ambiguity.
Differential revision: https://reviews.llvm.org/D74687
More information about the All-commits
mailing list