diff options
author | Nick Clifton <nickc@redhat.com> | 2014-04-30 11:30:14 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2014-04-30 11:30:14 +0000 |
commit | 179e25f0df0e8e6703be95ef7efa5819d6f3af7d (patch) | |
tree | e489f5b8da79eb824ab9440ed07a4800bcac20cd /libgloss/msp430 | |
parent | 6e062439422d50c4092b2e1b9815771c4a74c890 (diff) | |
download | newlib-179e25f0df0e8e6703be95ef7efa5819d6f3af7d.zip newlib-179e25f0df0e8e6703be95ef7efa5819d6f3af7d.tar.gz newlib-179e25f0df0e8e6703be95ef7efa5819d6f3af7d.tar.bz2 |
* msp430/Makefile.in (NOSYS_OBJS): Add unlink.o.
(SCRIPTS): Remove msp430F5438A-s.ld and msp430F5438A-s.ld.
* unlink.c: New file.
Diffstat (limited to 'libgloss/msp430')
-rw-r--r-- | libgloss/msp430/Makefile.in | 14 | ||||
-rw-r--r-- | libgloss/msp430/unlink.c | 25 |
2 files changed, 31 insertions, 8 deletions
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; +} + + |