This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ARM: Move some ARM EABI compatibility into libc.so


These functions used to be in libc_nonshared.a; this patch moves them into
libc.so.6 instead.  There's two benefits to this: first, it fixes part of a
licensing snafu recently brought to my attention (see next message), and
second, it simplifies autoselection of processor-specific variants where
appropriate.  Which no one has implemented yet, but for the
__aeabi_{memcpy,memmove,memset,memclr}{4,8} functions it could be a hefty
win.

Committed.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

2005-10-31  Daniel Jacobowitz  <dan@codesourcery.com>

	* sysdeps/arm/eabi/Makefile (static-only-routines): Remove
	$(aeabi_routines).
	* sysdeps/arm/eabi/Versions (GLIBC_2.4): Add ARM EABI portability
	routines.
	* sysdeps/arm/eabi/aeabi_assert.c, sysdeps/arm/eabi/aeabi_atexit.c,
	sysdeps/arm/eabi/aeabi_errno_addr.c,
	sysdeps/arm/eabi/aeabi_localeconv.c,
	sysdeps/arm/eabi/aeabi_mb_cur_max.c, sysdeps/arm/eabi/aeabi_memclr.c,
	sysdeps/arm/eabi/aeabi_memcpy.c, sysdeps/arm/eabi/aeabi_memmove.c,
	sysdeps/arm/eabi/aeabi_memset.c: Remove attribute_hidden.

Index: glibc/ports/sysdeps/arm/eabi/Makefile
===================================================================
--- glibc.orig/ports/sysdeps/arm/eabi/Makefile	2005-10-10 11:29:32.000000000 -0400
+++ glibc/ports/sysdeps/arm/eabi/Makefile	2005-10-31 14:33:08.000000000 -0500
@@ -5,7 +5,7 @@ aeabi_routines = aeabi_assert aeabi_loca
 	aeabi_memmove aeabi_memset
 
 sysdep_routines += $(aeabi_constants) $(aeabi_routines)
-static-only-routines += $(aeabi_constants) $(aeabi_routines)
+static-only-routines += $(aeabi_constants)
 
 # get offset to rtld_global._dl_hwcap
 gen-as-const-headers += rtld-global-offsets.sym
