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]

binutils on mingw/mingw64 large files (>2GB) support


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

Attachment: binutils-2.21-too-large-files.patch
Description: Text document


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