diff options
author | Michael Matz <matz@suse.de> | 2022-11-22 15:24:14 +0100 |
---|---|---|
committer | Michael Matz <matz@suse.de> | 2022-11-28 16:30:08 +0100 |
commit | 049522cae9798e51dd0c58566a9a2c61ba9100a9 (patch) | |
tree | 9f52da3bef2bf8cb80d907fb7b026af755c9164d /ld/ld.h | |
parent | 4a6bdfb9baa27e29151c7e97ae2abbe902f53638 (diff) | |
download | binutils-049522cae9798e51dd0c58566a9a2c61ba9100a9.zip binutils-049522cae9798e51dd0c58566a9a2c61ba9100a9.tar.gz binutils-049522cae9798e51dd0c58566a9a2c61ba9100a9.tar.bz2 |
Special case more simple patterns
fnmatch is slow, so avoiding it in more cases is good. This implements
a more generic version of match_simple_wild which needs some
pre-processing of patterns. In particular it supports patterns of the
form PREFIX*SUFFIX (where all parts are optional), i.e. a super set of
what's handled now. Most section matchers of this form and hence don't
need any calls to fnmatch anymore.
We retain the implementation of match_simple_wild for the filename
matchers (they aren't called often enough to matter).
Diffstat (limited to 'ld/ld.h')
-rw-r--r-- | ld/ld.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -98,8 +98,9 @@ struct wildcard_spec { const char *name; struct name_list *exclude_name_list; - sort_type sorted; struct flag_info *section_flag_list; + size_t namelen, prefixlen, suffixlen; + sort_type sorted; }; struct wildcard_list |