[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
Loading
Please sign in to comment