Date: Tue, 2 Apr 2002 17:51:55 -0800 From: Marcel Moolenaar <marcel@xcllnt.net> To: "David O'Brien" <obrien@FreeBSD.org> Cc: Poul-Henning Kamp <phk@critter.freebsd.dk>, Dag-Erling Smorgrav <des@ofug.org>, Robert Watson <rwatson@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/ia64/ia64 ia64dump.c Message-ID: <20020403015155.GB2462@athlon.pn.xcllnt.net> In-Reply-To: <20020402172009.A3970@dragon.nuxi.com> References: <xzpu1qtu8k2.fsf@flood.ping.uio.no> <34442.1017781370@critter.freebsd.dk> <20020403003200.GB315@dhcp01.pn.xcllnt.net> <20020402172009.A3970@dragon.nuxi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 02, 2002 at 05:20:09PM -0800, David O'Brien wrote: > On Tue, Apr 02, 2002 at 04:32:00PM -0800, Marcel Moolenaar wrote: > > On Tue, Apr 02, 2002 at 11:02:50PM +0200, Poul-Henning Kamp wrote: > > > > > > The format of the header is not architecture dependent, it is the > > > same 512 bytes of the same exact layout on all architectures. > > > > Correct. The endianness is trivially solved: > > You can also get this information from the ELF header itself. You need to interpret the dump header before you can seek to the start of the dump to read the ELF header. Hence, you already need to know the byte order before you can read the ELF header to get the byte order. On top of that, you would create a dependency on what a coredump looks like. This we should avoid, because the number of possibilities is too large to be ignored (ELF, non-ELF; 32-bit, 64-bit; LE, BE) Another approach is to write the dump header in network order and use ntohX. It doesn't really matter that much, as long as you can determine what the byte order is. BTW: I think that dumping in a fixed byte order is probably less troublesome for the kernel than it is for savecore to handle all possible by orders -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020403015155.GB2462>
