Implement proper symbol lookup in a collections of versions#972
Conversation
1606e81 to
f6c9960
Compare
40c6171 to
0db7271
Compare
|
Thanks to the nice integration done by @lapla-cogito, I can say the PR fixes 10 linker script related tests in Mold. |
|
Then this would allow us to remove those tests from |
|
Sorry for being late to the party. Not related to this PR, but maybe we should utf8-parse whole file at once with SIMD? For example, using https://github.com/rusticstuff/simdutf8 |
davidlattimore
left a comment
There was a problem hiding this comment.
From a performance perspective, what's most important to me is that we only pay costs if features are used. Validating that all symbols are valid UTF-8 in a single function call could be an interesting thing to experiment, however, we'd only really want to do that for links where we need UTF-8 validity, which I think is only when we have a version script with extern "C++". From some very limited performance testing that I just did, this PR fixes #978 - which makes sense, since we're now skipping demangling and UTF-8 validation unless we have match rules that need them. I'm happy for this to be merged, but will leave it to you.
That's great to have a few more tests passing and to have the builds that originally motivated this change working as well!
|
There is also https://github.com/marxin/wild/blob/5d1b3303fc8500a82cea9be51cde7bb76c6116ee/libwild/src/version_script.rs#L474 |
|
Good point, I forgot about the globbing. I'm somewhat tempted to make a create that matches glob patterns against bytes |
1f26397 to
e5c8987
Compare
Apparently, the matching logic for symbols in versions in more complex than we've got:
https://maskray.me/blog/2020-11-26-all-about-symbol-versioning#version-script