public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ports/13109] New: On mips64, the statfs64() does not work.
@ 2011-08-19 6:27 rongqing.li at windriver dot com
2011-08-19 13:35 ` [Bug ports/13109] " rongqing.li at windriver dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: rongqing.li at windriver dot com @ 2011-08-19 6:27 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13109
Bug #: 13109
Summary: On mips64, the statfs64() does not work.
Product: glibc
Version: unspecified
Status: NEW
Severity: critical
Priority: P2
Component: ports
AssignedTo: roland@gnu.org
ReportedBy: rongqing.li@windriver.com
Classification: Unclassified
We should weak-alias statfs64 to statfs on mips64 as on x86_64
==================================
//This program does not work
main()
{
statfs64("/tmp", sfbuf);
}
==================================
//This program does not work when we define _FILE_OFFSET_BITS=64
#define _FILE_OFFSET_BITS=64
#include <*.h>
main()
{
statfs("/tmp", sfbuf);
}
==================================
//The below is elf information
-bash-3.2$ readelf -h ./mabi_64/libc.so
ELF Header:
Magic: 7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, big endian
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Shared object file)
Machine: MIPS R3000
Flags: 0x60000007, noreorder, pic, cpic, mips64
....
========================================
//The statfs and statfs64 have different offset, which means different function
//but on x86-64, the offset of statfs and statfs64 are same
-bash-3.2$ readelf -s ./mabi_64/libc.so |grep statfs
6746: 00000000000ee39c 28 FUNC GLOBAL DEFAULT 11 __statfs
6806: 00000000000ee400 8 FUNC WEAK DEFAULT 11 statfs64
6821: 00000000000ee39c 28 FUNC WEAK DEFAULT 11 statfs
-bash-3.2$ objdump -dS ./mabi_64/libc.so
00000000000ee39c <__statfs>:
ee39c: 2402140e li v0,5134
ee3a0: 0000000c syscall
ee3a4: 14e0fff6 bnez a3,ee380 <__fxstatat64+0xb0>
ee3a8: 00000000 nop
ee3ac: 03e00008 jr ra
ee3b0: 00000000 nop
...
ee3c0: 0380082d move at,gp
ee3c4: 3c1c000a lui gp,0xa
ee3c8: 279c6b14 addiu gp,gp,27412
ee3cc: 0399e02d daddu gp,gp,t9
ee3d0: df998588 ld t9,-31352(gp)
ee3d4: 03200008 jr t9
ee3d8: 0020e02d move gp,at
00000000000ee400 <statfs64>:
ee400: 03e00008 jr ra
ee404: 00000000 nop
...
=========================================================
The statfs64 in libc does not any work since the linux kernel
does not implement the statfs64 syscall when define _MIPS_SIM_ABI64,
the reason why statfs64 does not implement is that statfs
has equal function to statfs64 on mips64, I think.
=========================================================
On x86-64, statfs64 in libc has its true implementation since
the statfs64 syscall exist in kernel.
But in libc.so, it is weak-alias to statfs at last, not call
the true statfs64 syscall.
The below information comes from common_pc_64.
readelf -s libc-2.11.1.so |grep statfs
1241: 00000000000c2350 37 FUNC GLOBAL DEFAULT 11
__statfs@@GLIBC_2.2.5
1564: 00000000000c2350 37 FUNC WEAK DEFAULT 11 statfs@@GLIBC_2.2.5
1761: 00000000000c2350 37 FUNC WEAK DEFAULT 11
statfs64@@GLIBC_2.2.5
====================================================
I think the mips64 should have the same result.
====================================================
when call make-syscalls.sh to configure the glibc, I found the
syscalls.list on ./sysdeps/unix/sysv/linux/wordsize-64/ never
be used.
--
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug ports/13109] On mips64, the statfs64() does not work.
2011-08-19 6:27 [Bug ports/13109] New: On mips64, the statfs64() does not work rongqing.li at windriver dot com
@ 2011-08-19 13:35 ` rongqing.li at windriver dot com
2011-11-16 21:48 ` jsm28 at gcc dot gnu.org
2014-06-13 14:34 ` fweimer at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: rongqing.li at windriver dot com @ 2011-08-19 13:35 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13109
--- Comment #1 from rongqing <rongqing.li at windriver dot com> 2011-08-19 13:35:09 UTC ---
I have sent a fix, could anyone review this fix?
http://sourceware.org/ml/libc-ports/2011-08/msg00008.html
--
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug ports/13109] On mips64, the statfs64() does not work.
2011-08-19 6:27 [Bug ports/13109] New: On mips64, the statfs64() does not work rongqing.li at windriver dot com
2011-08-19 13:35 ` [Bug ports/13109] " rongqing.li at windriver dot com
@ 2011-11-16 21:48 ` jsm28 at gcc dot gnu.org
2014-06-13 14:34 ` fweimer at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2011-11-16 21:48 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13109
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Joseph Myers <jsm28 at gcc dot gnu.org> 2011-11-16 21:48:03 UTC ---
I applied a different fix for this issue.
--
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug ports/13109] On mips64, the statfs64() does not work.
2011-08-19 6:27 [Bug ports/13109] New: On mips64, the statfs64() does not work rongqing.li at windriver dot com
2011-08-19 13:35 ` [Bug ports/13109] " rongqing.li at windriver dot com
2011-11-16 21:48 ` jsm28 at gcc dot gnu.org
@ 2014-06-13 14:34 ` fweimer at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 14:34 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=13109
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-13 14:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-19 6:27 [Bug ports/13109] New: On mips64, the statfs64() does not work rongqing.li at windriver dot com
2011-08-19 13:35 ` [Bug ports/13109] " rongqing.li at windriver dot com
2011-11-16 21:48 ` jsm28 at gcc dot gnu.org
2014-06-13 14:34 ` fweimer at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).