binutils on mingw/mingw64 large files (>2GB) support
Vladimir Simonov
sv@sw.ru
Thu Dec 30 18:01:00 GMT 2010
Hi,
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.
Trying to fix the problem I've found that it is not
too easy - we have either:
1. add re-definitions for off_t, stat, fstat, etc. in
all places including <sys/stat.h>
or
2. replace off_t, stat, fstat with bn_off_t, bn_stat,
bn_fstat (bn - means binutils) in all sources and "define"
them as 64-bit counterparts (stat64, fstat64) in config.h
(or some another include file) if we are on mingw,
else stay with (stat, fstat).
Yes, there is the 3-rd - wait for _FILE_OFFSET_BITS support
in mingw.
What do you think?
I'm using Binutils 2.21.
Thanks in advance
Vladimir Simonov
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: binutils-2.21-too-large-files.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20101230/dbd3692b/attachment.ksh>
More information about the Binutils
mailing list