1
1
mirror of https://github.com/rui314/mold.git synced 2024-10-04 16:48:04 +03:00
mold/test
Rui Ueyama d0c1c4db19 [ELF] Use Aho-Corasick algo to handle version script patternsC
To process version scriots, we have to match glob patterns against
symbol strings. Sometimes, we have hundreds or thousands of glob
patterns and have to match them against millions of mangled long
C++ symbol names. This step can be very slow.

In this patch, I implemented the Aho-Corasick algorithm to match glob
patterns to symbol strings as quickly as possible. For the details
of the algorithm, see https://en.wikipedia.org/wiki/Glob_(programming).

This patch improves mold's performance for programs that uses large
version scripts. For example, linking libQt6Gui.so.6.3.0 reduced from
1.10s to 0.05s with this patch.

This patch also changes how symbol versions are applied if two or more
version patterns match to a single symbol string. Previously, the last
one in a script file took precedence. Now, the first one takes
precedence. I believe the new behavior is compatible with GNU ld.

Fixes https://github.com/rui314/mold/issues/156
Fixed https://github.com/rui314/mold/issues/287
2022-01-21 20:30:05 +09:00
..
elf [ELF] Use Aho-Corasick algo to handle version script patternsC 2022-01-21 20:30:05 +09:00
macho Fix Mach-O tests 2022-01-07 18:12:40 +09:00
gentoo-test.sh Add lots of quotes to shell scripts 2021-12-29 22:18:19 +01:00
Makefile.darwin [Mach-O] Make make test to work on macOS 2021-09-28 18:47:24 +09:00
Makefile.linux [Mach-O] Make make test to work on macOS 2021-09-28 18:47:24 +09:00