aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
Diffstat (limited to 'sim')
-rw-r--r--sim/ChangeLog9
-rw-r--r--sim/cris/traps.c20
2 files changed, 22 insertions, 7 deletions
diff --git a/sim/ChangeLog b/sim/ChangeLog
index 1a44d01..553d3bd 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -1,7 +1,14 @@
2009-01-03 Hans-Peter Nilsson <hp@axis.com>
+ * cris/traps.c (TARGET_UTSNAME): Update to 2009-01-01.
+ (TARGET_EPOCH): Update to match TARGET_UTSNAME. Correct comment.
+ (cris_break_13_handler) <case TARGET_SYS_uname>: Update to
+ 2.6.27. Set machine field to the BFD printable name of the
+ machine.
+
* cris/traps.c (TARGET_MAP_DENYWRITE): Define.
- <case TARGET_SYS_mmap2>: Handle TARGET_MAP_DENYWRITE.
+ (cris_break_13_handler) <case TARGET_SYS_mmap2>: Handle
+ TARGET_MAP_DENYWRITE.
* cris/traps.c (TARGET_SYS_access, TARGET_R_OK, TARGET_W_OK)
(TARGET_X_OK, TARGET_F_OK): Define.
diff --git a/sim/cris/traps.c b/sim/cris/traps.c
index ff70902..b11cd86 100644
--- a/sim/cris/traps.c
+++ b/sim/cris/traps.c
@@ -144,10 +144,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#define TARGET_TCGETS 0x5401
-#define TARGET_UTSNAME "#38 Sun Apr 1 00:00:00 MET 2001"
+#define TARGET_UTSNAME "#7 Thu Jan 1 00:00:00 MET 2009"
-/* Seconds since the above date + 10 minutes. */
-#define TARGET_EPOCH 986080200
+/* Seconds since 1970-01-01 to the above date + 10 minutes;
+ 'date -d "Thu Jan 1 00:00:10 MET 2009" +%s'. */
+#define TARGET_EPOCH 1230764410
/* Milliseconds since start of run. We use the number of syscalls to
avoid introducing noise in the execution time. */
@@ -1570,16 +1571,23 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
case TARGET_SYS_uname:
{
/* Fill in a few constants to appease glibc. */
- static const char sim_utsname[6][65] =
+ static char sim_utsname[6][65] =
{
"Linux",
"sim-target",
- "2.4.5",
+ "2.6.27",
TARGET_UTSNAME,
- "cris",
+ "cris", /* Overwritten below. */
"localdomain"
};
+ /* Having the hardware type in Linux equal to the bfd
+ printable name is deliberate: if you make config.guess
+ work on your Linux-type system the usual way, it
+ probably will; either the bfd printable_name or the
+ ambiguous arch_name. */
+ strcpy (sim_utsname[4], STATE_ARCHITECTURE (sd)->printable_name);
+
if ((s.write_mem) (cb, &s, arg1, (const char *) sim_utsname,
sizeof (sim_utsname))
!= sizeof (sim_utsname))