http://sourceware.org/bugzilla/show_bug.cgi?id=12525
--- Comment #8 from Rainer Orth <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-03-04 14:48:43 UTC --- > --- Comment #7 from Ian Lance Taylor <ian at airs dot com> 2011-03-03 > 16:39:12 UTC --- > The intention of the code is that the file is guaranteed to be large enough by > the call to posix_fallocate in Output_file::map_no_anonymous. Does Solaris > have posix_fallocate? If it does, does it actually grow the file? It does, starting from Solaris 11. Looking at truss output, I see this: 1813: fcntl(109, F_ALLOCSP64, 0x08043D30) Err#22 EINVAL 1813: typ=F_WRLCK whence=SEEK_SET start=1686135440932864 len=-75608896336560128 sys=134509716 pid=144176112 which, according to the OpenSolaris sources, is called from posix_fallocate. fcntl expects a struct flock64 here, or struct flock for the F_ALLOCSP case. What seems to be happening is this: for a largefile environment, <fcntl.h> has #pragma redefine_extname posix_fallocate posix_fallocate64 and extern int posix_fallocate64(int, off64_t, off64_t); I can see that gold has a reference to posix_fallocate64, but suspect that the second and third args are still off_t, not off64_t. > If Solaris does not have posix_fallocate, the configure script should detect > that, and cause gold to provide a simple implementation, at the top of > output.cc, which calls ftruncate and hopes for the best. Does Solaris provide > ftruncate? If it does, does it actually grow the file? ftruncate() is present at least as far back as Solaris 8. According to the man page, it does grow files. Rainer -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils