Skip to content

Commit 843cf70

Browse files
committed
perf symbols: Add fallback definitions for GELF_ST_VISIBILITY()
Those aren't present in Alpine Linux 3.4 to edge, so provide fallback defines to get the next patch building there keeping the build bisectable. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Nick Clifton <nickc@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lkml.kernel.org/n/tip-03cg3gya2ju4ba2x6ibb9fuz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 27b8e90 commit 843cf70

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tools/perf/util/symbol-elf.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,20 @@
1919
#define EM_AARCH64 183 /* ARM 64 bit */
2020
#endif
2121

22+
#ifndef ELF32_ST_VISIBILITY
23+
#define ELF32_ST_VISIBILITY(o) ((o) & 0x03)
24+
#endif
25+
26+
/* For ELF64 the definitions are the same. */
27+
#ifndef ELF64_ST_VISIBILITY
28+
#define ELF64_ST_VISIBILITY(o) ELF32_ST_VISIBILITY (o)
29+
#endif
30+
31+
/* How to extract information held in the st_other field. */
32+
#ifndef GELF_ST_VISIBILITY
33+
#define GELF_ST_VISIBILITY(val) ELF64_ST_VISIBILITY (val)
34+
#endif
35+
2236
typedef Elf64_Nhdr GElf_Nhdr;
2337

2438
#ifdef HAVE_CPLUS_DEMANGLE_SUPPORT

0 commit comments

Comments
 (0)