This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Patch for bfd/cache.c - explicit cast to void*


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





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]