aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/check/crc32_fast.c
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2024-03-05 00:34:46 +0800
committerJia Tan <jiat0218@gmail.com>2024-03-05 00:34:46 +0800
commit4e1c97052b5f14f4d6dda99d12cbbd01e66e3712 (patch)
treecd28d0c0d5fb472596adaff9f36ed9686124ef38 /src/liblzma/check/crc32_fast.c
parentBuild: Require attribute no_profile_instrument_function for ifunc usage. (diff)
downloadxz-4e1c97052b5f14f4d6dda99d12cbbd01e66e3712.tar.xz
liblzma: Use attribute no_profile_instrument_function with ifunc.
Thanks to Sam James for determining this was the attribute needed to workaround the GCC bug and for his version of the patch in Gentoo.
Diffstat (limited to 'src/liblzma/check/crc32_fast.c')
-rw-r--r--src/liblzma/check/crc32_fast.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/liblzma/check/crc32_fast.c b/src/liblzma/check/crc32_fast.c
index 5e26914a..079051f1 100644
--- a/src/liblzma/check/crc32_fast.c
+++ b/src/liblzma/check/crc32_fast.c
@@ -135,6 +135,11 @@ typedef uint32_t (*crc32_func_type)(
// This resolver is shared between all three dispatch methods. It serves as
// the ifunc resolver if ifunc is supported, otherwise it is called as a
// regular function by the constructor or first call resolution methods.
+// The __no_profile_instrument_function__ attribute support is checked when
+// determining if ifunc can be used, so it is safe to use here.
+#ifdef CRC_USE_IFUNC
+__attribute__((__no_profile_instrument_function__))
+#endif
static crc32_func_type
crc32_resolve(void)
{