This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [wip:binutils] Large corefile support
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: Andrew Cagney <ac131313 at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: 16 Jan 2004 23:50:40 -0500
- Subject: Re: [wip:binutils] Large corefile support
- References: <400877DC.3040108@redhat.com>
Andrew Cagney <ac131313@redhat.com> writes:
> - is requires --enable-64-bit-bfd
> A 32-bit BFD has a 32-bit signed file_ptr (limiting SEEK_SET to files
> up to 2gb). I think the only robust way of handling files larger than
> that 2gb is to require a 64-bit file_ptr (and hence
> --enable-64-bit-bfd).
It seems to me that we should try to avoid confusing whether the
target is 64-bits with the size of a file pointer on the host.
Admittedly the issue is confused now, because file_ptr is typedefed to
be bfd_signed_vma. But we don't need to perpetuate the confusion. I
think we should define file_ptr to be off_t or off64_t, and then
consistently use ftello or ftello64 and friends if they are available.
So I guess I would like to see a bit more to your patch--change the
definition of file_ptr, too. Despite the comment, we know how to set
the type based on host definitions tested by autoconf--see, e.g., the
handling of BFD_HOST_64_BIT.
Ian