[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r17153 - in /fsf/trunk/libc: ./ mach/ nptl/ nptl/sysdeps/sparc/ nptl/sysdeps/unix/sysv/linux/sh/ nptl/sysdeps/unix/sysv/linu...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r17153 - in /fsf/trunk/libc: ./ mach/ nptl/ nptl/sysdeps/sparc/ nptl/sysdeps/unix/sysv/linux/sh/ nptl/sysdeps/unix/sysv/linu...
- From: eglibc@xxxxxxxxxx
- Date: Thu, 16 Feb 2012 00:04:59 -0000
Author: eglibc
Date: Thu Feb 16 00:04:58 2012
New Revision: 17153
Log:
Import glibc-mainline for 2012-02-16
Added:
fsf/trunk/libc/sysdeps/sh/crti.S
fsf/trunk/libc/sysdeps/sh/crtn.S
fsf/trunk/libc/sysdeps/sparc/crti.S
fsf/trunk/libc/sysdeps/sparc/crtn.S
fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/signalfd.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/signalfd.h
Removed:
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile
fsf/trunk/libc/sysdeps/sh/elf/initfini.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sys/signalfd.h
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/mach/devstream.c
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/sysdeps/sparc/Makefile
fsf/trunk/libc/sysdeps/mach/hurd/malloc-machine.h
fsf/trunk/libc/sysdeps/sparc/Makefile
fsf/trunk/libc/sysdeps/sparc/sparc32/Makefile
fsf/trunk/libc/sysdeps/sparc/sparc64/Makefile
fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile
fsf/trunk/libc/sysdeps/unix/sysv/linux/getcwd.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/signalfd.h
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Feb 16 00:04:58 2012
@@ -1,3 +1,44 @@
+2012-02-15 Kaz Kojima <kkojima@xxxxxxxxxxxxxx>
+
+ * sysdeps/sh/crti.S, sysdeps/sh/crtn.S: New files, based on
+ compiler output for sysdeps/generic/initfini.c.
+ * sysdeps/sh/elf/initfini.c: Remove file.
+
+2012-02-16 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ [BZ #11494]
+ * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (O_FSYNC): Define.
+
+ * sysdeps/sparc/Makefile: Add -fPIC when building crt{i,n}.S
+ * sysdeps/sparc/crti.S: New file.
+ * sysdeps/sparc/crtn.S: New file.
+ * sysdeps/sparc/sparc32/Makefile: Remove initfini handling.
+ * sysdeps/sparc/sparc64/Makefile: Likewise.
+
+2012-02-15 Mike Frysinger <vapier@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/getcwd.c: Include sys/param.h.
+
+2012-02-15 Roland McGrath <roland@xxxxxxxxxxxxx>
+
+ [BZ #4822]
+ * sysdeps/mach/hurd/malloc-machine.h (madvise): New macro.
+
+ * mach/devstream.c (cookie_io_functions_t): Macro removed.
+ (write, read, close): Likewise.
+ Patch by Aurelien Jarno <aurelien@xxxxxxxxxxx>.
+
+2012-02-15 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/bits/signalfd.h: New file.
+ * sysdeps/unix/sysv/linux/sparc/bits/signalfd.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sys/signalfd.h: Remove.
+ * sysdeps/unix/sysv/linux/sys/signalfd.h: Get flags from
+ <bits/signalfd.h>.
+ (SFD_CLOEXEC, SFD_NONBLOCK): Don't define here.
+ * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
+ bits/signalfd.h.
+
2012-02-14 Marek Polacek <polacek@xxxxxxxxxx>
* sysdeps/x86_64/crti.S: New file.
Modified: fsf/trunk/libc/mach/devstream.c
==============================================================================
--- fsf/trunk/libc/mach/devstream.c (original)
+++ fsf/trunk/libc/mach/devstream.c Thu Feb 16 00:04:58 2012
@@ -1,6 +1,6 @@
/* stdio on a Mach device port.
Translates \n to \r\n on output, echos and translates \r to \n on input.
- Copyright (C) 1992,93,94,96,97,2000,2011 Free Software Foundation, Inc.
+ Copyright (C) 1992-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
@@ -119,11 +119,6 @@
return 0;
}
-#define cookie_io_functions_t __io_functions
-#define write __write
-#define read __read
-#define close __close
-
FILE *
mach_open_devstream (mach_port_t dev, const char *mode)
{
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Thu Feb 16 00:04:58 2012
@@ -1,3 +1,15 @@
+2012-02-15 Kaz Kojima <kkojima@xxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
+
+2012-02-16 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
+
+2012-02-15 Marek Polacek <polacek@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
+
2012-02-09 Paul Eggert <eggert@xxxxxxxxxxx>
Replace FSF snail mail address with URLs, as per GNU coding standards.
Modified: fsf/trunk/libc/nptl/sysdeps/sparc/Makefile
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/sparc/Makefile (original)
+++ fsf/trunk/libc/nptl/sysdeps/sparc/Makefile Thu Feb 16 00:04:58 2012
@@ -1,3 +1,8 @@
ifeq ($(subdir),csu)
gen-as-const-headers += tcb-offsets.sym
endif
+
+ifeq ($(subdir),nptl)
+CPPFLAGS-pt-crti.S += -fPIC
+CPPFLAGS-crtn.S += -fPIC
+endif
Removed: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c (removed)
@@ -1,125 +1,0 @@
-/* Special .init and .fini section support for SH. NPTL version.
- Copyright (C) 2003, 2009 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 Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- In addition to the permissions in the GNU Library 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 Library 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.)
-
- 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 Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, see <http://www.gnu.org/licenses/>. */
-
-/* This file is compiled into assembly code which is then munged by a sed
- script into two files: crti.s and crtn.s.
-
- * crti.s puts a function prologue at the beginning of the
- .init and .fini sections and defines global symbols for
- those addresses, so they can be called as functions.
-
- * crtn.s puts the corresponding function epilogues
- in the .init and .fini sections. */
-
-__asm__ ("\n\
-\n\
-#include \"defs.h\"\n\
-\n\
-/*@HEADER_ENDS*/\n\
-\n\
-/*@TESTS_BEGIN*/\n\
-\n\
-/*@TESTS_END*/\n\
-\n\
-/*@_init_PROLOG_BEGINS*/\n\
- .section .init\n\
- .align 5\n\
- .global _init\n\
- .type _init,@function\n\
-_init:\n\
- mov.l r12,@-r15\n\
- mov.l r14,@-r15\n\
- sts.l pr,@-r15\n\
- mova .L22,r0\n\
- mov.l .L22,r12\n\
- add r0,r12\n\
- mova .L24,r0\n\
- mov.l .L24,r1\n\
- add r0,r1\n\
- jsr @r1\n\
- mov r15,r14\n\
- bra 1f\n\
- nop\n\
- .align 2\n\
-.L22:\n\
- .long _GLOBAL_OFFSET_TABLE_\n\
-.L24:\n\
- .long __pthread_initialize_minimal_internal@PLT\n\
-1:\n\
- ALIGN\n\
- END_INIT\n\
-\n\
-/*@_init_PROLOG_ENDS*/\n\
-\n\
-/*@_init_EPILOG_BEGINS*/\n\
- .section .init\n\
- mov r14,r15\n\
- lds.l @r15+,pr\n\
- mov.l @r15+,r14\n\
- rts \n\
- mov.l @r15+,r12\n\
- END_INIT\n\
- \n\
-/*@_init_EPILOG_ENDS*/\n\
-\n\
-/*@_fini_PROLOG_BEGINS*/\n\
- .section .fini\n\
- .align 5\n\
- .global _fini\n\
- .type _fini,@function\n\
-_fini:\n\
- mov.l r12,@-r15\n\
- mov.l r14,@-r15\n\
- sts.l pr,@-r15\n\
- mova .L27,r0\n\
- mov.l .L27,r12\n\
- add r0,r12\n\
- mov r15,r14\n\
- ALIGN\n\
- END_FINI\n\
- bra 1f\n\
- nop\n\
- .align 2\n\
-.L27:\n\
- .long _GLOBAL_OFFSET_TABLE_\n\
-1:\n\
-/*@_fini_PROLOG_ENDS*/\n\
-\n\
-/*@_fini_EPILOG_BEGINS*/\n\
- .section .fini\n\
- mov r14,r15\n\
- lds.l @r15+,pr\n\
- mov.l @r15+,r14\n\
- rts \n\
- mov.l @r15+,r12\n\
-\n\
- END_FINI\n\
- \n\
-/*@_fini_EPILOG_ENDS*/\n\
-\n\
-/*@TRAILER_BEGINS*/\n\
-");
Removed: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile (removed)
@@ -1,4 +1,0 @@
-ifeq ($(subdir),nptl)
-CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions \
- -fno-asynchronous-unwind-tables $(fno-unit-at-a-time)
-endif
Modified: fsf/trunk/libc/sysdeps/mach/hurd/malloc-machine.h
==============================================================================
--- fsf/trunk/libc/sysdeps/mach/hurd/malloc-machine.h (original)
+++ fsf/trunk/libc/sysdeps/mach/hurd/malloc-machine.h Thu Feb 16 00:04:58 2012
@@ -1,6 +1,6 @@
/* Basic platform-independent macro definitions for mutexes,
thread-specific data and parameters for malloc.
- Copyright (C) 2003, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2003-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
@@ -62,6 +62,10 @@
#define tsd_setspecific(key, data) __libc_tsd_set (void *, MALLOC, (data))
#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (void *, MALLOC))
+/* madvise is a stub on Hurd, so don't bother calling it. */
+#undef madvise
+#define madvise(addr, len, advice) ((void) ((addr), (len), (advice)))
+
#include <sysdeps/generic/malloc-machine.h>
#endif /* !defined(_MALLOC_MACHINE_H) */
Added: fsf/trunk/libc/sysdeps/sh/crti.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sh/crti.S (added)
+++ fsf/trunk/libc/sysdeps/sh/crti.S Thu Feb 16 00:04:58 2012
@@ -1,0 +1,121 @@
+/* Special .init and .fini section support for SH.
+ Copyright (C) 2000-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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* crti.S puts a function prologue at the beginning of the .init and
+ .fini sections and defines global symbols for those addresses, so
+ they can be called as functions. The symbols _init and _fini are
+ magic and cause the linker to emit DT_INIT and DT_FINI. */
+
+#include <libc-symbols.h>
+#include <sysdep.h>
+
+#ifndef PREINIT_FUNCTION
+# define PREINIT_FUNCTION __gmon_start__
+#endif
+
+#ifndef PREINIT_FUNCTION_WEAK
+# define PREINIT_FUNCTION_WEAK 1
+#endif
+
+#if PREINIT_FUNCTION_WEAK
+ weak_extern (PREINIT_FUNCTION)
+#else
+ .hidden PREINIT_FUNCTION
+#endif
+
+ .section .init,"ax",@progbits
+ .align 5
+ .global _init
+ .type _init, @function
+_init:
+ mov.l r12,@-r15
+ mova .L12,r0
+ mov.l .L12,r12
+ mov.l r14,@-r15
+ add r0,r12
+ sts.l pr,@-r15
+#if PREINIT_FUNCTION_WEAK
+ mov.l .L13,r0
+ mov.l @(r0,r12),r1
+ tst r1,r1
+ bt/s .L8
+ mov r15,r14
+ mov.l .L14,r1
+ bsrf r1
+.LPCS0:
+ nop
+.L8:
+#else
+ mova .L13,r0
+ mov.l .L13,r1
+ add r0,r1
+ jsr @r1
+ mov r15,r14
+#endif
+ bra 1f
+ nop
+ .align 2
+.L12:
+ .long _GLOBAL_OFFSET_TABLE_
+#if PREINIT_FUNCTION_WEAK
+.L13:
+ .long PREINIT_FUNCTION@GOT
+.L14:
+ .long PREINIT_FUNCTION@PLT-(.LPCS0+2-(.))
+#else
+.L13:
+ .long PREINIT_FUNCTION@PLT
+#endif
+1:
+
+ .section .fini,"ax",@progbits
+ .align 5
+ .global _fini
+ .type _fini, @function
+_fini:
+ mov.l r12,@-r15
+ mova .L19,r0
+ mov.l r14,@-r15
+ sts.l pr,@-r15
+ mov.l .L19,r12
+ mov r15,r14
+ add r0,r12
+ bra 0f
+ nop
+ .align 2
+.L19:
+ .long _GLOBAL_OFFSET_TABLE_
+0:
Added: fsf/trunk/libc/sysdeps/sh/crtn.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sh/crtn.S (added)
+++ fsf/trunk/libc/sysdeps/sh/crtn.S Thu Feb 16 00:04:58 2012
@@ -1,0 +1,54 @@
+/* Special .init and .fini section support for SH.
+ Copyright (C) 2000-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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* crtn.S puts function epilogues in the .init and .fini sections
+ corresponding to the prologues in crti.S. */
+
+ .section .init,"ax",@progbits
+ mov r14,r15
+ lds.l @r15+,pr
+ mov.l @r15+,r14
+ mov.l @r15+,r12
+ rts
+ nop
+
+ .section .fini,"ax",@progbits
+ mov r14,r15
+ lds.l @r15+,pr
+ mov.l @r15+,r14
+ mov.l @r15+,r12
+ rts
+ nop
Removed: fsf/trunk/libc/sysdeps/sh/elf/initfini.c
==============================================================================
--- fsf/trunk/libc/sysdeps/sh/elf/initfini.c (original)
+++ fsf/trunk/libc/sysdeps/sh/elf/initfini.c (removed)
@@ -1,152 +1,0 @@
-/* Special .init and .fini section support for SH.
- Copyright (C) 2000, 2002, 2009 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 file is compiled into assembly code which is then munged by a sed
- script into two files: crti.s and crtn.s.
-
- * crti.s puts a function prologue at the beginning of the
- .init and .fini sections and defines global symbols for
- those addresses, so they can be called as functions.
-
- * crtn.s puts the corresponding function epilogues
- in the .init and .fini sections. */
-
-__asm__ ("\
-\n\
-#include \"defs.h\"\n\
-\n\
-/*@HEADER_ENDS*/\n\
-\n\
-/*@TESTS_BEGIN*/\n\
- .align 5\n\
-/*@TESTS_END*/\n\
-\n\
-/*@_init_PROLOG_BEGINS*/\n\
- .section .init,\"ax\",@progbits\n\
- .align 5\n\
- .global _init\n\
- .type _init, @function\n\
-_init:\n\
- mov.l r12,@-r15\n\
- mova .L12,r0\n\
- mov.l .L12,r12\n\
- mov.l r14,@-r15\n\
- add r0,r12\n\
- mov.l .L13,r0\n\
- sts.l pr,@-r15\n\
- mov.l @(r0,r12),r1\n\
- tst r1,r1\n\
- bt/s .L8\n\
- mov r15,r14\n\
- mov.l .L14,r1\n\
- bsrf r1\n\
-.LPCS0:\n\
- nop\n\
-.L8:\n\
- bra 1f\n\
- nop\n\
- .align 2\n\
-.L12:\n\
- .long _GLOBAL_OFFSET_TABLE_\n\
-.L13:\n\
- .long __gmon_start__@GOT\n\
-.L14:\n\
- .long __gmon_start__@PLT-(.LPCS0+2-(.))\n\
-1:\n\
- ALIGN\n\
- END_INIT\n\
-\n\
-/*@_init_PROLOG_ENDS*/\n\
-\n\
-/*@_init_EPILOG_BEGINS*/\n\
- .section .init\n\
- mov r14,r15\n\
- lds.l @r15+,pr\n\
- mov.l @r15+,r14\n\
- mov.l @r15+,r12\n\
- rts \n\
- nop\n\
- END_INIT\n\
-\n\
-/*@_init_EPILOG_ENDS*/\n\
-\n\
-/*@_fini_PROLOG_BEGINS*/\n\
- .section .fini,\"ax\",@progbits\n\
- .align 5\n\
- .global _fini\n\
- .type _fini, @function\n\
-_fini:\n\
- mov.l r12,@-r15\n\
- mova .L19,r0\n\
- mov.l r14,@-r15\n\
- sts.l pr,@-r15\n\
- mov.l .L19,r12\n\
- mov r15,r14\n\
- add r0,r12\n\
- bra 0f\n\
- nop\n\
- .align 2\n\
-.L19:\n\
- .long _GLOBAL_OFFSET_TABLE_\n\
-0:\n\
- ALIGN\n\
- END_FINI\n\
-\n\
-/*@_fini_PROLOG_ENDS*/\n\
- mov.l .L20,r1\n\
- bsrf r1\n\
-.LPCS1:\n\
- nop\n\
- bra 1f\n\
- nop\n\
- .align 2\n\
-.L20:\n\
- .long i_am_not_a_leaf@PLT-(.LPCS1+2-(.))\n\
-1:\n\
-/*@_fini_EPILOG_BEGINS*/\n\
- .section .fini\n\
- mov r14,r15\n\
- lds.l @r15+,pr\n\
- mov.l @r15+,r14\n\
- mov.l @r15+,r12\n\
- rts \n\
- nop\n\
- END_FINI\n\
-\n\
-/*@_fini_EPILOG_ENDS*/\n\
-\n\
-/*@TRAILER_BEGINS*/\n\
- .weak __gmon_start__\n\
-");
Modified: fsf/trunk/libc/sysdeps/sparc/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/Makefile (original)
+++ fsf/trunk/libc/sysdeps/sparc/Makefile Thu Feb 16 00:04:58 2012
@@ -14,4 +14,6 @@
ifeq ($(subdir),csu)
# get offset to rtld_global._dl_hwcap
gen-as-const-headers += rtld-global-offsets.sym
+CPPFLAGS-crti.S += -fPIC
+CPPFLAGS-crtn.S += -fPIC
endif
Added: fsf/trunk/libc/sysdeps/sparc/crti.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/crti.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/crti.S Thu Feb 16 00:04:58 2012
@@ -1,0 +1,104 @@
+/* Special .init and .fini section support for sparc.
+ Copyright (C) 1995-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/>. */
+
+/* crti.S puts a function prologue at the beginning of the .init and
+ .fini sections and defines global symbols for those addresses, so
+ they can be called as functions. The symbols _init and _fini are
+ magic and cause the linker to emit DT_INIT and DT_FINI. */
+
+#include <libc-symbols.h>
+#include <sysdep.h>
+
+#ifndef PREINIT_FUNCTION
+# define PREINIT_FUNCTION __gmon_start__
+#endif
+
+#ifndef PREINIT_FUNCTION_WEAK
+# define PREINIT_FUNCTION_WEAK 1
+#endif
+
+#if PREINIT_FUNCTION_WEAK
+ weak_extern (PREINIT_FUNCTION)
+#else
+ .hidden PREINIT_FUNCTION
+#endif
+
+#ifdef __arch64__
+#define STACKFRAME_SIZE 176
+#define GOT_LOAD ldx
+#else
+#define STACKFRAME_SIZE 96
+#define GOT_LOAD ld
+#endif
+
+ .section .init,"ax",@progbits
+ .p2align 2
+ .globl _init
+ .type _init, @function
+_init:
+ save %sp, -STACKFRAME_SIZE, %sp
+#if PREINIT_FUNCTION_WEAK
+ sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %l7
+ call __sparc_get_pc_thunk.l7
+ add %l7, %lo(_GLOBAL_OFFSET_TABLE_+4), %l7
+ sethi %hi(PREINIT_FUNCTION), %g1
+ or %g1, %lo(PREINIT_FUNCTION), %g1
+ GOT_LOAD [%l7 + %g1], %g1
+ cmp %g1, 0
+ be 1f
+ nop
+ call PREINIT_FUNCTION
+ nop
+1:
+#else
+ call PREINIT_FUNCTION
+ nop
+#endif
+
+ .section .fini,"ax",@progbits
+ .p2align 2
+ .globl _fini
+ .type _fini, @function
+_fini:
+ save %sp, -STACKFRAME_SIZE, %sp
+
+ .section .text.__sparc_get_pc_thunk.l7,"axG",@progbits,__sparc_get_pc_thunk.l7,comdat
+ .p2align 2
+ .weak __sparc_get_pc_thunk.l7
+ .hidden __sparc_get_pc_thunk.l7
+ .type __sparc_get_pc_thunk.l7, #function
+__sparc_get_pc_thunk.l7:
+ jmp %o7 + 8
+ add %o7, %l7, %l7
Added: fsf/trunk/libc/sysdeps/sparc/crtn.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/crtn.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/crtn.S Thu Feb 16 00:04:58 2012
@@ -1,0 +1,45 @@
+/* Special .init and .fini section support for sparc.
+ Copyright (C) 1995-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/>. */
+
+/* crtn.S puts function epilogues in the .init and .fini sections
+ corresponding to the prologues in crti.S. */
+
+ .section .init,"ax",@progbits
+ jmp %i7 + 8
+ restore
+
+ .section .fini,"ax",@progbits
+ jmp %i7 + 8
+ restore
Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/Makefile (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/Makefile Thu Feb 16 00:04:58 2012
@@ -18,10 +18,6 @@
ifeq ($(subdir),gnulib)
sysdep_routines = dotmul umul $(divrem) alloca
endif # gnulib
-
-ifeq ($(subdir),csu)
-CFLAGS-initfini.s += -mcpu=v7
-endif
# We distribute these files, even though they are generated,
# so as to avoid the need for a functioning m4 to build the library.
Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/Makefile (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/Makefile Thu Feb 16 00:04:58 2012
@@ -3,10 +3,6 @@
elide-routines.os += hp-timing
endif
-ifeq ($(subdir),csu)
-CFLAGS-initfini.s += -mcpu=v9
-endif
-
ifeq ($(subdir),string)
sysdep_routines += align-cpy
endif
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile Thu Feb 16 00:04:58 2012
@@ -32,7 +32,8 @@
scsi/sg.h scsi/scsi.h scsi/scsi_ioctl.h sys/pci.h \
sys/ultrasound.h sys/raw.h sys/personality.h sys/epoll.h \
bits/a.out.h sys/inotify.h sys/signalfd.h sys/eventfd.h \
- sys/timerfd.h sys/fanotify.h bits/eventfd.h bits/inotify.h
+ sys/timerfd.h sys/fanotify.h bits/eventfd.h bits/inotify.h \
+ bits/signalfd.h
install-others += $(inst_includedir)/bits/syscall.h
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/signalfd.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/signalfd.h (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/signalfd.h Thu Feb 16 00:04:58 2012
@@ -1,0 +1,29 @@
+/* Copyright (C) 2007-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.
+
+ 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/>. */
+
+#ifndef _SYS_SIGNALFD_H
+# error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead."
+#endif
+
+/* Flags for signalfd. */
+enum
+ {
+ SFD_CLOEXEC = 02000000,
+#define SFD_CLOEXEC SFD_CLOEXEC
+ SFD_NONBLOCK = 00004000
+#define SFD_NONBLOCK SFD_NONBLOCK
+ };
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/getcwd.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/getcwd.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/getcwd.c Thu Feb 16 00:04:58 2012
@@ -1,6 +1,5 @@
/* Determine current working directory. Linux version.
- Copyright (C) 1997,1998,1999,2000,2002,2003,2006,2011
- Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
@@ -23,6 +22,7 @@
#include <limits.h>
#include <stdlib.h>
#include <unistd.h>
+#include <sys/param.h>
#include <sysdep.h>
#include <sys/syscall.h>
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h Thu Feb 16 00:04:58 2012
@@ -39,6 +39,7 @@
#define O_TRUNC 0x0400 /* not fcntl */
#define O_EXCL 0x0800 /* not fcntl */
#define O_SYNC 0x802000
+#define O_FSYNC O_SYNC
#define O_NONBLOCK 0x4000
#define O_NDELAY (0x0004 | O_NONBLOCK)
#define O_NOCTTY 0x8000 /* not fcntl */
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/signalfd.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/signalfd.h (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/signalfd.h Thu Feb 16 00:04:58 2012
@@ -1,0 +1,29 @@
+/* Copyright (C) 2007-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.
+
+ 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/>. */
+
+#ifndef _SYS_SIGNALFD_H
+# error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead."
+#endif
+
+/* Flags for signalfd. */
+enum
+ {
+ SFD_CLOEXEC = 0x400000,
+#define SFD_CLOEXEC SFD_CLOEXEC
+ SFD_NONBLOCK = 0x004000
+#define SFD_NONBLOCK SFD_NONBLOCK
+ };
Removed: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sys/signalfd.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sys/signalfd.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sys/signalfd.h (removed)
@@ -1,65 +1,0 @@
-/* Copyright (C) 2007, 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.
-
- 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/>. */
-
-#ifndef _SYS_SIGNALFD_H
-#define _SYS_SIGNALFD_H 1
-
-#define __need_sigset_t
-#include <signal.h>
-#include <stdint.h>
-
-
-struct signalfd_siginfo
-{
- uint32_t ssi_signo;
- int32_t ssi_errno;
- int32_t ssi_code;
- uint32_t ssi_pid;
- uint32_t ssi_uid;
- int32_t ssi_fd;
- uint32_t ssi_tid;
- uint32_t ssi_band;
- uint32_t ssi_overrun;
- uint32_t ssi_trapno;
- int32_t ssi_status;
- int32_t ssi_int;
- uint64_t ssi_ptr;
- uint64_t ssi_utime;
- uint64_t ssi_stime;
- uint64_t ssi_addr;
- uint8_t __pad[48];
-};
-
-/* Flags for signalfd. */
-enum
- {
- SFD_CLOEXEC = 0x400000,
-#define SFD_CLOEXEC SFD_CLOEXEC
- SFD_NONBLOCK = 0x4000
-#define SFD_NONBLOCK SFD_NONBLOCK
- };
-
-__BEGIN_DECLS
-
-/* Request notification for delivery of signals in MASK to be
- performed using descriptor FD.*/
-extern int signalfd (int __fd, const sigset_t *__mask, int __flags)
- __THROW __nonnull ((2));
-
-__END_DECLS
-
-#endif /* sys/signalfd.h */
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/signalfd.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/signalfd.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/signalfd.h Thu Feb 16 00:04:58 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2007-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
@@ -22,6 +22,8 @@
#include <signal.h>
#include <stdint.h>
+/* Get the platform-dependent flags. */
+#include <bits/signalfd.h>
struct signalfd_siginfo
{
@@ -44,15 +46,6 @@
uint8_t __pad[48];
};
-/* Flags for signalfd. */
-enum
- {
- SFD_CLOEXEC = 02000000,
-#define SFD_CLOEXEC SFD_CLOEXEC
- SFD_NONBLOCK = 04000
-#define SFD_NONBLOCK SFD_NONBLOCK
- };
-
__BEGIN_DECLS
/* Request notification for delivery of signals in MASK to be
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits