3 ms·
Wouldn’t that mean having distinct hashes for every library? If so, that means you would have to, somehow, serialize the hash function inside each library and p
by Someone 6y ago
Wouldn’t that mean having distinct hashes for every library? If so, that means you would have to, somehow, serialize the hash function inside each library and provide an efficient way to compute hashes.
It also would mean having to hash each function name multiple times during linking (once for each library searched until you got a hit)
Also, I think you would have to change the hash function (almost) every time a symbol is added to a library, but that isn’t a show stopper. In the end, the linker will compare strings, anyways.
- dividuum 6y agoThanks for you response. It would mean that, but if I understand the code at https://sourceware.org/git/?p=glibc.git;a=blob;f=elf/dl-lookup.c;h=3d2369dbf2b7ca219eaf80a820e2a8e1329fbf50;hb=HEAD#l364 https://sourceware.org/git/?p=glibc.git;a=blob;f=elf/dl-look... correctly, linear search through all mapped libraries happens already.