This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: Patch for bfd/cache.c - explicit cast to void*
- From: Jerker BÃck <jerker dot back at telia dot com>
- To: <binutils at sourceware dot org>
- Cc: "Dave Korn" <dave dot korn dot cygwin at googlemail dot com>
- Date: Mon, 2 Mar 2009 20:36:48 +0100
- Subject: RE: Patch for bfd/cache.c - explicit cast to void*
- References: <49a9869e.06e9300a.4fae.5455@mx.google.com> <48730.7338080884$1235899012@news.gmane.org> <m3ocwkygze.fsf@fleche.redhat.com> <49AB22DA.7020305@gmail.com> <000201c99b21$f34f8230$d9ee8690$@back@telia.com>
You are all right, the function do NOT need and should have an
explicit cast. Sorry for the fuzz, it was my doing all along.
David Korn's code snippet made me react and I can confirm there
is a bug. I'm having great difficulties with the size of long in BFD.
Interix have a LP64 long type - the only PE target with this?
It happens in bfd-in.h:
#define BFD_HOST_64_BI @BFD_HOST_64_BIT@
typedef @bfd_file_ptr@ file_ptr;
where configure assign the following to Interix:
BFD_HOST_64_BIT = long
which is correct since we have a LP64 long type. This gives
typedef long file_ptr;
which should be fine. But in practice it is not.
AFAIK, to get a functional 64bit compile of PE based binutils,
the long type needs to be 32bit (LLP64 model). So, I turned off
LP64 and switched to LLP64, => wrong type of file_ptr.
In my cvs source I've replaced all types in bfd*.h with types from
sys/types.h, so I didn't catch the bug there.
I hope to finally find out why a LP64 compile fails, then all
this will go away.
thanks
Jerker