Index: glibc/ports/sysdeps/arm/eabi/Versions
===================================================================
--- glibc.orig/ports/sysdeps/arm/eabi/Versions	2005-10-10 11:29:32.000000000 -0400
+++ glibc/ports/sysdeps/arm/eabi/Versions	2005-10-31 14:35:04.000000000 -0500
@@ -1,5 +1,16 @@
 libc {
   GLIBC_2.4 {
+    # ARM EABI compatibility routines
+    __aeabi_assert;
+    __aeabi_atexit;
+    __aeabi_errno_addr;
+    __aeabi_localeconv;
+    __aeabi_MB_CUR_MAX;
+    __aeabi_memclr; __aeabi_memclr4; __aeabi_memclr8;
+    __aeabi_memcpy; __aeabi_memcpy4; __aeabi_memcpy8;
+    __aeabi_memmove; __aeabi_memmove4; __aeabi_memmove8;
+    __aeabi_memset; __aeabi_memset4; __aeabi_memset8;
+
     # Helper routines
     __gnu_Unwind_Find_exidx;
   }
Index: glibc/ports/sysdeps/arm/eabi/aeabi_assert.c
===================================================================
--- glibc.orig/ports/sysdeps/arm/eabi/aeabi_assert.c	2005-10-31 14:30:13.000000000 -0500
+++ glibc/ports/sysdeps/arm/eabi/aeabi_assert.c	2005-10-31 14:32:27.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
 #include <assert.h>
 #include <stdlib.h>
 
-void attribute_hidden
+void
 __aeabi_assert (const char *assertion, const char *file,
 		unsigned int line)
 {
Index: glibc/ports/sysdeps/arm/eabi/aeabi_atexit.c
===================================================================
--- glibc.orig/ports/sysdeps/arm/eabi/aeabi_atexit.c	2005-10-10 11:29:32.000000000 -0400
+++ glibc/ports/sysdeps/arm/eabi/aeabi_atexit.c	2005-10-31 14:30:52.000000000 -0500
@@ -21,7 +21,7 @@
 /* Register a function to be called by exit or when a shared library
    is unloaded.  This routine is like __cxa_atexit, but uses the
    calling sequence required by the ARM EABI.  */
-int attribute_hidden
+int
 __aeabi_atexit (void *arg, void (*func) (void *), void *d)
 {
   return __cxa_atexit (func, arg, d);
Index: glibc/ports/sysdeps/arm/eabi/aeabi_errno_addr.c
===================================================================
--- glibc.orig/ports/sysdeps/arm/eabi/aeabi_errno_addr.c	2005-10-10 11:29:32.000000000 -0400
+++ glibc/ports/sysdeps/arm/eabi/aeabi_errno_addr.c	2005-10-31 14:32:41.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -18,7 +18,6 @@
 
 #include <errno.h>
 
-attribute_hidden
 volatile int *
 __aeabi_errno_addr (void)
 {
Index: glibc/ports/sysdeps/arm/eabi/aeabi_localeconv.c
===================================================================
--- glibc.orig/ports/sysdeps/arm/eabi/aeabi_localeconv.c	2005-10-31 14:30:03.000000000 -0500
+++ glibc/ports/sysdeps/arm/eabi/aeabi_localeconv.c	2005-10-31 14:32:30.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -18,7 +18,6 @@
 
 #include <locale.h>
 
-attribute_hidden
 struct lconv *
 __aeabi_localeconv (void)
 {
Index: glibc/ports/sysdeps/arm/eabi/aeabi_mb_cur_max.c
===================================================================
--- glibc.orig/ports/sysdeps/arm/eabi/aeabi_mb_cur_max.c	2005-10-10 11:29:32.000000000 -0400
+++ glibc/ports/sysdeps/arm/eabi/aeabi_mb_cur_max.c	2005-10-31 14:30:43.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@
 #include <stdlib.h>
 #include <locale/localeinfo.h>
 
-int attribute_hidden
+int
 __aeabi_MB_CUR_MAX (void)
 {
   return MB_CUR_MAX;
Index: glibc/ports/sysdeps/arm/eabi/aeabi_memclr.c
===================================================================
--- glibc.orig/ports/sysdeps/arm/eabi/aeabi_memclr.c	2005-10-10 11:29:32.000000000 -0400
+++ glibc/ports/sysdeps/arm/eabi/aeabi_memclr.c	2005-10-31 14:31:50.000000000 -0500
@@ -20,12 +20,12 @@
 
 /* Clear memory.  Can't alias to bzero because it's not defined in the
    same translation unit.  */
-void attribute_hidden
+void
 __aeabi_memclr (void *dest, size_t n)
 {
   __bzero (dest, n);
 }
 
 /* Versions of the above which may assume memory alignment.  */
-strong_alias (__aeabi_memclr, attribute_hidden __aeabi_memclr4)
-strong_alias (__aeabi_memclr, attribute_hidden __aeabi_memclr8)
+strong_alias (__aeabi_memclr, __aeabi_memclr4)
+strong_alias (__aeabi_memclr, __aeabi_memclr8)
Index: glibc/ports/sysdeps/arm/eabi/aeabi_memcpy.c
===================================================================
--- glibc.orig/ports/sysdeps/arm/eabi/aeabi_memcpy.c	2005-10-10 11:29:32.000000000 -0400
+++ glibc/ports/sysdeps/arm/eabi/aeabi_memcpy.c	2005-10-31 14:32:01.000000000 -0500
@@ -21,12 +21,12 @@
 /* Copy memory like memcpy, but no return value required.  Can't alias
    to memcpy because it's not defined in the same translation
    unit.  */
-void attribute_hidden
+void
 __aeabi_memcpy (void *dest, const void *src, size_t n)
 {
   memcpy (dest, src, n);
 }
 
 /* Versions of the above which may assume memory alignment.  */
-strong_alias (__aeabi_memcpy, attribute_hidden __aeabi_memcpy4)
-strong_alias (__aeabi_memcpy, attribute_hidden __aeabi_memcpy8)
+strong_alias (__aeabi_memcpy, __aeabi_memcpy4)
+strong_alias (__aeabi_memcpy, __aeabi_memcpy8)
Index: glibc/ports/sysdeps/arm/eabi/aeabi_memmove.c
===================================================================
--- glibc.orig/ports/sysdeps/arm/eabi/aeabi_memmove.c	2005-10-10 11:29:32.000000000 -0400
+++ glibc/ports/sysdeps/arm/eabi/aeabi_memmove.c	2005-10-31 14:32:12.000000000 -0500
@@ -21,12 +21,12 @@
 /* Copy memory like memmove, but no return value required.  Can't
    alias to memmove because it's not defined in the same translation
    unit.  */
-void attribute_hidden
+void
 __aeabi_memmove (void *dest, const void *src, size_t n)
 {
   memmove (dest, src, n);
 }
 
 /* Versions of the above which may assume memory alignment.  */
-strong_alias (__aeabi_memmove, attribute_hidden __aeabi_memmove4)
-strong_alias (__aeabi_memmove, attribute_hidden __aeabi_memmove8)
+strong_alias (__aeabi_memmove, __aeabi_memmove4)
+strong_alias (__aeabi_memmove, __aeabi_memmove8)
Index: glibc/ports/sysdeps/arm/eabi/aeabi_memset.c
===================================================================
--- glibc.orig/ports/sysdeps/arm/eabi/aeabi_memset.c	2005-10-10 11:29:32.000000000 -0400
+++ glibc/ports/sysdeps/arm/eabi/aeabi_memset.c	2005-10-31 14:32:22.000000000 -0500
@@ -20,12 +20,12 @@
 
 /* Set memory like memset, but different argument order and no return
    value required.  */
-void attribute_hidden
+void
 __aeabi_memset (void *dest, size_t n, int c)
 {
   memset (dest, c, n);
 }
 
 /* Versions of the above which may assume memory alignment.  */
-strong_alias (__aeabi_memset, attribute_hidden __aeabi_memset4)
-strong_alias (__aeabi_memset, attribute_hidden __aeabi_memset8)
+strong_alias (__aeabi_memset, __aeabi_memset4)
+strong_alias (__aeabi_memset, __aeabi_memset8)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]