Previously we were failed to parce complex expressions like:
foo : { *(SORT_BY_NAME(bar) zed) }
This is PR30442
Patch allows to handle them, for example the next grammar is parsed fine now:
.abc : { *(SORT(.foo.* EXCLUDE_FILE (*file1.o) .bar.*) .bar.*) }
Main idea of patch that globs and excludes can be wrapped in a SORT.
There is a difference in semanics of ld/gold:
ld likes:
*(SORT(EXCLUDE_FILE (*file1.o) .foo.1))
gold likes:
*(EXCLUDE_FILE (*file1.o) SORT(.foo.1))
Patch implements ld grammar.
So1 -> Sort1
RE is a common acronym for Regular Expression, but SO is not.