[PATCH] D21732: [ELF] Initial support for wildcard in symbol versions

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 27 23:45:57 PDT 2016


On Tue, Jun 28, 2016 at 7:59 AM, Davide Italiano <davide at freebsd.org> wrote:

> On Sun, Jun 26, 2016 at 2:22 AM, Rui Ueyama via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > ruiu added a comment.
> >
> > So a natural question to ask is how slow it is if you have symbol
> patterns that contain "*"? I'd appreciate if you run a benchmark.
> >
> > Also, how slow is it if you use matchStr function defined in
> LinkerScript.cpp?
> >
>
> I tried using matchStr (as there were wildcard matching in arbitrary
> places and also '?') and for libreoffice libraries build, the final time
> to link
> is around 1.1% slower with wildcard matching. I'd go for using
> matchStr for now, and probably refactor as NFC commit to improve
> performance if somebody really cares.
> Again, version scripts are not that frequent and wildcard matching in
> version scripts are even less so, so I'm not too worried about
> spending time optimizing this case.  If you agree, I'll produce a new
> version of the patch.


Please upload a new patch. I may have comments on details, but in general
I'd use matchStr because there's no fast way to do string matching in
general.

Also, do you have any suggestions about where
> matchStr should live now that linkerscript and version script code
> both use it?
>

Good question. There seems to be no good place to put this function. I'd
probably leave the function in LinkerScript.cpp and add function
declarations to both headers for now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160628/bf39442d/attachment.html>


More information about the llvm-commits mailing list