]> git.ipfire.org Git - thirdparty/xz.git/commit
liblzma: Add ifunc implementation to crc64_fast.c.
authorLasse Collin <lasse.collin@tukaani.org>
Tue, 27 Jun 2023 14:05:23 +0000 (17:05 +0300)
committerJia Tan <jiat0218@gmail.com>
Tue, 27 Jun 2023 15:55:59 +0000 (23:55 +0800)
commitee44863ae88e377a5df10db007ba9bfadde3d314
treec3f534ebce92e9d561c51c1aa40c2254fdc7d18b
parentb72d21202402a603db6d512fb9271cfa83249639
liblzma: Add ifunc implementation to crc64_fast.c.

The ifunc method avoids indirection via the function pointer
crc64_func. This works on GNU/Linux and probably on FreeBSD too.
The previous __attribute((__constructor__)) method is kept for
compatibility with ELF platforms which do support ifunc.

The ifunc method has some limitations, for example, building
liblzma with -fsanitize=address will result in segfaults.
The configure option --disable-ifunc must be used for such builds.

Thanks to Hans Jansen for the original patch.
Closes: https://github.com/tukaani-project/xz/pull/53
src/liblzma/check/crc64_fast.c