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]

sysdeps/arm/elf removal


I've applied this patch to merge sysdeps/arm/elf/ into sysdeps/arm/ in 
line with the recent libc change to remove elf/ subdirectories in sysdeps.  
I'll make a corresponding MIPS change; other ports will need such changes 
as well.

diff --git a/ChangeLog.arm b/ChangeLog.arm
index f1376cd..4d8a78b 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,14 @@
+2012-03-27  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/arm/elf/start.S: Moved to ...
+	* sysdeps/arm/start.S: ...here.
+	* sysdeps/arm/elf/configure.in: Merge into ...
+	* sysdeps/arm/configure.in: ...here.
+	* sysdeps/arm/configure: Regenerated.
+	* sysdeps/arm/elf/configure.in: Remove file.
+	* sysdeps/arm/elf/configure: Likewise.
+	* sysdeps/unix/arm/start.c: Likewise.
+
 2012-03-20  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/unix/sysv/linux/arm/register-dump.h: Include <_itoa.h>
diff --git a/sysdeps/arm/configure.in b/sysdeps/arm/configure.in
index 9f4ff3b..706add2 100644
--- a/sysdeps/arm/configure.in
+++ b/sysdeps/arm/configure.in
@@ -1,6 +1,37 @@
 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
 # Local configure fragment for sysdeps/arm.
 
