aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libgloss/ChangeLog6
-rw-r--r--libgloss/msp430/Makefile.in14
-rw-r--r--libgloss/msp430/unlink.c25
3 files changed, 37 insertions, 8 deletions
diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog
index 5770b5e..02949f8 100644
--- a/libgloss/ChangeLog
+++ b/libgloss/ChangeLog
@@ -1,3 +1,9 @@
+2014-04-30 Nick Clifton <nickc@redhat.com>
+
+ * msp430/Makefile.in (NOSYS_OBJS): Add unlink.o.
+ (SCRIPTS): Remove msp430F5438A-s.ld and msp430F5438A-s.ld.
+ * unlink.c: New file.
+
2014-04-04 Ashish Kapania <akapania@ti.com>
* arm/configure.in: (*-*-tirtos*) Accept TIRTOS target when setting
diff --git a/libgloss/msp430/Makefile.in b/libgloss/msp430/Makefile.in
index 4d09810..57c7f10 100644
--- a/libgloss/msp430/Makefile.in
+++ b/libgloss/msp430/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (c) 2008, 2009, 2011, 2013 Red Hat, Inc. All rights reserved.
+# Copyright (c) 2008-2014 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the BSD
@@ -56,14 +56,15 @@ OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
then echo ${objroot}/../binutils/objcopy ; \
else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
-SCRIPTS = $(srcdir)/msp430.ld $(srcdir)/msp430-sim.ld
+SCRIPTS = $(srcdir)/msp430.ld
+SCRIPTS += $(srcdir)/msp430-sim.ld
SCRIPTS += $(srcdir)/msp430xl-sim.ld
-SCRIPTS += $(srcdir)/msp430F5438A-s.ld
-SCRIPTS += $(srcdir)/msp430F5438A-l.ld
+SCRIPTS += $(srcdir)/intr_vectors.ld
CRT = gcrt0.o crt0.o crt0-minrt.o crtn.o crtn-minrt.o
SIM_BSP = libsim.a
LIBNOSYS = libnosys.a
+LIB_CRT = libcrt.a
SIM_OBJS = syscalls.o \
cio.o \
@@ -73,12 +74,9 @@ SIM_OBJS = syscalls.o \
NOSYS_OBJS = nosyscalls.o \
cio.o \
write.o \
+ unlink.o \
sbrk.o
-SCRIPTS += $(srcdir)/intr_vectors.ld
-
-LIB_CRT = libcrt.a
-
# Each crt_*.o is built from crt0.S using -DL*. crt0.o is built from
# crt0.s with -DL0 via the default rule below.
CRT_OBJS = \
diff --git a/libgloss/msp430/unlink.c b/libgloss/msp430/unlink.c
new file mode 100644
index 0000000..1c8c6f2
--- /dev/null
+++ b/libgloss/msp430/unlink.c
@@ -0,0 +1,25 @@
+#include <string.h>
+
+#include "cio.h"
+
+signed int
+unlink (const char * name)
+{
+ unsigned len = strlen (name);
+
+ if (len >= CIO_BUF_SIZE)
+ return -1;
+
+ __CIOBUF__.length[0] = len;
+ __CIOBUF__.length[1] = len >> 8;
+ __CIOBUF__.parms[0] = CIO_UNLINK;
+ __CIOBUF__.parms[1] = len;
+ __CIOBUF__.parms[2] = len >> 8;
+ memcpy (__CIOBUF__.buf, name, len);
+
+ _libgloss_cio_hook ();
+
+ return __CIOBUF__.parms[0] + __CIOBUF__.parms[1] * 256;
+}
+
+