On Wed, Mar 06, 2013 at 11:00:00AM -0500, Dave Anderson wrote:
----- Original Message -----
>
>
> ----- Original Message -----
> >
> > It just occured to me that we compile makedumpfile for ARM with following
> > flags:
> >
> > -D_FILE_OFFSET_BITS=64
> > -D_LARGEFILE_SOURCE
> > -D_LARGEFILE64_SOURCE
> >
> > and looks like crash doesn't have such flags set. Do you think setting
those
> > might help here?
>
> Crash does use -D_FILE_OFFSET_BITS=64 for all the 32-bit architectures.
>
> And it should be noted that the problem does not exist with natively-compiled
> ARM crash binaries.
>
> So the question is, would -D_LARGEFILE_SOURCE and -D_LARGEFILE64_SOURCE affect
> alignment when building on an x86/x86_64 host with "make target=ARM".
And the answer is: they don't make a difference.
I patched configure.c like this:
$ diff configure.c.orig configure.c
138c138
< #define TARGET_CFLAGS_ARM_ON_X86_64 "TARGET_CFLAGS=-m32
-D_FILE_OFFSET_BITS=64"
---
> #define TARGET_CFLAGS_ARM_ON_X86_64 "TARGET_CFLAGS=-m32
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
$
and built with "make target=ARM". And it fails the same way:
$ ./crash --osrelease /usr/dumps/ARM/vmdump.v3
crash: compressed kdump: cannot lseek dump vmcoreinfo
unknown
$ ./crash --log /usr/dumps/ARM/vmdump.v3
crash: /usr/dumps/ARM/vmdump.v3: no VMCOREINFO section
$
OK, thanks. Yeah, I suspected that it really doesn't make difference and now
both you and Jan confirmed that.
Anyway, I've got a patch that fixes things up in a much more
rational
manner than the first kludge/patch that I put into crash-6.1.3 for
header_version 3.
Good that this problem got solved :-)