From a0cc68687f1281cd75ccf165d2c92322287a7bec Mon Sep 17 00:00:00 2001 From: Yonghong Song Date: Wed, 17 Nov 2021 12:22:24 -0800 Subject: [PATCH] dutil: Move DW_TAG_LLVM_annotation definition to dutil.h Move DW_TAG_LLVM_annotation definition from dwarf_load.c to dutil.h as it will be used later for btf_encoder.c. There is no functionality change for this patch. Signed-off-by: Yonghong Song Acked-by: Andrii Nakryiko Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: bpf@vger.kernel.org Cc: dwarves@vger.kernel.org Cc: kernel-team@fb.com Signed-off-by: Arnaldo Carvalho de Melo --- dutil.h | 4 ++++ dwarf_loader.c | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dutil.h b/dutil.h index 25691ea..e45bba0 100644 --- a/dutil.h +++ b/dutil.h @@ -31,6 +31,10 @@ #define roundup(x,y) ((((x) + ((y) - 1)) / (y)) * (y)) +#ifndef DW_TAG_LLVM_annotation +#define DW_TAG_LLVM_annotation 0x6000 +#endif + static inline __attribute__((const)) bool is_power_of_2(unsigned long n) { return (n != 0 && ((n & (n - 1)) == 0)); diff --git a/dwarf_loader.c b/dwarf_loader.c index cf005da..1b07a62 100644 --- a/dwarf_loader.c +++ b/dwarf_loader.c @@ -52,10 +52,6 @@ #define DW_OP_addrx 0xa1 #endif -#ifndef DW_TAG_LLVM_annotation -#define DW_TAG_LLVM_annotation 0x6000 -#endif - static pthread_mutex_t libdw__lock = PTHREAD_MUTEX_INITIALIZER; static uint32_t hashtags__bits = 12;