Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@in.ibm.com>
To: kexec@lists.infradead.org
Subject: Re: [PATCH] Determine ELF32/ELF64 automatically on i386
Date: Tue, 10 Jul 2007 11:22:59 +0530	[thread overview]
Message-ID: <20070710055259.GA5471@in.ibm.com> (raw)
In-Reply-To: <20070703161207.GA5070@suse.de>

On Tue, Jul 03, 2007 at 06:12:07PM +0200, Bernhard Walle wrote:
> On i386, kexec generates ELF64 core headers by default if the user doesn't
> override this via a command line option. Because GDB cannot analyse
> ELF64 core dumps on 32 bit platforms, it's a bad idea to use ELF64 if it's not
> needed.
> 
> This patch selects ELF32 if the biggest memory address fits in 32 bit address
> space, which should be the case on non PAE systems. If the user specifies
> a command line option, that option overrides the detection.
> 

Makes sense to me. No need to generate 64bit ELF headers on systems
having less than 4G of memory. gdb runs into issues with 64bit ELF headers
on 32bit machines.

> +++ b/kexec/arch/i386/kexec-x86.h
> @@ -2,8 +2,12 @@
>  #define KEXEC_X86_H
> 
>  #define MAX_MEMORY_RANGES 64
> -#define CORE_TYPE_ELF32 1
> -#define CORE_TYPE_ELF64 2
> +
> +enum CoreType {
> +	CORE_TYPE_UNDEF = 0,
> +	CORE_TYPE_ELF32 = 1,
> +	CORE_TYPE_ELF64 = 2
> +};
> 

I think we can avoid mixed case in "CoreType" and use something like
"coretype".

Thanks
Vivek

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2007-07-10  5:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-02 13:15 ELF64 header on i386 Bernhard Walle
2007-07-03  5:12 ` Maneesh Soni
2007-07-03 16:12 ` [PATCH] Determine ELF32/ELF64 automatically " Bernhard Walle
2007-07-10  5:52   ` Vivek Goyal [this message]
2007-07-10  8:23     ` Bernhard Walle
2007-07-27  5:12       ` Horms

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=20070710055259.GA5471@in.ibm.com \
    --to=vgoyal@in.ibm.com \
    --cc=kexec@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox