]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
compiler: Tweak __UNIQUE_ID() naming
authorJosh Poimboeuf <jpoimboe@kernel.org>
Wed, 17 Sep 2025 16:03:13 +0000 (09:03 -0700)
committerJosh Poimboeuf <jpoimboe@kernel.org>
Tue, 14 Oct 2025 21:45:21 +0000 (14:45 -0700)
In preparation for the objtool klp diff subcommand, add an underscore
between the name and the counter.  This will make it possible for
objtool to distinguish between the non-unique and unique parts of the
symbol name so it can properly correlate the symbols.

Acked-by: Petr Mladek <pmladek@suse.com>
Tested-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
include/linux/compiler.h

index 5b45ea7dff3e50160afc37d22f61b9d2146e15d4..6a32250f22f73e20437259a1c7b9d76cd19d0e40 100644 (file)
@@ -163,7 +163,11 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
        __asm__ ("" : "=r" (var) : "0" (var))
 #endif
 
-#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
+/* Format: __UNIQUE_ID_<name>_<__COUNTER__> */
+#define __UNIQUE_ID(name)                                      \
+       __PASTE(__UNIQUE_ID_,                                   \
+       __PASTE(name,                                           \
+       __PASTE(_, __COUNTER__)))
 
 /**
  * data_race - mark an expression as containing intentional data races