+# Check for support of thread-local storage handling in assembler and
+# linker.
+AC_CACHE_CHECK(for ARM TLS support, libc_cv_arm_tls, [dnl
+cat > conftest.s <<\EOF
+	.section ".tdata", "awT", %progbits
+	.globl foo
+foo:	.long	1
+	.section ".tbss", "awT", %nobits
+	.globl bar
+bar:	.skip	4
+	.text
+.word	foo(tpoff)
+.word	foo(tlsgd)
+EOF
+dnl
+if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
+  libc_cv_arm_tls=yes
+else
+  libc_cv_arm_tls=no
+fi
+rm -f conftest*])
+if test $libc_cv_arm_tls = no; then
+  AC_MSG_ERROR([the assembler must support TLS])
+fi
+
+dnl It is always possible to access static and hidden symbols in an
+dnl position independent way.
+dnl NOTE: This feature was added by the GCC TLS patches.  We should test for
+dnl it.  Until we do, don't define it.
+#AC_DEFINE(PI_STATIC_AND_HIDDEN)
+
 AC_CACHE_CHECK([whether the CFI directive .cfi_sections is supported],
   [libc_cv_asm_cfi_directive_sections],
   [cat > conftest.s <<EOF
diff --git a/sysdeps/arm/elf/configure.in b/sysdeps/arm/elf/configure.in
deleted file mode 100644
index 123a321..0000000
--- a/sysdeps/arm/elf/configure.in
+++ /dev/null
@@ -1,33 +0,0 @@
-GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-# Local configure fragment for sysdeps/arm/elf.
-
-# Check for support of thread-local storage handling in assembler and
-# linker.
-AC_CACHE_CHECK(for ARM TLS support, libc_cv_arm_tls, [dnl
-cat > conftest.s <<\EOF
-	.section ".tdata", "awT", %progbits
-	.globl foo
-foo:	.long	1
-	.section ".tbss", "awT", %nobits
-	.globl bar
-bar:	.skip	4
-	.text
-.word	foo(tpoff)
-.word	foo(tlsgd)
-EOF
-dnl
-if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
-  libc_cv_arm_tls=yes
-else
-  libc_cv_arm_tls=no
-fi
-rm -f conftest*])
-if test $libc_cv_arm_tls = no; then
-  AC_MSG_ERROR([the assembler must support TLS])
-fi
-
-dnl It is always possible to access static and hidden symbols in an
-dnl position independent way.
-dnl NOTE: This feature was added by the GCC TLS patches.  We should test for
-dnl it.  Until we do, don't define it.
-#AC_DEFINE(PI_STATIC_AND_HIDDEN)
diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S
deleted file mode 100644
index a857d8b..0000000
--- a/sysdeps/arm/elf/start.S
+++ /dev/null
@@ -1,156 +0,0 @@
-/* Startup code for ARM & ELF
-   Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2005, 2008
-   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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   In addition to the permissions in the GNU Lesser General Public
-   License, the Free Software Foundation gives you unlimited
-   permission to link the compiled version of this file with other
-   programs, and to distribute those programs without any restriction
-   coming from the use of this file. (The GNU Lesser General Public
-   License restrictions do apply in other respects; for example, they
-   cover modification of the file, and distribution when not linked
-   into another program.)
-
-   Note that people who make modified versions of this file are not
-   obligated to grant this special exception for their modified
-   versions; it is their choice whether to do so. The GNU Lesser
-   General Public License gives permission to release a modified
-   version without this exception; this exception also makes it
-   possible to release a modified version which carries forward this
-   exception.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-/* This is the canonical entry point, usually the first thing in the text
-   segment.
-
-	Note that the code in the .init section has already been run.
-	This includes _init and _libc_init
-
-
-	At this entry point, most registers' values are unspecified, except:
-
-   a1		Contains a function pointer to be registered with `atexit'.
-		This is how the dynamic linker arranges to have DT_FINI
-		functions called for shared libraries that have been loaded
-		before this code runs.
-
-   sp		The stack contains the arguments and environment:
-		0(sp)			argc
-		4(sp)			argv[0]
-		...
-		(4*argc)(sp)		NULL
-		(4*(argc+1))(sp)	envp[0]
-		...
-					NULL
-*/
-
-#if defined(__ARM_EABI__)
-/* Tag_ABI_align8_preserved: This code preserves 8-byte
-   alignment in any callee.  */
-	.eabi_attribute 25, 1
-/* Tag_ABI_align8_needed: This code may require 8-byte alignment from
-   the caller.  */
-	.eabi_attribute 24, 1
-#endif
-
-#if defined(__thumb2__)
-	.thumb
-	.syntax unified
-#endif
-
-	.text
-	.globl _start
-	.type _start,#function
-_start:
-#if !defined(__USING_SJLJ_EXCEPTIONS__)
-       /* Protect against unhandled exceptions.  */
-       .fnstart
-#endif
-	/* Clear the frame pointer and link register since this is the outermost frame. */
-	mov fp, #0
-	mov lr, #0
-
-	/* Pop argc off the stack and save a pointer to argv */
-	ldr a2, [sp], #4
-	mov a3, sp
-
-	/* Push stack limit */
-	str a3, [sp, #-4]!
-
-	/* Push rtld_fini */
-	str a1, [sp, #-4]!
-
-#ifdef SHARED
-	ldr sl, .L_GOT
-	adr a4, .L_GOT
-	add sl, sl, a4
-
-	ldr ip, .L_GOT+4	/* __libc_csu_fini */
-	ldr ip, [sl, ip]
-
-	str ip, [sp, #-4]!	/* Push __libc_csu_fini */
-
-	ldr a4, .L_GOT+8	/* __libc_csu_init */
-	ldr a4, [sl, a4]
-
-	ldr a1, .L_GOT+12	/* main */
-	ldr a1, [sl, a1]
-
-	/* __libc_start_main (main, argc, argv, init, fini, rtld_fini, stack_end) */
-	/* Let the libc call main and exit with its return code.  */
-	bl __libc_start_main(PLT)
-#else
-	/* Fetch address of __libc_csu_fini */
-	ldr ip, =__libc_csu_fini
-
-	/* Push __libc_csu_fini */
-	str ip, [sp, #-4]!
-
-	/* Set up the other arguments in registers */
-	ldr a1, =main
-	ldr a4, =__libc_csu_init
-
-	/* __libc_start_main (main, argc, argv, init, fini, rtld_fini, stack_end) */
-	/* Let the libc call main and exit with its return code.  */
-	bl __libc_start_main
-#endif
-
-	/* should never get here....*/
-	bl abort
-
-#ifdef SHARED
-	.align 2
-.L_GOT:
-	.word _GLOBAL_OFFSET_TABLE_ - .L_GOT
-	.word __libc_csu_fini(GOT)
-	.word __libc_csu_init(GOT)
-	.word main(GOT)
-#endif
-
-
-#if !defined(__USING_SJLJ_EXCEPTIONS__)
-       .cantunwind
-       .fnend
-#endif
-
-/* Define a symbol for the first piece of initialized data.  */
-	.data
-	.globl __data_start
-__data_start:
-	.long 0
-	.weak data_start
-	data_start = __data_start
diff --git a/sysdeps/arm/start.S b/sysdeps/arm/start.S
new file mode 100644
index 0000000..a857d8b
--- /dev/null
+++ b/sysdeps/arm/start.S
@@ -0,0 +1,156 @@
+/* Startup code for ARM & ELF
+   Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2005, 2008
+   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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file with other
+   programs, and to distribute those programs without any restriction
+   coming from the use of this file. (The GNU Lesser General Public
+   License restrictions do apply in other respects; for example, they
+   cover modification of the file, and distribution when not linked
+   into another program.)
+
+   Note that people who make modified versions of this file are not
+   obligated to grant this special exception for their modified
+   versions; it is their choice whether to do so. The GNU Lesser
+   General Public License gives permission to release a modified
+   version without this exception; this exception also makes it
+   possible to release a modified version which carries forward this
+   exception.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library.  If not, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* This is the canonical entry point, usually the first thing in the text
+   segment.
+
+	Note that the code in the .init section has already been run.
+	This includes _init and _libc_init
+
+
+	At this entry point, most registers' values are unspecified, except:
+
+   a1		Contains a function pointer to be registered with `atexit'.
+		This is how the dynamic linker arranges to have DT_FINI
+		functions called for shared libraries that have been loaded
+		before this code runs.
+
+   sp		The stack contains the arguments and environment:
+		0(sp)			argc
+		4(sp)			argv[0]
+		...
+		(4*argc)(sp)		NULL
+		(4*(argc+1))(sp)	envp[0]
+		...
+					NULL
+*/
+
+#if defined(__ARM_EABI__)
+/* Tag_ABI_align8_preserved: This code preserves 8-byte
+   alignment in any callee.  */
+	.eabi_attribute 25, 1
+/* Tag_ABI_align8_needed: This code may require 8-byte alignment from
+   the caller.  */
+	.eabi_attribute 24, 1
+#endif
+
+#if defined(__thumb2__)
+	.thumb
+	.syntax unified
+#endif
+
+	.text
+	.globl _start
+	.type _start,#function
+_start:
+#if !defined(__USING_SJLJ_EXCEPTIONS__)
+       /* Protect against unhandled exceptions.  */
+       .fnstart
+#endif
+	/* Clear the frame pointer and link register since this is the outermost frame. */
+	mov fp, #0
+	mov lr, #0
+
+	/* Pop argc off the stack and save a pointer to argv */
+	ldr a2, [sp], #4
+	mov a3, sp
+
+	/* Push stack limit */
+	str a3, [sp, #-4]!
+
+	/* Push rtld_fini */
+	str a1, [sp, #-4]!
+
+#ifdef SHARED
+	ldr sl, .L_GOT
+	adr a4, .L_GOT
+	add sl, sl, a4
+
+	ldr ip, .L_GOT+4	/* __libc_csu_fini */
+	ldr ip, [sl, ip]
+
+	str ip, [sp, #-4]!	/* Push __libc_csu_fini */
+
+	ldr a4, .L_GOT+8	/* __libc_csu_init */
+	ldr a4, [sl, a4]
+
+	ldr a1, .L_GOT+12	/* main */
+	ldr a1, [sl, a1]
+
+	/* __libc_start_main (main, argc, argv, init, fini, rtld_fini, stack_end) */
+	/* Let the libc call main and exit with its return code.  */
+	bl __libc_start_main(PLT)
+#else
+	/* Fetch address of __libc_csu_fini */
+	ldr ip, =__libc_csu_fini
+
+	/* Push __libc_csu_fini */
+	str ip, [sp, #-4]!
+
+	/* Set up the other arguments in registers */
+	ldr a1, =main
+	ldr a4, =__libc_csu_init
+
+	/* __libc_start_main (main, argc, argv, init, fini, rtld_fini, stack_end) */
+	/* Let the libc call main and exit with its return code.  */
+	bl __libc_start_main
+#endif
+
+	/* should never get here....*/
+	bl abort
+
+#ifdef SHARED
+	.align 2
+.L_GOT:
+	.word _GLOBAL_OFFSET_TABLE_ - .L_GOT
+	.word __libc_csu_fini(GOT)
+	.word __libc_csu_init(GOT)
+	.word main(GOT)
+#endif
+
+
+#if !defined(__USING_SJLJ_EXCEPTIONS__)
+       .cantunwind
+       .fnend
+#endif
+
+/* Define a symbol for the first piece of initialized data.  */
+	.data
+	.globl __data_start
+__data_start:
+	.long 0
+	.weak data_start
+	data_start = __data_start
diff --git a/sysdeps/unix/arm/start.c b/sysdeps/unix/arm/start.c
deleted file mode 100644
index e9a032b..0000000
--- a/sysdeps/unix/arm/start.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Special startup code for ARM a.out binaries.
-   Copyright (C) 1998, 2004, 2012 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   In addition to the permissions in the GNU Lesser General Public
-   License, the Free Software Foundation gives you unlimited
-   permission to link the compiled version of this file with other
-   programs, and to distribute those programs without any restriction
-   coming from the use of this file. (The GNU Lesser General Public
-   License restrictions do apply in other respects; for example, they
-   cover modification of the file, and distribution when not linked
-   into another program.)
-
-   Note that people who make modified versions of this file are not
-   obligated to grant this special exception for their modified
-   versions; it is their choice whether to do so. The GNU Lesser
-   General Public License gives permission to release a modified
-   version without this exception; this exception also makes it
-   possible to release a modified version which carries forward this
-   exception.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <errno.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sysdep.h>
-
-/* The first piece of initialized data.  */
-int __data_start = 0;
-weak_alias (__data_start, data_start)
-
-extern void __libc_init (int argc, char **argv, char **envp);
-extern int main (int argc, char **argv, char **envp);
-
-/* N.B.: It is important that this be the first function.
-   This file is the first thing in the text section.  */
-
-/* If this was in C it might create its own stack frame and
-   screw up the arguments.  */
-asm (".text; .globl _start; _start: B start1");
-
-/* Fool gcc into thinking that more args are passed.  This makes it look
-   on the stack (correctly) for the real arguments.  It causes somewhat
-   strange register usage in start1(), but we aren't too bothered about
-   that at the moment. */
-#define DUMMIES a1, a2, a3, a4
-
-#ifdef	DUMMIES
-#define	ARG_DUMMIES	DUMMIES,
-#define	DECL_DUMMIES	int DUMMIES;
-#else
-#define	ARG_DUMMIES
-#define	DECL_DUMMIES
-#endif
-
-/* ARGSUSED */
-static void
-start1 (ARG_DUMMIES argc, argv, envp)
-     DECL_DUMMIES
-     int argc;
-     char **argv;
-     char **envp;
-{
-  /* Store a pointer to the environment.  */
-  __environ = envp;
-
-  /* Do C library initializations.  */
-  __libc_init (argc, argv, __environ);
-
-  /* Call the user program.  */
-  exit (main (argc, argv, __environ));
-}

-- 
Joseph S. Myers
joseph@codesourcery.com


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