[patch, libgloss, mips] Add unlink, lseek, stat functions.

Steve Ellcey sellcey@mips.com
Tue Jul 9 23:15:00 GMT 2013

A while back I sent some email about adding ftruncate and chsize to libgloss
in order to fix some Fortran test failures I was getting when running the
GCC Fortran testsuite under the MIPS GNU simulator.  I have since realized that
while I may need those functions my more immediate problem was that some of
the system calls already defined in libgloss/syscall.h were not implemented
in the MIPS GNU simulator.  Specifically many tests failed due to a lack of
unlink, lseek, and stat.  This patch adds specially defined function
definitions for these entry points to the MIPS libgloss so that they can be
intercepted by the GNU simulator.  I have a second patch that I will submit
to gdb that actually implements the functionality in the simulator.   This
patch just makes sure that they are seen by the simulator so that it can
intercept and implement them.  Note that the numbers used in the definitions
do not match syscall.h and do not need to, they just need to match the
case statement in the GNU simulator that implements each of the calls.

OK for checkin?

Steve Ellcey

2013-07-09  Steve Ellcey  <sellcey@mips.com>

	* mips/idtmon.S (unlink, lseek, stat): Add new functions.

diff --git a/libgloss/mips/idtmon.S b/libgloss/mips/idtmon.S
index bb15388..304aaa4 100644
--- a/libgloss/mips/idtmon.S
+++ b/libgloss/mips/idtmon.S
@@ -39,6 +39,9 @@ INDIRECT(write,8)
 INDIRECT(get_mem_info,55)	/* expects pointer to three word vector */

More information about the Newlib mailing list