bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/12525] gold SEGV linking libgcc_s.so.1 on Solaris 11/x86


From: ro at CeBiTec dot Uni-Bielefeld.DE
Subject: [Bug gold/12525] gold SEGV linking libgcc_s.so.1 on Solaris 11/x86
Date: Fri, 4 Mar 2011 14:49:00 +0000

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]