svn commit: r231066 - in projects/arm_eabi/lib/libc/arm: . aeabi

Andrew Turner andrew at FreeBSD.org
Mon Feb 6 08:50:42 UTC 2012


Author: andrew
Date: Mon Feb  6 08:50:41 2012
New Revision: 231066
URL: http://svn.freebsd.org/changeset/base/231066

Log:
  Add the ARM EABI changes required by libc

Added:
  projects/arm_eabi/lib/libc/arm/aeabi/
  projects/arm_eabi/lib/libc/arm/aeabi/Makefile.inc
  projects/arm_eabi/lib/libc/arm/aeabi/Symbol.map
  projects/arm_eabi/lib/libc/arm/aeabi/aeabi_atexit.c
  projects/arm_eabi/lib/libc/arm/aeabi/aeabi_unwind_cpp.c
Modified:
  projects/arm_eabi/lib/libc/arm/Makefile.inc

Modified: projects/arm_eabi/lib/libc/arm/Makefile.inc
==============================================================================
--- projects/arm_eabi/lib/libc/arm/Makefile.inc	Mon Feb  6 08:46:00 2012	(r231065)
+++ projects/arm_eabi/lib/libc/arm/Makefile.inc	Mon Feb  6 08:50:41 2012	(r231066)
@@ -11,3 +11,6 @@ SYM_MAPS+=${.CURDIR}/arm/Symbol.map
 
 # This contains the symbols that were removed when moving to the ARM EABI
 #SYM_MAPS+=${.CURDIR}/arm/Symbol_oabi.map
+
+.include "${.CURDIR}/arm/aeabi/Makefile.inc"
+

Added: projects/arm_eabi/lib/libc/arm/aeabi/Makefile.inc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/arm_eabi/lib/libc/arm/aeabi/Makefile.inc	Mon Feb  6 08:50:41 2012	(r231066)
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/arm/aeabi
+
+SRCS+=	aeabi_atexit.c		\
+	aeabi_unwind_cpp.c
+
+SYM_MAPS+=${.CURDIR}/arm/aeabi/Symbol.map
+

Added: projects/arm_eabi/lib/libc/arm/aeabi/Symbol.map
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/arm_eabi/lib/libc/arm/aeabi/Symbol.map	Mon Feb  6 08:50:41 2012	(r231066)
@@ -0,0 +1,12 @@
+/*
+ * $FreeBSD: projects/arm_eabi/lib/libc/arm/Symbol.map 228591 2011-12-16 19:38:31Z andrew $
+ */
+
+/*
+ * This only needs to contain symbols that are not listed in
+ * symbol maps from other parts of libc (i.e., not found in
+ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...).
+ */
+FBSDprivate_1.0 {
+	__aeabi_atexit;
+};

Added: projects/arm_eabi/lib/libc/arm/aeabi/aeabi_atexit.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/arm_eabi/lib/libc/arm/aeabi/aeabi_atexit.c	Mon Feb  6 08:50:41 2012	(r231066)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2012 Andrew Turner
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+int __cxa_atexit(void (*)(void *), void *, void *);
+
+int
+__aeabi_atexit(void *object, void (*func)(void*), void *dso)
+{
+	return __cxa_atexit(func, object, dso);
+}
+

Added: projects/arm_eabi/lib/libc/arm/aeabi/aeabi_unwind_cpp.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/arm_eabi/lib/libc/arm/aeabi/aeabi_unwind_cpp.c	Mon Feb  6 08:50:41 2012	(r231066)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2011 Andrew Turner
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+/*
+ * Provide an implementation of __aeabi_unwind_cpp_pr{0,1,2}. These are
+ * required by libc but are implemented in libgcc_eh.a which we don't link
+ * against. The libgcc_eh.a version will be called so we call abort to
+ * check this.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <stdlib.h>
+
+void __aeabi_unwind_cpp_pr0(void) __hidden;
+void __aeabi_unwind_cpp_pr1(void) __hidden;
+void __aeabi_unwind_cpp_pr2(void) __hidden;
+
+void
+__aeabi_unwind_cpp_pr0(void)
+{
+	abort();
+}
+
+void
+__aeabi_unwind_cpp_pr1(void)
+{
+	abort();
+}
+
+void
+__aeabi_unwind_cpp_pr2(void)
+{
+	abort();
+}
+


More information about the svn-src-projects mailing list