From: Richard Mortimer <richm@oldelvet.org.uk>
To: sparclinux@vger.kernel.org
Subject: Re: SILO 1.4.10
Date: Tue, 03 Jan 2006 21:52:07 +0000 [thread overview]
Message-ID: <1136325128.9950.79.camel@duncow> (raw)
In-Reply-To: <1136175018.27583.50.camel@grayson>
On Tue, 2006-01-03 at 12:50 -0800, David S. Miller wrote:
> From: Jim Gifford <maillist@jg555.com>
> Date: Tue, 03 Jan 2006 09:39:19 -0800
>
> > So we have 2 potential issues
> >
> > 1 - elftoaout is not creating proper files when it's compiled as 64bit
> > 2 - second.b is not being created properly
>
> It's probably just some 64-bit arithmatic coding error
> in elftoaout that only gets triggered by the second.b
> image and not by most other uses of the utility.
>
I just took at quick look at the Debian elftoaout sources and the a.out
Exec header definition uses unsigned long to hold the values. These will
have the wrong size when compiled 64 bit. I tried changing it to
unsigned int and the 64 bit version now produces the same output as the
32 bit one when tested against a vmlinux that I had hanging around.
Patch below.
Richard
--- sparc-utils-1.9/elftoaout-2.3/elftoaout.c.orig 2006-01-03 21:11:05.000000000 +0000
+++ sparc-utils-1.9/elftoaout-2.3/elftoaout.c 2006-01-03 21:16:20.000000000 +0000
@@ -37,14 +37,14 @@
#define CMAGIC 0x01030108
typedef struct {
- unsigned long a_magic; /* magic number */
- unsigned long a_text; /* size of text segment */
- unsigned long a_data; /* size of initialized data */
- unsigned long a_bss; /* size of uninitialized data */
- unsigned long a_syms; /* size of symbol table || checksum */
- unsigned long a_entry; /* entry point */
- unsigned long a_trsize; /* size of text relocation */
- unsigned long a_drsize; /* size of data relocation */
+ unsigned int a_magic; /* magic number */
+ unsigned int a_text; /* size of text segment */
+ unsigned int a_data; /* size of initialized data */
+ unsigned int a_bss; /* size of uninitialized data */
+ unsigned int a_syms; /* size of symbol table || checksum */
+ unsigned int a_entry; /* entry point */
+ unsigned int a_trsize; /* size of text relocation */
+ unsigned int a_drsize; /* size of data relocation */
} Exec;
--
Richard Mortimer <richm@oldelvet.org.uk>
next prev parent reply other threads:[~2006-01-03 21:52 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-02 4:10 SILO 1.4.10 Ben Collins
2006-01-02 21:34 ` Jim Gifford
2006-01-02 22:05 ` Ben Collins
2006-01-02 22:05 ` Tom 'spot' Callaway
2006-01-02 22:12 ` Jim Gifford
2006-01-02 22:44 ` Ben Collins
2006-01-02 22:51 ` Jim Gifford
2006-01-02 23:09 ` Ben Collins
2006-01-02 23:58 ` Jim Gifford
2006-01-03 0:55 ` Ben Collins
2006-01-03 2:53 ` Jim Gifford
2006-01-03 3:22 ` Ben Collins
2006-01-03 15:43 ` Jim Gifford
2006-01-03 17:39 ` Jim Gifford
2006-01-03 20:50 ` David S. Miller
2006-01-03 21:38 ` David S. Miller
2006-01-03 21:52 ` Richard Mortimer [this message]
2006-01-03 22:08 ` David S. Miller
2006-01-03 22:31 ` Jim Gifford
2006-01-03 22:31 ` Jim Gifford
2006-02-10 21:03 ` Silo 1.4.10 Joe Ciccone
2006-02-10 22:44 ` David S. Miller
2006-02-11 0:32 ` Joe Ciccone
2006-02-12 13:14 ` Ben Collins
2006-03-07 1:12 ` Joe Ciccone
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=1136325128.9950.79.camel@duncow \
--to=richm@oldelvet.org.uk \
--cc=sparclinux@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 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.