* [PATCH] perf symbol: Include elf.h header regardless LIBELF_SUPPORT
@ 2012-12-28 7:16 Namhyung Kim
2013-01-02 15:11 ` Jiri Olsa
2013-01-25 11:31 ` [tip:perf/core] perf symbols: " tip-bot for Namhyung Kim
0 siblings, 2 replies; 3+ messages in thread
From: Namhyung Kim @ 2012-12-28 7:16 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, LKML, Namhyung Kim,
Jiri Olsa, David Ahern
From: Namhyung Kim <namhyung.kim@lge.com>
The elf.h header file is used for NO_LIBELF build too so it should be
included anyway. Also remove duplicated include of the header file in
symbol-*.c. This patch fixes following build error on NO_LIBELF build:
CC tests/hists_link.o
tests/hists_link.c: In function ‘setup_fake_machine’:
tests/hists_link.c:132:8: error: ‘STB_GLOBAL’ undeclared (first use in this function)
tests/hists_link.c:132:8: note: each undeclared identifier is reported only once for each function it appears in
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/util/symbol-elf.c | 3 ---
tools/perf/util/symbol-minimal.c | 1 -
tools/perf/util/symbol.h | 2 +-
3 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index f63557b59c06..54efcb5659ac 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -1,6 +1,3 @@
-#include <libelf.h>
-#include <gelf.h>
-#include <elf.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
diff --git a/tools/perf/util/symbol-minimal.c b/tools/perf/util/symbol-minimal.c
index 259f8f2ea9c9..a7390cde63bc 100644
--- a/tools/perf/util/symbol-minimal.c
+++ b/tools/perf/util/symbol-minimal.c
@@ -1,6 +1,5 @@
#include "symbol.h"
-#include <elf.h>
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index ec7b2405c377..d97377ac2f16 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -16,8 +16,8 @@
#ifdef LIBELF_SUPPORT
#include <libelf.h>
#include <gelf.h>
-#include <elf.h>
#endif
+#include <elf.h>
#include "dso.h"
--
1.7.11.7
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] perf symbol: Include elf.h header regardless LIBELF_SUPPORT
2012-12-28 7:16 [PATCH] perf symbol: Include elf.h header regardless LIBELF_SUPPORT Namhyung Kim
@ 2013-01-02 15:11 ` Jiri Olsa
2013-01-25 11:31 ` [tip:perf/core] perf symbols: " tip-bot for Namhyung Kim
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Olsa @ 2013-01-02 15:11 UTC (permalink / raw)
To: Namhyung Kim
Cc: Arnaldo Carvalho de Melo, Peter Zijlstra, Paul Mackerras,
Ingo Molnar, LKML, Namhyung Kim, David Ahern
On Fri, Dec 28, 2012 at 04:16:49PM +0900, Namhyung Kim wrote:
> From: Namhyung Kim <namhyung.kim@lge.com>
>
> The elf.h header file is used for NO_LIBELF build too so it should be
> included anyway. Also remove duplicated include of the header file in
> symbol-*.c. This patch fixes following build error on NO_LIBELF build:
>
> CC tests/hists_link.o
> tests/hists_link.c: In function ‘setup_fake_machine’:
> tests/hists_link.c:132:8: error: ‘STB_GLOBAL’ undeclared (first use in this function)
> tests/hists_link.c:132:8: note: each undeclared identifier is reported only once for each function it appears in
>
> Cc: Jiri Olsa <jolsa@redhat.com>
> Cc: David Ahern <dsahern@gmail.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:perf/core] perf symbols: Include elf.h header regardless LIBELF_SUPPORT
2012-12-28 7:16 [PATCH] perf symbol: Include elf.h header regardless LIBELF_SUPPORT Namhyung Kim
2013-01-02 15:11 ` Jiri Olsa
@ 2013-01-25 11:31 ` tip-bot for Namhyung Kim
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Namhyung Kim @ 2013-01-25 11:31 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, paulus, hpa, mingo, a.p.zijlstra,
namhyung.kim, namhyung, jolsa, dsahern, tglx
Commit-ID: eec185ab603fab3b7b5021e840cf4b282c4c7e6b
Gitweb: http://git.kernel.org/tip/eec185ab603fab3b7b5021e840cf4b282c4c7e6b
Author: Namhyung Kim <namhyung.kim@lge.com>
AuthorDate: Fri, 28 Dec 2012 16:16:49 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 24 Jan 2013 16:40:18 -0300
perf symbols: Include elf.h header regardless LIBELF_SUPPORT
The elf.h header file is used for NO_LIBELF build too so it should be
included anyway. Also remove duplicated include of the header file in
symbol-*.c. This patch fixes following build error on NO_LIBELF build:
CC tests/hists_link.o
tests/hists_link.c: In function ‘setup_fake_machine’:
tests/hists_link.c:132:8: error: ‘STB_GLOBAL’ undeclared (first use in this function)
tests/hists_link.c:132:8: note: each undeclared identifier is reported only once for each function it appears in
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1356679009-32122-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/symbol-elf.c | 3 ---
tools/perf/util/symbol-minimal.c | 1 -
tools/perf/util/symbol.h | 2 +-
3 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index f63557b..54efcb5 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -1,6 +1,3 @@
-#include <libelf.h>
-#include <gelf.h>
-#include <elf.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
diff --git a/tools/perf/util/symbol-minimal.c b/tools/perf/util/symbol-minimal.c
index 259f8f2..a7390cd 100644
--- a/tools/perf/util/symbol-minimal.c
+++ b/tools/perf/util/symbol-minimal.c
@@ -1,6 +1,5 @@
#include "symbol.h"
-#include <elf.h>
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index ec7b240..d97377a 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -16,8 +16,8 @@
#ifdef LIBELF_SUPPORT
#include <libelf.h>
#include <gelf.h>
-#include <elf.h>
#endif
+#include <elf.h>
#include "dso.h"
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-25 11:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-28 7:16 [PATCH] perf symbol: Include elf.h header regardless LIBELF_SUPPORT Namhyung Kim
2013-01-02 15:11 ` Jiri Olsa
2013-01-25 11:31 ` [tip:perf/core] perf symbols: " tip-bot for Namhyung Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox