All of lore.kernel.org
 help / color / mirror / Atom feed
From: ext-mika.1.westerberg@nokia.com (Mika Westerberg)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 07/10] arm: allow passing an ELF64 header to elf_check_arch()
Date: Tue, 30 Mar 2010 10:11:24 +0300	[thread overview]
Message-ID: <20100330071124.GD31448@esdhcp04058.research.nokia.com> (raw)
In-Reply-To: <20100329211208.GE28468@n2100.arm.linux.org.uk>

On Mon, Mar 29, 2010 at 11:12:08PM +0200, ext Russell King - ARM Linux wrote:
> On Mon, Mar 29, 2010 at 12:26:33PM +0300, Mika Westerberg wrote:
> > This is needed to shut following compiler warning when CONFIG_PROC_VMCORE is
> > enabled:
> > 
> > fs/proc/vmcore.c: In function 'parse_crash_elf64_headers':
> > fs/proc/vmcore.c:500: warning: passing argument 1 of 'elf_check_arch' from
> > incompatible pointer type
> > 
> > ELF32 and ELF64 headers have common fields of same size (namely e_ident and
> > e_machine) which are checked in arm_elf_check_arch().
> 
> A smaller patch:
> 
> -#define elf_check_arch elf_check_arch
> +#define elf_check_arch(x) elf_check_arch((const struct elf32_hdr *)(x))

With this I get:

arch/arm/kernel/elf.c:7: error: expected declaration specifiers or '...' before
'(' token
arch/arm/kernel/elf.c: In function 'elf_check_arch':
arch/arm/kernel/elf.c:8: error: number of arguments doesn't match prototype
/home/westeri/devel/maemo/linux/linux-2.6/arch/arm/include/asm/elf.h:95: error:
prototype declaration
arch/arm/kernel/elf.c:12: error: 'x' undeclared (first use in this function)
arch/arm/kernel/elf.c:12: error: (Each undeclared identifier is reported only
once
arch/arm/kernel/elf.c:12: error: for each function it appears in.)
make[1]: *** [arch/arm/kernel/elf.o] Error 1
make: *** [arch/arm/kernel] Error 2

That's why I changed name of the function to arm_elf_check_arch().

Thanks,
MW

  reply	other threads:[~2010-03-30  7:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-29  9:26 [RFC 00/10] Initial implementation of kdump for ARM Mika Westerberg
2010-03-29  9:26 ` [RFC 01/10] arm: kdump: reserve memory for crashkernel Mika Westerberg
2010-03-29  9:26   ` [RFC 02/10] arm: kdump: implement crash_setup_regs() Mika Westerberg
2010-03-29  9:26     ` [RFC 03/10] arm: kdump: implement machine_crash_shutdown() Mika Westerberg
2010-03-29  9:26       ` [RFC 04/10] arm: kdump: skip indirection page when crashing Mika Westerberg
2010-03-29  9:26         ` [RFC 05/10] arm: kdump: make kexec work in interrupt context Mika Westerberg
2010-03-29  9:26           ` [RFC 06/10] arm: kdump: implement copy_oldmem_page() Mika Westerberg
2010-03-29  9:26             ` [RFC 07/10] arm: allow passing an ELF64 header to elf_check_arch() Mika Westerberg
2010-03-29  9:26               ` [RFC 08/10] arm: kdump: add support for elfcorehdr= parameter Mika Westerberg
2010-03-29  9:26                 ` [RFC 09/10] arm: implement reserve memory early parameter Mika Westerberg
2010-03-29  9:26                   ` [RFC 10/10] arm: kdump: add CONFIG_CRASH_DUMP Kconfig option Mika Westerberg
2010-04-12 21:05                   ` [RFC 09/10] arm: implement reserve memory early parameter Russell King - ARM Linux
2010-04-13  6:37                     ` Mika Westerberg
2010-04-15 12:40                     ` Mika Westerberg
2010-03-29 21:12               ` [RFC 07/10] arm: allow passing an ELF64 header to elf_check_arch() Russell King - ARM Linux
2010-03-30  7:11                 ` Mika Westerberg [this message]
2010-03-29 23:41               ` Jamie Lokier
2010-03-30  7:26                 ` Mika Westerberg
2010-03-30 11:41                   ` Jamie Lokier
2010-04-12 20:03           ` [RFC 05/10] arm: kdump: make kexec work in interrupt context Russell King - ARM Linux
2010-04-12 20:01     ` [RFC 02/10] arm: kdump: implement crash_setup_regs() Russell King - ARM Linux
2010-04-13  5:53       ` Mika Westerberg

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=20100330071124.GD31448@esdhcp04058.research.nokia.com \
    --to=ext-mika.1.westerberg@nokia.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.