From: LaMont Jones <lamont@security.hp.com>
To: Grant Grundler <grundler@cup.hp.com>
Cc: Parisc Linux <parisc-linux@thepuffingroup.com>, lamont@security.hp.com
Subject: Re: [parisc-linux] Missing directories from CVS
Date: Thu, 23 Sep 1999 12:58:52 -0600 [thread overview]
Message-ID: <19990923185853.4632E18708@security.hp.com> (raw)
In-Reply-To: Your message of "Thu, 23 Sep 1999 09:59:42 PDT." <199909231659.JAA29335@milano.cup.hp.com>
> And on this one "cc" gets picky about pointer math.
> Here's my diff for mkImage.c:
> < *entry_point = *(unsigned long*)(ptr + 6*sizeof(long));
> ---
> > *entry_point = *(unsigned long*)((char *)ptr + 6*sizeof(long));
OK, so I'm too lazy to go look... what type is ptr? I'd guess that
it's declared void*, since that's the only way the pointer math could
work in gcc and not in HP-cc.
> Any objections to committing this change?
> On second thought, both changes should be written as:
> *entry_point = ((unsigned long *)ptr)[6];
> and
> short magic = ((short *)ptr)[1];
How about just using filehdr.h, or copying struct header from it, and
using the real structure...? (I think we've released the format enough
that we could clone the structure, failing that:
struct header {
unsigned short magic;
short fill0;
long fill[5];
unsigned long entry_point;
};
will fit the bill quite nicely.
LaMont "I hate magic offsets" Jones
next prev parent reply other threads:[~1999-09-23 18:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-23 3:13 [parisc-linux] Missing directories from CVS Ryan Bradetich
1999-09-23 15:30 ` Grant Grundler
1999-09-23 16:59 ` Grant Grundler
1999-09-23 18:58 ` LaMont Jones [this message]
1999-09-24 8:13 ` Helge Deller
1999-09-24 14:44 ` LaMont Jones
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=19990923185853.4632E18708@security.hp.com \
--to=lamont@security.hp.com \
--cc=grundler@cup.hp.com \
--cc=parisc-linux@thepuffingroup.com \
/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.