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: binutils on mingw/mingw64 large files (>2GB) support


On 01/06/2011 02:35 PM, Nick Clifton wrote:
Hi Vladimir,

objcopy built for mingw64 silently refuses to handle
files larger 2GB. The reason - mingw/mingw64 headers
(sys/stat.h) don't have _FILE_OFFSET_BITS magic.

The patch adding negative file size check is attached.

Thanks very much for submitting this patch. I have checked it in along with this changelog entry.

Cheers

binutils/ChangeLog
2011-01-06 Vladimir Siminov <sv@sw.ru>

* bucomm.c (get_file_size): Check for negative sizes and issue a
warning message if encountered.


Hi Nick,


Thank you.

This patch just reports about the problem.

The problem fix is still actual.
What to do if build system doesn't support
_FILE_OFFSET_BITS/_LARGEFILE_SOURCE and requires
explicit stat64/fstat64/etc usage?

I see the following solutions:
1. add re-definitions for off_t, stat, fstat, etc. in
all places right after <sys/stat.h>, may be special "include"
file;
2. replace off_t, stat, fstat with bn_off_t, bn_stat,
bn_fstat (bn - means binutils) in all sources and "define"
them as stat64, fstat64 in config.h (or some another include file)
if we are on mingw, else stay with (stat, fstat);
3. wait for _FILE_OFFSET_BITS support.

My question doesn't mean that I start to implement
such massive changes immediately. I just like to know
binutils developers opinion.

Best regards
Vladimir


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