summaryrefslogtreecommitdiff
path: root/src/fundamental
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@gotplt.org>2023-01-07 19:30:32 -0500
committerDaan De Meyer <daan.j.demeyer@gmail.com>2023-01-08 16:26:39 +0100
commit4f79f545b3c46c358666c9f5f2b384fe50aac4b4 (patch)
treed97ae762c3e22c11bc2551616d1c103c564e9df5 /src/fundamental
parent9907a7e00b7c57f56020eeec3247e0f75799435d (diff)
downloadsystemd-4f79f545b3c46c358666c9f5f2b384fe50aac4b4.tar.gz
alloc-util: Disallow inlining of expand_to_usable
Explicitly set __attribute__ ((noinline)) so that the compiler does not attempt to inline expand_to_usable, even with LTO.
Diffstat (limited to 'src/fundamental')
-rw-r--r--src/fundamental/macro-fundamental.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/fundamental/macro-fundamental.h b/src/fundamental/macro-fundamental.h
index 9400c389ca..10ee46b9c1 100644
--- a/src/fundamental/macro-fundamental.h
+++ b/src/fundamental/macro-fundamental.h
@@ -20,6 +20,7 @@
#define _hidden_ __attribute__((__visibility__("hidden")))
#define _likely_(x) (__builtin_expect(!!(x), 1))
#define _malloc_ __attribute__((__malloc__))
+#define _noinline_ __attribute__((noinline))
#define _noreturn_ _Noreturn
#define _packed_ __attribute__((__packed__))
#define _printf_(a, b) __attribute__((__format__(printf, a, b)))