Scripts can contain something like:
KEEP (*crtbegin.o(.ctors))
What means that "*crtbegin.o" is a wildcard of file to take the sections from.
This is some kind of opposite to EXCLUDE_FILE and used in FreeBSD script:
https://svnweb.freebsd.org/base/head/sys/conf/ldscript.amd64?revision=284870&view=markup#l122
Patch implements this.
Patch partially relies on changes from D22749 that changed the way of parsing
LS script a bit. So I would suggest to start reviewing from D22749 and
then I can rebase this one.
I'd name FilePattern and rename Patterns SectionPatterns.