summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/genelf.h
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2018-10-17 06:15:45 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-10-18 16:16:38 +0200
commitd87b9790b3deb7601872d34fd05af3da78147583 (patch)
treedde22559afa59e0e3b979335b11a11709b29bfef /tools/perf/util/genelf.h
parentperf annotate: Add Sparc support (diff)
downloadlinux-d87b9790b3deb7601872d34fd05af3da78147583.tar.xz
linux-d87b9790b3deb7601872d34fd05af3da78147583.zip
perf jitdump: Add Sparc support.
Signed-off-by: David S. Miller <davem@davemloft.net> Link: http://lkml.kernel.org/r/20181016.211545.1487970139012324624.davem@davemloft.net Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/genelf.h')
-rw-r--r--tools/perf/util/genelf.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/genelf.h b/tools/perf/util/genelf.h
index de322d51c7fe..b72440bf9a79 100644
--- a/tools/perf/util/genelf.h
+++ b/tools/perf/util/genelf.h
@@ -29,6 +29,12 @@ int jit_add_debug_info(Elf *e, uint64_t code_addr, void *debug, int nr_debug_ent
#elif defined(__powerpc__)
#define GEN_ELF_ARCH EM_PPC
#define GEN_ELF_CLASS ELFCLASS32
+#elif defined(__sparc__) && defined(__arch64__)
+#define GEN_ELF_ARCH EM_SPARCV9
+#define GEN_ELF_CLASS ELFCLASS64
+#elif defined(__sparc__)
+#define GEN_ELF_ARCH EM_SPARC
+#define GEN_ELF_CLASS ELFCLASS32
#else
#error "unsupported architecture"
#endif