The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Diego Elio 'Flameeyes' Pettenò" <flameeyes@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] Fix build with KALLSYMS disabled.
Date: Fri, 25 Sep 2009 17:58:32 +0200	[thread overview]
Message-ID: <1253894312-17663-1-git-send-email-flameeyes@gmail.com> (raw)

With KALLSYMS disabled, but some debug features enabled, build will fail
because the layout_symtab function uses the wrong type for ELF headers, and
some variables are not declared. Fix that.

Signed-off-by: Diego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com>
---
 kernel/module.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
index 5a29397..8dc6017 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1992,7 +1992,7 @@ static inline unsigned long layout_symtab(struct module *mod,
 					  Elf_Shdr *sechdrs,
 					  unsigned int symindex,
 					  unsigned int strindex,
-					  const Elf_Hdr *hdr,
+					  const Elf_Ehdr *hdr,
 					  const char *secstrings,
 					  unsigned long *pstroffs,
 					  unsigned long *strmap)
@@ -2081,9 +2081,7 @@ static noinline struct module *load_module(void __user *umod,
 	struct module *mod;
 	long err = 0;
 	void *percpu = NULL, *ptr = NULL; /* Stops spurious gcc warning */
-#ifdef CONFIG_KALLSYMS
 	unsigned long symoffs, stroffs, *strmap;
-#endif
 	mm_segment_t old_fs;
 
 	DEBUGP("load_module: umod=%p, len=%lu, uargs=%p\n",
-- 
1.6.5.rc1


             reply	other threads:[~2009-09-25 15:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-25 15:58 Diego Elio 'Flameeyes' Pettenò [this message]
2009-09-25 16:14 ` [PATCH] Fix build with KALLSYMS disabled Paulo Marques
2009-09-25 16:17   ` Diego E. “Flameeyes” Pettenò

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1253894312-17663-1-git-send-email-flameeyes@gmail.com \
    --to=flameeyes@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox