[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r17238 - in /fsf/trunk/libc: ./ csu/ manual/ nptl/ nptl/sysdeps/pthread/ sysdeps/generic/ sysdeps/powerpc/powerpc32/ sysdeps...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r17238 - in /fsf/trunk/libc: ./ csu/ manual/ nptl/ nptl/sysdeps/pthread/ sysdeps/generic/ sysdeps/powerpc/powerpc32/ sysdeps...
- From: eglibc@xxxxxxxxxx
- Date: Wed, 22 Feb 2012 00:02:26 -0000
Author: eglibc
Date: Wed Feb 22 00:02:24 2012
New Revision: 17238
Log:
Import glibc-mainline for 2012-02-22
Added:
fsf/trunk/libc/sysdeps/sparc/elf/configure
fsf/trunk/libc/sysdeps/sparc/elf/configure.in
fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/epoll.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/timerfd.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/epoll.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/timerfd.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/epoll.h
Removed:
fsf/trunk/libc/csu/defs.awk
fsf/trunk/libc/nptl/sysdeps/pthread/pt-initfini.c
fsf/trunk/libc/sysdeps/generic/initfini.c
fsf/trunk/libc/sysdeps/sparc/sparc32/elf/configure
fsf/trunk/libc/sysdeps/sparc/sparc32/elf/configure.in
fsf/trunk/libc/sysdeps/sparc/sparc64/elf/configure
fsf/trunk/libc/sysdeps/sparc/sparc64/elf/configure.in
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sys/epoll.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sys/timerfd.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/INSTALL
fsf/trunk/libc/NEWS
fsf/trunk/libc/config.h.in
fsf/trunk/libc/csu/Makefile
fsf/trunk/libc/manual/install.texi
fsf/trunk/libc/manual/libc.texinfo
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/Makefile
fsf/trunk/libc/sysdeps/powerpc/powerpc32/Makefile
fsf/trunk/libc/sysdeps/powerpc/powerpc64/Makefile
fsf/trunk/libc/sysdeps/sparc/crti.S
fsf/trunk/libc/sysdeps/sparc/sparc32/__longjmp.S
fsf/trunk/libc/sysdeps/sparc/sparc32/dl-machine.h
fsf/trunk/libc/sysdeps/sparc/sparc32/elf/start.S
fsf/trunk/libc/sysdeps/sparc/sparc32/fpu/libm-test-ulps
fsf/trunk/libc/sysdeps/sparc/sparc64/dl-machine.h
fsf/trunk/libc/sysdeps/sparc/sparc64/elf/start.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/libm-test-ulps
fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S
fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset.S
fsf/trunk/libc/sysdeps/unix/sparc/sysdep.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/____longjmp_chk.S
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/brk.S
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/epoll.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/timerfd.h
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Wed Feb 22 00:02:24 2012
@@ -1,3 +1,117 @@
+2012-02-21 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/sparc/sparc32/fpu/libm-test-ulps: More jn test ULP updates.
+ * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Likewise.
+
+2012-02-20 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/sparc/sparc32/__longjmp.S: Unwind in the 'thread' path
+ using a normal save/restore sequence, rather than allocating a
+ dummy stack frame just to store a frame pointer and restore.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S: Likewise.
+
+2012-02-21 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * manual/install.texi: Fix stray word in line-wrapped comment.
+
+2012-02-20 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/sparc/elf/configure.in (PI_STATIC_AND_HIDDEN): Define if
+ both binutils and gcc support GOTDATA.
+
+ * sysdeps/unix/sparc/sysdep.h: Document why we don't use
+ "rd %pc" in the PIC register setup sequences.
+
+ * sysdeps/sparc/crti.S: Try to use GOTDATA relocs.
+ * sysdeps/sparc/sparc32/dl-machine.h (RTLD_START): Likewise.
+ * sysdeps/sparc/sparc32/elf/start.S: Likewise.
+ * sysdeps/sparc/sparc64/dl-machine.h (RTLD_START): Likewise.
+ * sysdeps/sparc/sparc64/elf/start.S: Likewise.
+ * sysdeps/sparc/sparc64/multiarch/memcpy.S: Likewise.
+ * sysdeps/sparc/sparc64/multiarch/memset.S: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
+ (SYSCALL_ERROR_HANDLER): Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/____longjmp_chk.S: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/brk.S: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
+ (SYSCALL_ERROR_HANDLER): Likewise.
+
+ * config.h.in (HAVE_BINUTILS_GOTDATA): New.
+ (HAVE_GCC_GOTDATA): New.
+ * sysdeps/sparc/elf/configure.in: Test for GOTDATA
+ relocation support in both binutils and gcc.
+ * sysdeps/sparc/elf/configure: Regenerate.
+
+ * sysdeps/sparc/sparc32/elf/configure.in: Delete.
+ * sysdeps/sparc/sparc32/elf/configure: Delete.
+ * sysdeps/sparc/sparc64/elf/configure.in: Delete.
+ * sysdeps/sparc/sparc64/elf/configure: Delete.
+ * sysdeps/sparc/elf/configure.in: New file.
+ * sysdeps/sparc/elf/configure: Generate.
+
+ * sysdeps/sparc/sparc32/elf/configure.in: Delete WDISP22 check.
+ * sysdeps/sparc/sparc32/elf/configure: Regenerate.
+ * sysdeps/sparc/sparc64/elf/configure.in: Likewise.
+ * sysdeps/sparc/sparc64/elf/configure: Regenerate.
+ * config.h.in (BROKEN_SPARC_WDISP22): Remove.
+
+2012-02-21 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * manual/install.texi: Do not mention specific glibc version
+ numbers.
+ * manual/libc.texinfo (VERSION, UPDATED): Update.
+ (@copying): Use @copyright{} and range of years.
+
+2012-02-21 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ [BZ #13695]
+ * csu/Makefile (distribute): Remove initfini.c and defs.awk.
+ [crti.S not in sysdirs] (generated): Do not append.
+ [crti.S not in sysdirs] (omit-deps): Likewise.
+ [crti.S not in sysdirs] ($(crtstuff:%=$(objpfx)%.o)): Remove rule.
+ [crti.S not in sysdirs] ($(objpfx)initfini.s): Likewise.
+ [crti.S not in sysdirs] ($(objpfx)crti.S): Likewise.
+ [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
+ [crti.S not in sysdirs] ($(patsubst %,$(objpfx)crt%.o,i n)):
+ Likewise.
+ [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
+ [crti.S not in sysdirs] (CFLAGS-initfini.s): Remove variable.
+ [crti.S not in sysdirs] (initfini.c): Remove vpath directive.
+ * csu/defs.awk: Remove file.
+ * sysdeps/generic/initfini.c: Likewise.
+ * sysdeps/powerpc/powerpc32/Makefile (CFLAGS-initfini.s): Remove
+ variable.
+ * sysdeps/powerpc/powerpc64/Makefile (CFLAGS-initfini.s):
+ Likewise.
+
+2012-02-20 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/bits/epoll.h: New file.
+ * sysdeps/unix/sysv/linux/sparc/bits/epoll.h: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/bits/epoll.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sys/epoll.h: Remove
+ * sysdeps/unix/sysv/linux/x86_64/sys/epoll.h: Likewise.
+ * sysdeps/unix/sysv/linux/sys/epoll.h: Get flags from
+ <bits/epoll.h>.
+ (EPOLL_CLOEXEC, EPOLL_NONBLOCK): Don't define here.
+ (__EPOLL_PACKED): Define to empty if not defined by
+ <bits/epoll.h>.
+ (struct epoll_event): Use __EPOLL_PACKED to make possibly packed.
+ * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
+ bits/epoll.h.
+
+2012-02-20 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/bits/timerfd.h: New file.
+ * sysdeps/unix/sysv/linux/sparc/bits/timerfd.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sys/timerfd.h: Remove.
+ * sysdeps/unix/sysv/linux/sys/timerfd.h: Get flags from
+ <bits/timerfd.h>.
+ (TFD_CLOEXEC, TFD_NONBLOCK): Don't define here.
+ * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
+ bits/timerfd.h.
+
2012-02-20 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/i386/fpu/libm-test-ulps: Resort with gen-libm-test.pl -n
Modified: fsf/trunk/libc/INSTALL
==============================================================================
--- fsf/trunk/libc/INSTALL (original)
+++ fsf/trunk/libc/INSTALL Wed Feb 22 00:02:24 2012
@@ -20,7 +20,7 @@
GNU libc cannot be compiled in the source directory. You must build it
in a separate build directory. For example, if you have unpacked the
-glibc sources in `/src/gnu/glibc-2.4', create a directory
+glibc sources in `/src/gnu/glibc-VERSION', create a directory
`/src/gnu/glibc-build' to put the object files in. This allows
removing the whole build directory in case an error occurs, which is
the safest way to get a fresh start and should always be done.
@@ -28,7 +28,7 @@
From your object directory, run the shell script `configure' located
at the top level of the source tree. In the scenario above, you'd type
- $ ../glibc-2.4/configure ARGS...
+ $ ../glibc-VERSION/configure ARGS...
Please note that even though you're building in a separate build
directory, the compilation needs to modify a few files in the source
@@ -79,7 +79,7 @@
absolute directory name or can be a directory name relative to the
main source directory, or relative to the build directory (that
is, the current working directory). For example,
- `--enable-add-ons=nptl,../glibc-libidn-2.4'.
+ `--enable-add-ons=nptl,../glibc-libidn-VERSION'.
`--enable-kernel=VERSION'
This option is currently only useful on GNU/Linux systems. The
@@ -100,8 +100,6 @@
`--without-fp'
Use this option if your computer lacks hardware floating-point
support and your operating system does not emulate an FPU.
-
- these
`--disable-shared'
Don't build shared libraries even if it is possible. Not all
@@ -235,8 +233,8 @@
environment or preparing a binary distribution. The directory should be
specified with an absolute file name.
- Glibc 2.2 includes a daemon called `nscd', which you may or may not
-want to run. `nscd' caches name service lookups; it can dramatically
+ Glibc includes a daemon called `nscd', which you may or may not want
+to run. `nscd' caches name service lookups; it can dramatically
improve performance with NIS+, and may help with DNS as well.
One auxiliary program, `/usr/libexec/pt_chown', is installed setuid
@@ -282,16 +280,15 @@
* GCC 3.4 or newer, GCC 4.1 recommended
- For the 2.4 release or later, GCC 3.4 or higher is required; as of
- this writing, GCC 4.4 is the compiler we advise to use for current
- versions. On certain machines including `powerpc64', compilers
- prior to GCC 4.0 have bugs that prevent them compiling the C
- library code in the 2.4 release. On other machines, GCC 4.1 is
- required to build the C library with support for the correct `long
- double' type format; these include `powerpc' (32 bit), `s390' and
- `s390x'. For other architectures special compiler-provided
- headers are needed (like `cpuid.h' on x86) which only come with
- later compiler versions.
+ GCC 3.4 or higher is required; as of this writing, GCC 4.4 is the
+ compiler we advise to use for current versions. On certain
+ machines including `powerpc64', compilers prior to GCC 4.0 have
+ bugs that prevent them compiling the C library code. On other
+ machines, GCC 4.1 is required to build the C library with support
+ for the correct `long double' type format; these include `powerpc'
+ (32 bit), `s390' and `s390x'. For other architectures special
+ compiler-provided headers are needed (like `cpuid.h' on x86) which
+ only come with later compiler versions.
You can use whatever compiler you like to compile programs that
use GNU libc, but be aware that both GCC 2.7 and 2.8 have bugs in
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Wed Feb 22 00:02:24 2012
@@ -12,7 +12,7 @@
174, 350, 411, 3335, 4026, 4596, 4822, 5077, 5805, 5993, 6884, 6907, 9739,
9902, 10140, 10210, 11174, 11322, 11494, 12047, 13058, 13525, 13526,
13527, 13528, 13529, 13530, 13531, 13532, 13533, 13547, 13551, 13552,
- 13553, 13555, 13559, 13583, 13618, 13704
+ 13553, 13555, 13559, 13583, 13618, 13695, 13704
* ISO C11 support:
Modified: fsf/trunk/libc/config.h.in
==============================================================================
--- fsf/trunk/libc/config.h.in (original)
+++ fsf/trunk/libc/config.h.in Wed Feb 22 00:02:24 2012
@@ -87,9 +87,11 @@
certain registers (CR0, MQ, CTR, LR) in asm statements. */
#undef BROKEN_PPC_ASM_CR0
-/* Defined on SPARC if ld does not handle R_SPARC_WDISP22 against .hidden
- symbol. sysdeps/sparc/sparc32/elf/configure. */
-#undef BROKEN_SPARC_WDISP22
+/* Defined on SPARC if as and ld both support GOTDATA relocations. */
+#undef HAVE_BINUTILS_GOTDATA
+
+/* Defined on SPARC if GCC emits GOTDATA relocations. */
+#undef HAVE_GCC_GOTDATA
/* Define if the linker supports the -z combreloc option. */
#undef HAVE_Z_COMBRELOC
Modified: fsf/trunk/libc/csu/Makefile
==============================================================================
--- fsf/trunk/libc/csu/Makefile (original)
+++ fsf/trunk/libc/csu/Makefile Wed Feb 22 00:02:24 2012
@@ -20,8 +20,7 @@
# consists of the startfile, built from start.c and installed as crt0.o
# (traditionally) or crt1.o (for ELF). In ELF we also install crti.o and
# crtn.o, special "initializer" and "finalizer" files used in the link
-# to make the .init and .fini sections work right; both these files are
-# built (in an arcane manner) from initfini.c.
+# to make the .init and .fini sections work right.
subdir := csu
@@ -38,7 +37,7 @@
b$(start-installed-name) $(csu-dummies) \
S$(start-installed-name))
install-lib = $(start-installed-name) g$(start-installed-name) $(csu-dummies)
-distribute = initfini.c gmon-start.c start.c defs.awk \
+distribute = gmon-start.c start.c \
abi-note.S init.c c not-cancel.h
generated = version-info.h
before-compile = $(objpfx)version-info.h
@@ -79,50 +78,6 @@
install-lib += $(crtstuff:=.o)
extra-objs += $(crtstuff:=.o)
-
-# Conditionals on the existence of a sysdeps version of crti.S are
-# temporary until all targets either have such a file or have been
-# removed, after which the old approach of postprocessing compiler
-# output will be removed.
-ifeq (,$(wildcard $(sysdirs:%=%/crti.S)))
-
-generated += $(crtstuff:=.S) initfini.s defs.h
-omit-deps += $(crtstuff)
-
-# Special rules for the building of crti.o and crtn.o
-$(crtstuff:%=$(objpfx)%.o): %.o: %.S $(objpfx)defs.h
- $(compile.S) -g0 $(ASFLAGS-.os) -o $@
-
-CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
-
-vpath initfini.c $(sysdirs)
-
-$(objpfx)initfini.s: initfini.c $(before-compile)
- $(compile.c) -S $(CFLAGS-initfini.s) -finhibit-size-directive \
- $(patsubst -f%,-fno-%,$(exceptions)) -o $@
-
-# We only have one kind of startup code files. Static binaries and
-# shared libraries are build using the PIC version.
-$(objpfx)crti.S: $(objpfx)initfini.s
- sed -n -e '1,/@HEADER_ENDS/p' \
- -e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
- -e '/@TRAILER_BEGINS/,$$p' $< > $@
-
-$(objpfx)crtn.S: $(objpfx)initfini.s
- sed -n -e '1,/@HEADER_ENDS/p' \
- -e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \
- -e '/@TRAILER_BEGINS/,$$p' $< > $@
-
-# These explicit rules are necessary when the $(objpfx) subdirectory
-# did not exist at the time make considered the implicit rules using it.
-# This comes up with a fresh build using no_deps=t.
-$(patsubst %,$(objpfx)crt%.o,i n): %.o: %.S
-
-$(objpfx)defs.h: $(objpfx)initfini.s
- sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
- $(AWK) -f defs.awk > $@
-
-endif
extra-objs += abi-note.o init.o
asm-CPPFLAGS += -I$(objpfx).
Removed: fsf/trunk/libc/csu/defs.awk
==============================================================================
--- fsf/trunk/libc/csu/defs.awk (original)
+++ fsf/trunk/libc/csu/defs.awk (removed)
@@ -1,27 +1,0 @@
-/^[ ]*\.endp/ { need_endp = 1 }
-/^[ ]*\.end/ { need_end = 1 }
-/^[ ]*\.align/ { if($2 > max) max = $2; }
-
-END {
- if(need_endp)
- {
- print "#define END_INIT .endp _init";
- print "#define END_FINI .endp _fini";
- } else if(need_end)
- {
- print "#define END_INIT .end _init";
- print "#define END_FINI .end _fini";
- }
- else
- {
- print "#define END_INIT";
- print "#define END_FINI";
- }
- if(max)
- print "#define ALIGN .align", max;
- else
- print "#define ALIGN";
-
- print "#include <libc-symbols.h>";
- print "weak_extern (__gmon_start__)";
-}
Modified: fsf/trunk/libc/manual/install.texi
==============================================================================
--- fsf/trunk/libc/manual/install.texi (original)
+++ fsf/trunk/libc/manual/install.texi Wed Feb 22 00:02:24 2012
@@ -35,7 +35,7 @@
GNU libc cannot be compiled in the source directory. You must build
it in a separate build directory. For example, if you have unpacked
-the glibc sources in @file{/src/gnu/glibc-2.4}, create a directory
+the glibc sources in @file{/src/gnu/glibc-@var{version}}, create a directory
@file{/src/gnu/glibc-build} to put the object files in. This allows
removing the whole build directory in case an error occurs, which is
the safest way to get a fresh start and should always be done.
@@ -44,7 +44,7 @@
at the top level of the source tree. In the scenario above, you'd type
@smallexample
-$ ../glibc-2.4/configure @var{args@dots{}}
+$ ../glibc-@var{version}/configure @var{args@dots{}}
@end smallexample
Please note that even though you're building in a separate build
@@ -98,7 +98,7 @@
shell). Each add-on in @var{list} can be an absolute directory name
or can be a directory name relative to the main source directory, or
relative to the build directory (that is, the current working directory).
-For example, @samp{--enable-add-ons=nptl,../glibc-libidn-2.4}.
+For example, @samp{--enable-add-ons=nptl,../glibc-libidn-@var{version}}.
@item --enable-kernel=@var{version}
This option is currently only useful on GNU/Linux systems. The
@@ -122,8 +122,7 @@
@c disable static doesn't work currently
@c @item --disable-static
-@c Don't build static libraries. Static libraries aren't that useful
- these
+@c Don't build static libraries. Static libraries aren't that useful these
@c days, but we recommend you build them in case you need them.
@item --disable-shared
@@ -262,7 +261,7 @@
environment or preparing a binary distribution. The directory should be
specified with an absolute file name.
-Glibc 2.2 includes a daemon called @code{nscd}, which you
+Glibc includes a daemon called @code{nscd}, which you
may or may not want to run. @code{nscd} caches name service lookups; it
can dramatically improve performance with NIS+, and may help with DNS as
well.
@@ -315,11 +314,11 @@
@item
GCC 3.4 or newer, GCC 4.1 recommended
-For the 2.4 release or later, GCC 3.4 or higher is required; as of this
+GCC 3.4 or higher is required; as of this
writing, GCC 4.4 is the compiler we advise to use for current versions.
On certain machines including @code{powerpc64}, compilers prior to GCC
-4.0 have bugs that prevent them compiling the C library code in the
-2.4 release. On other machines, GCC 4.1 is required to build the C
+4.0 have bugs that prevent them compiling the C library code. On other
+machines, GCC 4.1 is required to build the C
library with support for the correct @code{long double} type format;
these include @code{powerpc} (32 bit), @code{s390} and @code{s390x}. For
other architectures special compiler-provided headers are needed
Modified: fsf/trunk/libc/manual/libc.texinfo
==============================================================================
--- fsf/trunk/libc/manual/libc.texinfo (original)
+++ fsf/trunk/libc/manual/libc.texinfo Wed Feb 22 00:02:24 2012
@@ -19,8 +19,8 @@
@c sold 0.06/1.09, print run out 21may96
@set EDITION 0.13
-@set VERSION 2.14
-@set UPDATED 2011-07-19
+@set VERSION 2.15.90
+@set UPDATED 2012-02-21
@set ISBN 1-882114-55-8
@copying
@@ -29,8 +29,7 @@
This is Edition @value{EDITION}, last updated @value{UPDATED},
of @cite{The GNU C Library Reference Manual}, for version @value{VERSION}.
-Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002,
-2003, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
+Copyright @copyright{} 1993--2012 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Wed Feb 22 00:02:24 2012
@@ -1,3 +1,21 @@
+2012-02-21 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ [BZ #13695]
+ * Makefile (generated): Remove crti.S, crtn.S, defs.h and
+ pt-initfini.s.
+ [crti.S not in sysdirs] (omit-deps): Do not append.
+ [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
+ [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
+ [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
+ [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
+ [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
+ [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
+ [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
+ [crti.S in sysdirs] (extra-objs): Append unconditionally.
+ [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
+ unconditionally.
+ * sysdeps/pthread/pt-initfini.c: Remove file.
+
2012-02-16 Richard Henderson <rth@xxxxxxxxxxx>
* nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
Modified: fsf/trunk/libc/nptl/Makefile
==============================================================================
--- fsf/trunk/libc/nptl/Makefile (original)
+++ fsf/trunk/libc/nptl/Makefile Wed Feb 22 00:02:24 2012
@@ -334,24 +334,11 @@
generated-dirs := $(firstword $(subst /, , $(multidir)))
crti-objs += $(multidir)/crti.o
crtn-objs += $(multidir)/crtn.o
-# Conditionals on the existence of a sysdeps version of crti.S are
-# temporary until all targets either have such a file or have been
-# removed, after which the old approach of postprocessing compiler
-# output will be removed.
-ifeq (,$(wildcard $(sysdirs:%=%/crti.S)))
-omit-deps += $(multidir)/crti $(multidir)/crtn
-endif
$(objpfx)$(multidir):
mkdir -p $@
endif
extra-objs += $(crti-objs) $(crtn-objs)
-ifeq (,$(wildcard $(sysdirs:%=%/crti.S)))
-omit-deps += crti crtn
-
-CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
-else
extra-objs += pt-crti.o
-endif
endif
CFLAGS-flockfile.c = -D_IO_MTSAFE_IO
@@ -551,46 +538,12 @@
endif
ifeq ($(build-shared),yes)
-ifeq (,$(wildcard $(sysdirs:%=%/crti.S)))
-vpath pt-initfini.c $(sysdirs)
-
-$(objpfx)pt-initfini.s: pt-initfini.c
- $(compile.c) -S $(CFLAGS-pt-initfini.s) -finhibit-size-directive \
- $(patsubst -f%,-fno-%,$(exceptions)) -o $@
-endif
$(objpfx)tst-cleanup0.out: /dev/null $(objpfx)tst-cleanup0
$(make-test-out) 2>&1 | cmp - tst-cleanup0.expect > $@
-ifneq (,$(wildcard $(sysdirs:%=%/crti.S)))
-
$(objpfx)crti.o: $(objpfx)pt-crti.o
ln -f $< $@
-
-else
-
-# We only have one kind of startup code files. Static binaries and
-# shared libraries are build using the PIC version.
-$(objpfx)crti.S: $(objpfx)pt-initfini.s
- sed -n -e '1,/@HEADER_ENDS/p' \
- -e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
- -e '/@TRAILER_BEGINS/,$$p' $< > $@
-$(objpfx)crtn.S: $(objpfx)pt-initfini.s
- sed -n -e '1,/@HEADER_ENDS/p' \
- -e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \
- -e '/@TRAILER_BEGINS/,$$p' $< > $@
-
-$(objpfx)defs.h: $(objpfx)pt-initfini.s
- sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
- $(AWK) -f ../csu/defs.awk > $@
-
-$(objpfx)crti.o: $(objpfx)crti.S $(objpfx)defs.h
- $(compile.S) -g0 $(ASFLAGS-.os) -o $@
-
-$(objpfx)crtn.o: $(objpfx)crtn.S $(objpfx)defs.h
- $(compile.S) -g0 $(ASFLAGS-.os) -o $@
-
-endif
ifneq ($(multidir),.)
$(objpfx)$(multidir)/crti.o: $(objpfx)crti.o $(objpfx)$(multidir)/
@@ -600,7 +553,7 @@
ln -f $< $@
endif
-generated += crti.S crtn.S defs.h pt-initfini.s libpthread_nonshared.a \
+generated += libpthread_nonshared.a \
multidir.mk tst-atfork2.mtrace tst-cancel-wrappers.out \
tst-tls6.out
Removed: fsf/trunk/libc/nptl/sysdeps/pthread/pt-initfini.c
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/pthread/pt-initfini.c (original)
+++ fsf/trunk/libc/nptl/sysdeps/pthread/pt-initfini.c (removed)
@@ -1,124 +1,0 @@
-/* Special .init and .fini section support. Linuxthread version.
- Copyright (C) 1995,1996,1997,2000,2001,2002 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 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 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 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; 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. */
-
-#include <stdlib.h>
-
-/* We use embedded asm for .section unconditionally, as this makes it
- easier to insert the necessary directives into crtn.S. */
-#define SECTION(x) asm (".section " x )
-
-/* Embed an #include to pull in the alignment and .end directives. */
-asm ("\n#include \"defs.h\"");
-
-/* The initial common code ends here. */
-asm ("\n/*@HEADER_ENDS*/");
-
-/* To determine whether we need .end and .align: */
-asm ("\n/*@TESTS_BEGIN*/");
-extern void dummy (void (*foo) (void));
-void
-dummy (void (*foo) (void))
-{
- if (foo)
- (*foo) ();
-}
-asm ("\n/*@TESTS_END*/");
-
-/* The beginning of _init: */
-asm ("\n/*@_init_PROLOG_BEGINS*/");
-
-static void
-call_initialize_minimal (void)
-{
- extern void __pthread_initialize_minimal_internal (void)
- __attribute ((visibility ("hidden")));
-
- __pthread_initialize_minimal_internal ();
-}
-
-SECTION (".init");
-extern void __attribute__ ((section (".init"))) _init (void);
-void
-_init (void)
-{
- /* The very first thing we must do is to set up the registers. */
- call_initialize_minimal ();
-
- asm ("ALIGN");
- asm("END_INIT");
- /* Now the epilog. */
- asm ("\n/*@_init_PROLOG_ENDS*/");
- asm ("\n/*@_init_EPILOG_BEGINS*/");
- SECTION(".init");
-}
-asm ("END_INIT");
-
-/* End of the _init epilog, beginning of the _fini prolog. */
-asm ("\n/*@_init_EPILOG_ENDS*/");
-asm ("\n/*@_fini_PROLOG_BEGINS*/");
-
-SECTION (".fini");
-extern void __attribute__ ((section (".fini"))) _fini (void);
-void
-_fini (void)
-{
-
- /* End of the _fini prolog. */
- asm ("ALIGN");
- asm ("END_FINI");
- asm ("\n/*@_fini_PROLOG_ENDS*/");
-
- {
- /* Let GCC know that _fini is not a leaf function by having a dummy
- function call here. We arrange for this call to be omitted from
- either crt file. */
- extern void i_am_not_a_leaf (void);
- i_am_not_a_leaf ();
- }
-
- /* Beginning of the _fini epilog. */
- asm ("\n/*@_fini_EPILOG_BEGINS*/");
- SECTION (".fini");
-}
-asm ("END_FINI");
-
-/* End of the _fini epilog. Any further generated assembly (e.g. .ident)
- is shared between both crt files. */
-asm ("\n/*@_fini_EPILOG_ENDS*/");
-asm ("\n/*@TRAILER_BEGINS*/");
-
-/* End of file. */
Removed: fsf/trunk/libc/sysdeps/generic/initfini.c
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/initfini.c (original)
+++ fsf/trunk/libc/sysdeps/generic/initfini.c (removed)
@@ -1,138 +1,0 @@
-/* Special .init and .fini section support.
- Copyright (C) 1995, 1996, 1997, 2000 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. */
-
-#include <stdlib.h>
-
-/* We use embedded asm for .section unconditionally, as this makes it
- easier to insert the necessary directives into crtn.S. */
-#define SECTION(x) asm (".section " x )
-
-/* Embed an #include to pull in the alignment and .end directives. */
-asm ("\n#include \"defs.h\"");
-
-/* The initial common code ends here. */
-asm ("\n/*@HEADER_ENDS*/");
-
-/* To determine whether we need .end and .align: */
-asm ("\n/*@TESTS_BEGIN*/");
-extern void dummy (void (*foo) (void));
-void
-dummy (void (*foo) (void))
-{
- if (foo)
- (*foo) ();
-}
-asm ("\n/*@TESTS_END*/");
-
-/* The beginning of _init: */
-asm ("\n/*@_init_PROLOG_BEGINS*/");
-
-static void
-call_gmon_start(void)
-{
- extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/
- void (*gmon_start) (void) = __gmon_start__;
-
- if (gmon_start)
- gmon_start ();
-}
-
-SECTION (".init");
-extern void __attribute__ ((section (".init"))) _init (void);
-void
-_init (void)
-{
- /* We cannot use the normal constructor mechanism in gcrt1.o because it
- appears before crtbegin.o in the link, so the header elt of .ctors
- would come after the elt for __gmon_start__. One approach is for
- gcrt1.o to reference a symbol which would be defined by some library
- module which has a constructor; but then user code's constructors
- would come first, and not be profiled. */
- call_gmon_start ();
-
- asm ("ALIGN");
- asm("END_INIT");
- /* Now the epilog. */
- asm ("\n/*@_init_PROLOG_ENDS*/");
- asm ("\n/*@_init_EPILOG_BEGINS*/");
- SECTION(".init");
-}
-asm ("END_INIT");
-
-/* End of the _init epilog, beginning of the _fini prolog. */
-asm ("\n/*@_init_EPILOG_ENDS*/");
-asm ("\n/*@_fini_PROLOG_BEGINS*/");
-
-SECTION (".fini");
-extern void __attribute__ ((section (".fini"))) _fini (void);
-void
-_fini (void)
-{
-
- /* End of the _fini prolog. */
- asm ("ALIGN");
- asm ("END_FINI");
- asm ("\n/*@_fini_PROLOG_ENDS*/");
-
- {
- /* Let GCC know that _fini is not a leaf function by having a dummy
- function call here. We arrange for this call to be omitted from
- either crt file. */
- extern void i_am_not_a_leaf (void);
- i_am_not_a_leaf ();
- }
-
- /* Beginning of the _fini epilog. */
- asm ("\n/*@_fini_EPILOG_BEGINS*/");
- SECTION (".fini");
-}
-asm ("END_FINI");
-
-/* End of the _fini epilog. Any further generated assembly (e.g. .ident)
- is shared between both crt files. */
-asm ("\n/*@_fini_EPILOG_ENDS*/");
-asm ("\n/*@TRAILER_BEGINS*/");
-
-/* End of file. */
Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc32/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc32/Makefile (original)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc32/Makefile Wed Feb 22 00:02:24 2012
@@ -23,10 +23,6 @@
endif
ifeq ($(subdir),csu)
-# The initfini generation code doesn't work in the presence of -fPIC, so
-# we use -fpic instead which is much better.
-CFLAGS-initfini.s += -fpic -O1
-
# There is no benefit to using sdata for these objects, and the user
# of the library should be able to control what goes into sdata.
CFLAGS-init.o = -G0
Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc64/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc64/Makefile (original)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc64/Makefile Wed Feb 22 00:02:24 2012
@@ -28,9 +28,6 @@
ifeq ($(subdir),csu)
sysdep_routines += hp-timing
elide-routines.os += hp-timing
-# The initfini generation code doesn't work in the presence of -fPIC, so
-# we use -fpic instead which is much better.
-CFLAGS-initfini.s += -fpic -O1
endif
ifeq ($(subdir),elf)
Modified: fsf/trunk/libc/sysdeps/sparc/crti.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/crti.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/crti.S Wed Feb 22 00:02:24 2012
@@ -71,9 +71,15 @@
save %sp, -STACKFRAME_SIZE, %sp
#if PREINIT_FUNCTION_WEAK
SETUP_PIC_REG(l7)
+#ifdef HAVE_BINUTILS_GOTDATA
+ sethi %gdop_hix22(PREINIT_FUNCTION), %g1
+ xor %g1, %gdop_lox10(PREINIT_FUNCTION), %g1
+ GOT_LOAD [%l7 + %g1], %g1, %gdop(PREINIT_FUNCTION)
+#else
sethi %hi(PREINIT_FUNCTION), %g1
or %g1, %lo(PREINIT_FUNCTION), %g1
GOT_LOAD [%l7 + %g1], %g1
+#endif
cmp %g1, 0
be 1f
nop
Added: fsf/trunk/libc/sysdeps/sparc/elf/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/elf/configure (added)
+++ fsf/trunk/libc/sysdeps/sparc/elf/configure Wed Feb 22 00:02:24 2012
@@ -1,0 +1,217 @@
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+ # Local configure fragment for sysdeps/sparc/elf.
+
+# Check for support of thread-local storage handling in assembler and linker.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sparc TLS support" >&5
+$as_echo_n "checking for sparc TLS support... " >&6; }
+if ${libc_cv_sparc_tls+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.S <<\EOF
+ .section ".tdata", "awT", @progbits
+ .globl foo
+foo: .word 1
+ .section ".tbss", "awT", @nobits
+ .globl bar
+bar: .skip 4
+ .text
+baz: sethi %tgd_hi22(foo), %l1
+ add %l1, %tgd_lo10(foo), %l1
+ add %l7, %l1, %o0, %tgd_add(foo)
+ call __tls_get_addr, %tgd_call(foo)
+ sethi %tldm_hi22(bar), %l1
+ add %l1, %tldm_lo10(bar), %l1
+ add %l7, %l1, %o0, %tldm_add(bar)
+ call __tls_get_addr, %tldm_call(bar)
+ sethi %tldo_hix22(bar), %l1
+ xor %l1, %tldo_lox10(bar), %l1
+ add %o0, %l1, %l1, %tldo_add(bar)
+ sethi %tie_hi22(foo), %l1
+ add %l1, %tie_lo10(foo), %l1
+#ifdef __arch64__
+ ldx [%l7 + %l1], %l1, %tie_ldx(foo)
+#else
+ ld [%l7 + %l1], %l1, %tie_ld(foo)
+#endif
+ add %g7, %l1, %l1, %tie_add(foo)
+ sethi %tle_hix22(foo), %l1
+ xor %l1, %tle_lox10(foo), %l1
+EOF
+if { ac_try='${CC-cc} -c $CFLAGS conftest.S 1>&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ libc_cv_sparc_tls=yes
+else
+ libc_cv_sparc_tls=no
+fi
+rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sparc_tls" >&5
+$as_echo "$libc_cv_sparc_tls" >&6; }
+if test $libc_cv_sparc_tls = no; then
+ as_fn_error $? "the assembler must support TLS" "$LINENO" 5
+fi
+
+# Check for GOTDATA relocation support in assembler and linker.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sparc binutils GOTDATA reloc support" >&5
+$as_echo_n "checking for sparc binutils GOTDATA reloc support... " >&6; }
+if ${libc_cv_sparc_gotdata+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.S <<\EOF
+ .data
+ .globl data
+data: .word 0
+ .text
+ .globl foo
+foo: sethi %gdop_hix22(data), %g1
+ xor %g1, %gdop_lox10(data), %g1
+#ifdef __arch64__
+ ldx [%l7 + %g1], %g1, %gdop(data)
+#else
+ ld [%l7 + %g1], %g1, %gdop(data)
+#endif
+EOF
+if { ac_try='${CC-cc} -c $CFLAGS conftest.S 1>&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ libc_cv_sparc_gotdata=yes
+else
+ libc_cv_sparc_gotdata=no
+fi
+rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sparc_gotdata" >&5
+$as_echo "$libc_cv_sparc_gotdata" >&6; }
+if test $libc_cv_sparc_gotdata = yes; then
+ $as_echo "#define HAVE_BINUTILS_GOTDATA 1" >>confdefs.h
+
+fi
+
+# Check for a GCC emitting GOTDATA relocations.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sparc gcc GOTDATA reloc support" >&5
+$as_echo_n "checking for sparc gcc GOTDATA reloc support... " >&6; }
+if ${libc_cv_sparc_gcc_gotdata+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<\EOF
+int data;
+int foo(void)
+{
+ return data;
+}
+EOF
+libc_cv_sparc_gcc_gotdata=no
+if { ac_try='${CC-cc} -S $CFLAGS -O2 -fPIC conftest.c 1>&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ if grep -q 'gdop_hix22' conftest.s \
+ && grep -q 'gdop_lox10' conftest.s; then
+ libc_cv_sparc_gcc_gotdata=yes
+ fi
+fi
+rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sparc_gcc_gotdata" >&5
+$as_echo "$libc_cv_sparc_gcc_gotdata" >&6; }
+if test $libc_cv_sparc_gcc_gotdata = yes; then
+ $as_echo "#define HAVE_GCC_GOTDATA 1" >>confdefs.h
+
+fi
+
+if test $libc_cv_sparc_gcc_gotdata = yes \
+ && test $libc_cv_sparc_gotdata = yes; then
+ $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
+
+fi
Added: fsf/trunk/libc/sysdeps/sparc/elf/configure.in
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/elf/configure.in (added)
+++ fsf/trunk/libc/sysdeps/sparc/elf/configure.in Wed Feb 22 00:02:24 2012
@@ -1,0 +1,105 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/sparc/elf.
+
+# Check for support of thread-local storage handling in assembler and linker.
+AC_CACHE_CHECK(for sparc TLS support, libc_cv_sparc_tls, [dnl
+changequote(,)dnl
+cat > conftest.S <<\EOF
+ .section ".tdata", "awT", @progbits
+ .globl foo
+foo: .word 1
+ .section ".tbss", "awT", @nobits
+ .globl bar
+bar: .skip 4
+ .text
+baz: sethi %tgd_hi22(foo), %l1
+ add %l1, %tgd_lo10(foo), %l1
+ add %l7, %l1, %o0, %tgd_add(foo)
+ call __tls_get_addr, %tgd_call(foo)
+ sethi %tldm_hi22(bar), %l1
+ add %l1, %tldm_lo10(bar), %l1
+ add %l7, %l1, %o0, %tldm_add(bar)
+ call __tls_get_addr, %tldm_call(bar)
+ sethi %tldo_hix22(bar), %l1
+ xor %l1, %tldo_lox10(bar), %l1
+ add %o0, %l1, %l1, %tldo_add(bar)
+ sethi %tie_hi22(foo), %l1
+ add %l1, %tie_lo10(foo), %l1
+#ifdef __arch64__
+ ldx [%l7 + %l1], %l1, %tie_ldx(foo)
+#else
+ ld [%l7 + %l1], %l1, %tie_ld(foo)
+#endif
+ add %g7, %l1, %l1, %tie_add(foo)
+ sethi %tle_hix22(foo), %l1
+ xor %l1, %tle_lox10(foo), %l1
+EOF
+changequote([,])dnl
+dnl
+if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.S 1>&AS_MESSAGE_LOG_FD); then
+ libc_cv_sparc_tls=yes
+else
+ libc_cv_sparc_tls=no
+fi
+rm -f conftest*])
+if test $libc_cv_sparc_tls = no; then
+ AC_MSG_ERROR([the assembler must support TLS])
+fi
+
+# Check for GOTDATA relocation support in assembler and linker.
+AC_CACHE_CHECK(for sparc binutils GOTDATA reloc support, libc_cv_sparc_gotdata, [dnl
+changequote(,)dnl
+cat > conftest.S <<\EOF
+ .data
+ .globl data
+data: .word 0
+ .text
+ .globl foo
+foo: sethi %gdop_hix22(data), %g1
+ xor %g1, %gdop_lox10(data), %g1
+#ifdef __arch64__
+ ldx [%l7 + %g1], %g1, %gdop(data)
+#else
+ ld [%l7 + %g1], %g1, %gdop(data)
+#endif
+EOF
+changequote([,])dnl
+dnl
+if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.S 1>&AS_MESSAGE_LOG_FD); then
+ libc_cv_sparc_gotdata=yes
+else
+ libc_cv_sparc_gotdata=no
+fi
+rm -f conftest*])
+if test $libc_cv_sparc_gotdata = yes; then
+ AC_DEFINE(HAVE_BINUTILS_GOTDATA)
+fi
+
+# Check for a GCC emitting GOTDATA relocations.
+AC_CACHE_CHECK(for sparc gcc GOTDATA reloc support, libc_cv_sparc_gcc_gotdata, [dnl
+changequote(,)dnl
+cat > conftest.c <<\EOF
+int data;
+int foo(void)
+{
+ return data;
+}
+EOF
+changequote([,])dnl
+dnl
+libc_cv_sparc_gcc_gotdata=no
+if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS -O2 -fPIC conftest.c 1>&AS_MESSAGE_LOG_FD); then
+ if grep -q 'gdop_hix22' conftest.s \
+ && grep -q 'gdop_lox10' conftest.s; then
+ libc_cv_sparc_gcc_gotdata=yes
+ fi
+fi
+rm -f conftest*])
+if test $libc_cv_sparc_gcc_gotdata = yes; then
+ AC_DEFINE(HAVE_GCC_GOTDATA)
+fi
+
+if test $libc_cv_sparc_gcc_gotdata = yes \
+ && test $libc_cv_sparc_gotdata = yes; then
+ AC_DEFINE(PI_STATIC_AND_HIDDEN)
+fi
Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/__longjmp.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/__longjmp.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/__longjmp.S Wed Feb 22 00:02:24 2012
@@ -21,7 +21,6 @@
#include <jmpbuf-offsets.h>
#define ENV(base,reg) [%base + (reg * 4)]
#define ST_FLUSH_WINDOWS 3
-#define RW_FP [%fp + 0x48]
ENTRY(__longjmp)
/* Store our arguments in global registers so we can still
@@ -54,6 +53,7 @@
ld ENV(g1,JB_SP), %o0 /* Delay slot: extract target SP. */
LOC(thread):
+ save %sp, -96, %sp
/*
* Do a "flush register windows trap". The trap handler in the
* kernel writes all the register windows to their stack slots, and
@@ -66,15 +66,13 @@
#ifdef PTR_DEMANGLE
ld ENV(g1,JB_PC), %g5 /* Set return PC. */
ld ENV(g1,JB_SP), %g1 /* Set saved SP on restore below. */
- PTR_DEMANGLE2 (%o7, %g5, %g4)
+ PTR_DEMANGLE2 (%i7, %g5, %g4)
PTR_DEMANGLE2 (%fp, %g1, %g4)
#else
- ld ENV(g1,JB_PC), %o7 /* Set return PC. */
+ ld ENV(g1,JB_PC), %i7 /* Set return PC. */
ld ENV(g1,JB_SP), %fp /* Set saved SP on restore below. */
#endif
- sub %fp, 64, %sp /* Allocate a register frame. */
- st %g3, RW_FP /* Set saved FP on restore below. */
- retl
+ jmp %i7 + 8
restore %g2, 0, %o0 /* Restore values from above register frame. */
LOC(found):
Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/dl-machine.h
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/dl-machine.h (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/dl-machine.h Wed Feb 22 00:02:24 2012
@@ -215,6 +215,18 @@
/* Initial entry point code for the dynamic linker.
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point. */
+
+#ifdef HAVE_BINUTILS_GOTDATA
+#define RTLD_GOT_ADDRESS(pic_reg, reg, symbol) \
+ "sethi %gdop_hix22(" #symbol "), " #reg "\n\t" \
+ "xor " #reg ", %gdop_lox10(" #symbol "), " #reg "\n\t" \
+ "ld [" #pic_reg " + " #reg "], " #reg ", %gdop(" #symbol ")"
+#else
+#define RTLD_GOT_ADDRESS(pic_reg, reg, symbol) \
+ "sethi %hi(" #symbol "), " #reg "\n\t" \
+ "or " #reg ", %lo(" #symbol "), " #reg "\n\t" \
+ "ld [" #pic_reg " + " #reg "], " #reg
+#endif
#define RTLD_START __asm__ ("\
.text\n\
@@ -240,17 +252,13 @@
mov %o0, %l0\n\
/* See if we were run as a command with the executable file name as an\n\
extra leading argument. If so, adjust the contents of the stack. */\n\
- sethi %hi(_dl_skip_args), %g2\n\
- or %g2, %lo(_dl_skip_args), %g2\n\
- ld [%l7+%g2], %i0\n\
- ld [%i0], %i0\n\
+ " RTLD_GOT_ADDRESS(%l7, %g2, _dl_skip_args) "\n\
+ ld [%g2], %i0\n\
tst %i0\n\
beq 3f\n\
ld [%sp+22*4], %i5 /* load argc */\n\
/* Find out how far to shift. */\n\
- sethi %hi(_dl_argv), %l3\n\
- or %l3, %lo(_dl_argv), %l3\n\
- ld [%l7+%l3], %l3\n\
+ " RTLD_GOT_ADDRESS(%l7, %l3, _dl_argv) "\n\
sub %i5, %i0, %i5\n\
ld [%l3], %l4\n\
sll %i0, 2, %i2\n\
@@ -283,20 +291,16 @@
bne 23b\n\
add %i1, 8, %i1\n\
/* %o0 = _dl_loaded, %o1 = argc, %o2 = argv, %o3 = envp. */\n\
-3: sethi %hi(_rtld_local), %o0\n\
+3: " RTLD_GOT_ADDRESS(%l7, %o0, _rtld_local) "\n\
add %sp, 23*4, %o2\n\
- orcc %o0, %lo(_rtld_local), %o0\n\
sll %i5, 2, %o3\n\
- ld [%l7+%o0], %o0\n\
add %o3, 4, %o3\n\
mov %i5, %o1\n\
add %o2, %o3, %o3\n\
call _dl_init_internal\n\
ld [%o0], %o0\n\
/* Pass our finalizer function to the user in %g1. */\n\
- sethi %hi(_dl_fini), %g1\n\
- or %g1, %lo(_dl_fini), %g1\n\
- ld [%l7+%g1], %g1\n\
+ " RTLD_GOT_ADDRESS(%l7, %g1, _dl_fini) "\n\
/* Jump to the user's entry point and deallocate the extra stack we got. */\n\
jmp %l0\n\
add %sp, 6*4, %sp\n\
Removed: fsf/trunk/libc/sysdeps/sparc/sparc32/elf/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/elf/configure (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/elf/configure (removed)
@@ -1,164 +1,0 @@
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-# This file is generated from configure.in by Autoconf. DO NOT EDIT!
- # Local configure fragment for sysdeps/sparc/sparc32/elf.
-
-# Check for support of thread-local storage handling in assembler and linker.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sparc32 TLS support" >&5
-$as_echo_n "checking for sparc32 TLS support... " >&6; }
-if ${libc_cv_sparc32_tls+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.s <<\EOF
- .section ".tdata", "awT", @progbits
- .globl foo
-foo: .word 1
- .section ".tbss", "awT", @nobits
- .globl bar
-bar: .skip 4
- .text
-baz: sethi %tgd_hi22(foo), %l1
- add %l1, %tgd_lo10(foo), %l1
- add %l7, %l1, %o0, %tgd_add(foo)
- call __tls_get_addr, %tgd_call(foo)
- sethi %tldm_hi22(bar), %l1
- add %l1, %tldm_lo10(bar), %l1
- add %l7, %l1, %o0, %tldm_add(bar)
- call __tls_get_addr, %tldm_call(bar)
- sethi %tldo_hix22(bar), %l1
- xor %l1, %tldo_lox10(bar), %l1
- add %o0, %l1, %l1, %tldo_add(bar)
- sethi %tie_hi22(foo), %l1
- add %l1, %tie_lo10(foo), %l1
- ld [%l7 + %l1], %l1, %tie_ld(foo)
- add %g7, %l1, %l1, %tie_add(foo)
- sethi %tle_hix22(foo), %l1
- xor %l1, %tle_lox10(foo), %l1
-EOF
-if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- libc_cv_sparc32_tls=yes
-else
- libc_cv_sparc32_tls=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sparc32_tls" >&5
-$as_echo "$libc_cv_sparc32_tls" >&6; }
-if test $libc_cv_sparc32_tls = no; then
- as_fn_error $? "the assembler must support TLS" "$LINENO" 5
-fi
-
-# Check for broken WDISP22 in the linker.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sparc32 ld WDISP22 handling" >&5
-$as_echo_n "checking for sparc32 ld WDISP22 handling... " >&6; }
-if ${libc_cv_sparc32_wdisp22+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- echo 'bne foo; nop' > conftest1.s
-echo '.globl foo; .hidden foo; foo: nop' > conftest2.s
-libc_cv_sparc32_wdisp22=unknown
-if { ac_try='${CC-cc} -nostdlib -shared $CFLAGS conftest1.s conftest2.s -o conftest.so 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- if readelf -r conftest.so | grep -q R_SPARC_WDISP22; then
- libc_cv_sparc32_wdisp22=broken
- else
- libc_cv_sparc32_wdisp22=ok
- fi
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sparc32_wdisp22" >&5
-$as_echo "$libc_cv_sparc32_wdisp22" >&6; }
-if test $libc_cv_sparc32_wdisp22 != ok; then
- $as_echo "#define BROKEN_SPARC_WDISP22 1" >>confdefs.h
-
-fi
Removed: fsf/trunk/libc/sysdeps/sparc/sparc32/elf/configure.in
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/elf/configure.in (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/elf/configure.in (removed)
@@ -1,60 +1,0 @@
-GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-# Local configure fragment for sysdeps/sparc/sparc32/elf.
-
-# Check for support of thread-local storage handling in assembler and linker.
-AC_CACHE_CHECK(for sparc32 TLS support, libc_cv_sparc32_tls, [dnl
-changequote(,)dnl
-cat > conftest.s <<\EOF
- .section ".tdata", "awT", @progbits
- .globl foo
-foo: .word 1
- .section ".tbss", "awT", @nobits
- .globl bar
-bar: .skip 4
- .text
-baz: sethi %tgd_hi22(foo), %l1
- add %l1, %tgd_lo10(foo), %l1
- add %l7, %l1, %o0, %tgd_add(foo)
- call __tls_get_addr, %tgd_call(foo)
- sethi %tldm_hi22(bar), %l1
- add %l1, %tldm_lo10(bar), %l1
- add %l7, %l1, %o0, %tldm_add(bar)
- call __tls_get_addr, %tldm_call(bar)
- sethi %tldo_hix22(bar), %l1
- xor %l1, %tldo_lox10(bar), %l1
- add %o0, %l1, %l1, %tldo_add(bar)
- sethi %tie_hi22(foo), %l1
- add %l1, %tie_lo10(foo), %l1
- ld [%l7 + %l1], %l1, %tie_ld(foo)
- add %g7, %l1, %l1, %tie_add(foo)
- sethi %tle_hix22(foo), %l1
- xor %l1, %tle_lox10(foo), %l1
-EOF
-changequote([,])dnl
-dnl
-if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
- libc_cv_sparc32_tls=yes
-else
- libc_cv_sparc32_tls=no
-fi
-rm -f conftest*])
-if test $libc_cv_sparc32_tls = no; then
- AC_MSG_ERROR([the assembler must support TLS])
-fi
-
-# Check for broken WDISP22 in the linker.
-AC_CACHE_CHECK(for sparc32 ld WDISP22 handling, libc_cv_sparc32_wdisp22, [dnl
-echo 'bne foo; nop' > conftest1.s
-echo '.globl foo; .hidden foo; foo: nop' > conftest2.s
-libc_cv_sparc32_wdisp22=unknown
-if AC_TRY_COMMAND(${CC-cc} -nostdlib -shared $CFLAGS conftest1.s conftest2.s -o conftest.so 1>&AS_MESSAGE_LOG_FD); then
- if readelf -r conftest.so | grep -q R_SPARC_WDISP22; then
- libc_cv_sparc32_wdisp22=broken
- else
- libc_cv_sparc32_wdisp22=ok
- fi
-fi
-rm -f conftest*])
-if test $libc_cv_sparc32_wdisp22 != ok; then
- AC_DEFINE(BROKEN_SPARC_WDISP22)
-fi
Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/elf/start.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/elf/start.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/elf/start.S Wed Feb 22 00:02:24 2012
@@ -40,18 +40,11 @@
.section ".text"
.align 4
-#ifdef SHARED
-.LLGETPC0:
- retl
- add %o7, %l7, %l7
-#endif
.global _start
.type _start,#function
_start:
#ifdef SHARED
- sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %l7
- call .LLGETPC0
- add %l7, %lo(_GLOBAL_OFFSET_TABLE_+4), %l7
+ SETUP_PIC_REG(l7)
#endif
/* Terminate the stack frame, and reserve space for functions to
@@ -65,16 +58,35 @@
add %sp, 23*4, %o2
/* Load the addresses of the user entry points. */
+#ifndef SHARED
sethi %hi(main), %o0
sethi %hi(__libc_csu_init), %o3
sethi %hi(__libc_csu_fini), %o4
or %o0, %lo(main), %o0
or %o3, %lo(__libc_csu_init), %o3
or %o4, %lo(__libc_csu_fini), %o4
-#ifdef SHARED
+#else
+#ifdef HAVE_BINUTILS_GOTDATA
+ sethi %gdop_hix22(main), %o0
+ sethi %gdop_hix22(__libc_csu_init), %o3
+ sethi %gdop_hix22(__libc_csu_fini), %o4
+ xor %o0, %gdop_lox10(main), %o0
+ xor %o3, %gdop_lox10(__libc_csu_init), %o3
+ xor %o4, %gdop_lox10(__libc_csu_fini), %o4
+ ld [%l7 + %o0], %o0, %gdop(main)
+ ld [%l7 + %o3], %o3, %gdop(__libc_csu_init)
+ ld [%l7 + %o4], %o4, %gdop(__libc_csu_fini)
+#else
+ sethi %hi(main), %o0
+ sethi %hi(__libc_csu_init), %o3
+ sethi %hi(__libc_csu_fini), %o4
+ or %o0, %lo(main), %o0
+ or %o3, %lo(__libc_csu_init), %o3
+ or %o4, %lo(__libc_csu_fini), %o4
ld [%l7 + %o0], %o0
ld [%l7 + %o3], %o3
ld [%l7 + %o4], %o4
+#endif
#endif
/* When starting a binary via the dynamic linker, %g1 contains the
Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/fpu/libm-test-ulps
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/fpu/libm-test-ulps (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/fpu/libm-test-ulps Wed Feb 22 00:02:24 2012
@@ -659,6 +659,8 @@
float: 1
idouble: 2
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4":
double: 1
float: 1
@@ -684,34 +686,48 @@
Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813":
double: 3
idouble: 3
+ildouble: 1
+ldouble: 1
Test "jn (4, 2.4048255576957729) == 0.647466661641779720084932282551219891E-1":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "jn (5, 2.4048255576957729) == 0.163892432048058525099230549946147698E-1":
double: 3
float: 1
idouble: 3
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "jn (6, 2.4048255576957729) == 0.34048184720278336646673682895929161E-2":
double: 4
float: 3
idouble: 4
ifloat: 3
+ildouble: 5
+ldouble: 5
Test "jn (7, 2.4048255576957729) == 0.60068836573295394221291569249883076E-3":
double: 3
float: 5
idouble: 3
ifloat: 5
+ildouble: 3
+ldouble: 3
Test "jn (8, 2.4048255576957729) == 0.92165786705344923232879022467054148E-4":
double: 3
float: 2
idouble: 3
ifloat: 2
+ildouble: 8
+ldouble: 8
Test "jn (9, 2.4048255576957729) == 0.12517270977961513005428966643852564E-4":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 3
+ldouble: 3
# lgamma
Test "lgamma (-0.5) == log(2*sqrt(pi))":
@@ -1276,8 +1292,8 @@
float: 5
idouble: 4
ifloat: 5
-ildouble: 4
-ldouble: 4
+ildouble: 8
+ldouble: 8
Function: "lgamma":
double: 1
Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/dl-machine.h
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/dl-machine.h (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/dl-machine.h Wed Feb 22 00:02:24 2012
@@ -263,6 +263,18 @@
/* Initial entry point code for the dynamic linker.
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point. */
+
+#ifdef HAVE_BINUTILS_GOTDATA
+#define RTLD_GOT_ADDRESS(pic_reg, reg, symbol) \
+ "sethi %gdop_hix22(" #symbol "), " #reg "\n\t" \
+ "xor " #reg ", %gdop_lox10(" #symbol "), " #reg "\n\t" \
+ "ldx [" #pic_reg " + " #reg "], " #reg ", %gdop(" #symbol ")\n"
+#else
+#define RTLD_GOT_ADDRESS(pic_reg, reg, symbol) \
+ "sethi %hi(" #symbol "), " #reg "\n\t" \
+ "or " #reg ", %lo(" #symbol "), " #reg "\n\t" \
+ "ldx [" #pic_reg " + " #reg "], " #reg "\n"
+#endif
#define __S1(x) #x
#define __S(x) __S1(x)
@@ -288,24 +300,20 @@
"1: call 11f\n" \
" sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7\n" \
"11: or %l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7\n" \
-" sethi %hi(_dl_skip_args), %g5\n" \
" add %l7, %o7, %l7\n" \
-" or %g5, %lo(_dl_skip_args), %g5\n" \
" /* Save the user entry point address in %l0. */\n" \
" mov %o0, %l0\n" \
" /* See if we were run as a command with the executable file name as an\n" \
" extra leading argument. If so, we must shift things around since we\n" \
" must keep the stack doubleword aligned. */\n" \
-" ldx [%l7 + %g5], %i0\n" \
-" ld [%i0], %i0\n" \
+ RTLD_GOT_ADDRESS(%l7, %g5, _dl_skip_args) \
+" ld [%g5], %i0\n" \
" brz,pt %i0, 2f\n" \
" ldx [%sp + " __S(STACK_BIAS) " + 22*8], %i5\n" \
" /* Find out how far to shift. */\n" \
-" sethi %hi(_dl_argv), %l4\n" \
" sub %i5, %i0, %i5\n" \
-" or %l4, %lo(_dl_argv), %l4\n" \
" sllx %i0, 3, %l6\n" \
-" ldx [%l7 + %l4], %l4\n" \
+ RTLD_GOT_ADDRESS(%l7, %l4, _dl_argv) \
" stx %i5, [%sp + " __S(STACK_BIAS) " + 22*8]\n" \
" add %sp, " __S(STACK_BIAS) " + 23*8, %i1\n" \
" add %i1, %l6, %i2\n" \
@@ -333,20 +341,16 @@
" add %i1, 16, %i1\n" \
" stx %l5, [%l4]\n" \
" /* %o0 = _dl_loaded, %o1 = argc, %o2 = argv, %o3 = envp. */\n" \
-"2: sethi %hi(_rtld_local), %o0\n" \
+"2:\t" RTLD_GOT_ADDRESS(%l7, %o0, _rtld_local) \
+" sllx %i5, 3, %o3\n" \
" add %sp, " __S(STACK_BIAS) " + 23*8, %o2\n" \
-" orcc %o0, %lo(_rtld_local), %o0\n" \
-" sllx %i5, 3, %o3\n" \
-" ldx [%l7 + %o0], %o0\n" \
" add %o3, 8, %o3\n" \
" mov %i5, %o1\n" \
" add %o2, %o3, %o3\n" \
" call _dl_init_internal\n" \
" ldx [%o0], %o0\n" \
" /* Pass our finalizer function to the user in %g1. */\n" \
-" sethi %hi(_dl_fini), %g1\n" \
-" or %g1, %lo(_dl_fini), %g1\n" \
-" ldx [%l7 + %g1], %g1\n" \
+ RTLD_GOT_ADDRESS(%l7, %g1, _dl_fini) \
" /* Jump to the user's entry point and deallocate the extra stack we got. */\n" \
" jmp %l0\n" \
" add %sp, 6*8, %sp\n" \
Removed: fsf/trunk/libc/sysdeps/sparc/sparc64/elf/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/elf/configure (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/elf/configure (removed)
@@ -1,165 +1,0 @@
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-# This file is generated from configure.in by Autoconf. DO NOT EDIT!
- # Local configure fragment for sysdeps/sparc/sparc64/elf.
-
-# Check for support of thread-local storage handling in assembler and linker.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sparc64 TLS support" >&5
-$as_echo_n "checking for sparc64 TLS support... " >&6; }
-if ${libc_cv_sparc64_tls+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.s <<\EOF
- .section ".tdata", "awT", @progbits
- .globl foo
-foo: .word 1
- .section ".tbss", "awT", @nobits
- .globl bar
-bar: .skip 4
- .text
- .globl _start
-_start: sethi %tgd_hi22(foo), %l1
- add %l1, %tgd_lo10(foo), %l1
- add %l7, %l1, %o0, %tgd_add(foo)
- call __tls_get_addr, %tgd_call(foo)
- sethi %tldm_hi22(bar), %l1
- add %l1, %tldm_lo10(bar), %l1
- add %l7, %l1, %o0, %tldm_add(bar)
- call __tls_get_addr, %tldm_call(bar)
- sethi %tldo_hix22(bar), %l1
- xor %l1, %tldo_lox10(bar), %l1
- add %o0, %l1, %l1, %tldo_add(bar)
- sethi %tie_hi22(foo), %l1
- add %l1, %tie_lo10(foo), %l1
- ldx [%l7 + %l1], %l1, %tie_ldx(foo)
- add %g7, %l1, %l1, %tie_add(foo)
- sethi %tle_hix22(foo), %l1
- xor %l1, %tle_lox10(foo), %l1
-EOF
-if { ac_try='${CC-cc} -o conftest.bin $CFLAGS $LDFLAGS conftest.s -nostdlib -nostartfiles 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- libc_cv_sparc64_tls=yes
-else
- libc_cv_sparc64_tls=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sparc64_tls" >&5
-$as_echo "$libc_cv_sparc64_tls" >&6; }
-if test $libc_cv_sparc64_tls = no; then
- as_fn_error $? "the assembler must support TLS" "$LINENO" 5
-fi
-
-# Check for broken WDISP22 in the linker.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sparc64 ld WDISP22 handling" >&5
-$as_echo_n "checking for sparc64 ld WDISP22 handling... " >&6; }
-if ${libc_cv_sparc64_wdisp22+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- echo 'bne foo; nop' > conftest1.s
-echo '.globl foo; .hidden foo; foo: nop' > conftest2.s
-libc_cv_sparc64_wdisp22=unknown
-if { ac_try='${CC-cc} -nostdlib -shared $CFLAGS conftest1.s conftest2.s -o conftest.so 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- if readelf -r conftest.so | grep -q R_SPARC_WDISP22; then
- libc_cv_sparc64_wdisp22=broken
- else
- libc_cv_sparc64_wdisp22=ok
- fi
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sparc64_wdisp22" >&5
-$as_echo "$libc_cv_sparc64_wdisp22" >&6; }
-if test $libc_cv_sparc64_wdisp22 != ok; then
- $as_echo "#define BROKEN_SPARC_WDISP22 1" >>confdefs.h
-
-fi
Removed: fsf/trunk/libc/sysdeps/sparc/sparc64/elf/configure.in
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/elf/configure.in (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/elf/configure.in (removed)
@@ -1,61 +1,0 @@
-GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-# Local configure fragment for sysdeps/sparc/sparc64/elf.
-
-# Check for support of thread-local storage handling in assembler and linker.
-AC_CACHE_CHECK(for sparc64 TLS support, libc_cv_sparc64_tls, [dnl
-changequote(,)dnl
-cat > conftest.s <<\EOF
- .section ".tdata", "awT", @progbits
- .globl foo
-foo: .word 1
- .section ".tbss", "awT", @nobits
- .globl bar
-bar: .skip 4
- .text
- .globl _start
-_start: sethi %tgd_hi22(foo), %l1
- add %l1, %tgd_lo10(foo), %l1
- add %l7, %l1, %o0, %tgd_add(foo)
- call __tls_get_addr, %tgd_call(foo)
- sethi %tldm_hi22(bar), %l1
- add %l1, %tldm_lo10(bar), %l1
- add %l7, %l1, %o0, %tldm_add(bar)
- call __tls_get_addr, %tldm_call(bar)
- sethi %tldo_hix22(bar), %l1
- xor %l1, %tldo_lox10(bar), %l1
- add %o0, %l1, %l1, %tldo_add(bar)
- sethi %tie_hi22(foo), %l1
- add %l1, %tie_lo10(foo), %l1
- ldx [%l7 + %l1], %l1, %tie_ldx(foo)
- add %g7, %l1, %l1, %tie_add(foo)
- sethi %tle_hix22(foo), %l1
- xor %l1, %tle_lox10(foo), %l1
-EOF
-changequote([,])dnl
-dnl
-if AC_TRY_COMMAND(${CC-cc} -o conftest.bin $CFLAGS $LDFLAGS conftest.s -nostdlib -nostartfiles 1>&AS_MESSAGE_LOG_FD); then
- libc_cv_sparc64_tls=yes
-else
- libc_cv_sparc64_tls=no
-fi
-rm -f conftest*])
-if test $libc_cv_sparc64_tls = no; then
- AC_MSG_ERROR([the assembler must support TLS])
-fi
-
-# Check for broken WDISP22 in the linker.
-AC_CACHE_CHECK(for sparc64 ld WDISP22 handling, libc_cv_sparc64_wdisp22, [dnl
-echo 'bne foo; nop' > conftest1.s
-echo '.globl foo; .hidden foo; foo: nop' > conftest2.s
-libc_cv_sparc64_wdisp22=unknown
-if AC_TRY_COMMAND(${CC-cc} -nostdlib -shared $CFLAGS conftest1.s conftest2.s -o conftest.so 1>&AS_MESSAGE_LOG_FD); then
- if readelf -r conftest.so | grep -q R_SPARC_WDISP22; then
- libc_cv_sparc64_wdisp22=broken
- else
- libc_cv_sparc64_wdisp22=ok
- fi
-fi
-rm -f conftest*])
-if test $libc_cv_sparc64_wdisp22 != ok; then
- AC_DEFINE(BROKEN_SPARC_WDISP22)
-fi
Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/elf/start.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/elf/start.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/elf/start.S Wed Feb 22 00:02:24 2012
@@ -40,18 +40,11 @@
.section ".text"
.align 4
-#ifdef SHARED
-.LLGETPC0:
- retl
- add %o7, %l7, %l7
-#endif
.global _start
.type _start,#function
_start:
#ifdef SHARED
- sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %l7
- call .LLGETPC0
- add %l7, %lo(_GLOBAL_OFFSET_TABLE_+4), %l7
+ SETUP_PIC_REG(l7)
#endif
/* Terminate the stack frame, and reserve space for functions to
@@ -66,16 +59,35 @@
add %sp, STACK_BIAS+23*8, %o2
/* Load the addresses of the user entry points. */
- sethi %hi(main), %o0
- sethi %hi(__libc_csu_init), %o3
- sethi %hi(__libc_csu_fini), %o4
- or %o0, %lo(main), %o0
- or %o3, %lo(__libc_csu_init), %o3
- or %o4, %lo(__libc_csu_fini), %o4
-#ifdef SHARED
+#ifndef SHARED
+ sethi %hi(main), %o0
+ sethi %hi(__libc_csu_init), %o3
+ sethi %hi(__libc_csu_fini), %o4
+ or %o0, %lo(main), %o0
+ or %o3, %lo(__libc_csu_init), %o3
+ or %o4, %lo(__libc_csu_fini), %o4
+#else
+#ifdef HAVE_BINUTILS_GOTDATA
+ sethi %gdop_hix22(main), %o0
+ sethi %gdop_hix22(__libc_csu_init), %o3
+ sethi %gdop_hix22(__libc_csu_fini), %o4
+ xor %o0, %gdop_lox10(main), %o0
+ xor %o3, %gdop_lox10(__libc_csu_init), %o3
+ xor %o4, %gdop_lox10(__libc_csu_fini), %o4
+ ldx [%l7 + %o0], %o0, %gdop(main)
+ ldx [%l7 + %o3], %o3, %gdop(__libc_csu_init)
+ ldx [%l7 + %o4], %o4, %gdop(__libc_csu_fini)
+#else
+ sethi %hi(main), %o0
+ sethi %hi(__libc_csu_init), %o3
+ sethi %hi(__libc_csu_fini), %o4
+ or %o0, %lo(main), %o0
+ or %o3, %lo(__libc_csu_init), %o3
+ or %o4, %lo(__libc_csu_fini), %o4
ldx [%l7 + %o0], %o0
ldx [%l7 + %o3], %o3
ldx [%l7 + %o4], %o4
+#endif
#endif
/* When starting a binary via the dynamic linker, %g1 contains the
Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/libm-test-ulps
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/libm-test-ulps (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/libm-test-ulps Wed Feb 22 00:02:24 2012
@@ -659,6 +659,8 @@
float: 1
idouble: 2
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4":
double: 1
float: 1
@@ -684,34 +686,48 @@
Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813":
double: 3
idouble: 3
+ildouble: 1
+ldouble: 1
Test "jn (4, 2.4048255576957729) == 0.647466661641779720084932282551219891E-1":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "jn (5, 2.4048255576957729) == 0.163892432048058525099230549946147698E-1":
double: 3
float: 1
idouble: 3
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "jn (6, 2.4048255576957729) == 0.34048184720278336646673682895929161E-2":
double: 4
float: 3
idouble: 4
ifloat: 3
+ildouble: 5
+ldouble: 5
Test "jn (7, 2.4048255576957729) == 0.60068836573295394221291569249883076E-3":
double: 3
float: 5
idouble: 3
ifloat: 5
+ildouble: 3
+ldouble: 3
Test "jn (8, 2.4048255576957729) == 0.92165786705344923232879022467054148E-4":
double: 3
float: 2
idouble: 3
ifloat: 2
+ildouble: 8
+ldouble: 8
Test "jn (9, 2.4048255576957729) == 0.12517270977961513005428966643852564E-4":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 3
+ldouble: 3
# lgamma
Test "lgamma (-0.5) == log(2*sqrt(pi))":
@@ -1276,8 +1292,8 @@
float: 5
idouble: 4
ifloat: 5
-ildouble: 4
-ldouble: 4
+ildouble: 8
+ldouble: 8
Function: "lgamma":
double: 1
Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memcpy.S Wed Feb 22 00:02:24 2012
@@ -25,12 +25,7 @@
ENTRY(memcpy)
.type memcpy, @gnu_indirect_function
# ifdef SHARED
- mov %o7, %o5
- sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %o3
- call 1f
- or %o3, %lo(_GLOBAL_OFFSET_TABLE_+4), %o3
-1: add %o7, %o3, %o3
- mov %o5, %o7
+ SETUP_PIC_REG_LEAF(o3, o5)
# endif
andcc %o0, HWCAP_SPARC_N2, %g0
be 1f
Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/multiarch/memset.S Wed Feb 22 00:02:24 2012
@@ -25,12 +25,7 @@
ENTRY(memset)
.type memset, @gnu_indirect_function
# ifdef SHARED
- mov %o7, %o5
- sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %o3
- call 1f
- or %o3, %lo(_GLOBAL_OFFSET_TABLE_+4), %o3
-1: add %o7, %o3, %o3
- mov %o5, %o7
+ SETUP_PIC_REG_LEAF(o3, o5)
# endif
andcc %o0, HWCAP_SPARC_BLKINIT, %g0
be 9f
@@ -61,12 +56,7 @@
ENTRY(__bzero)
.type bzero, @gnu_indirect_function
# ifdef SHARED
- mov %o7, %o5
- sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %o3
- call 1f
- or %o3, %lo(_GLOBAL_OFFSET_TABLE_+4), %o3
-1: add %o7, %o3, %o3
- mov %o5, %o7
+ SETUP_PIC_REG_LEAF(o3, o5)
# endif
andcc %o0, HWCAP_SPARC_BLKINIT, %g0
be 9f
Modified: fsf/trunk/libc/sysdeps/unix/sparc/sysdep.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sparc/sysdep.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sparc/sysdep.h Wed Feb 22 00:02:24 2012
@@ -38,6 +38,9 @@
add %o7, %reg, %##reg; \
.previous; \
.endif;
+
+/* Even when v9 we use a call sequence instead of using "rd %pc" because
+ RDPC is extremely expensive and incurs a full pipeline flush. */
#define SETUP_PIC_REG(reg) \
SPARC_PIC_THUNK(reg) \
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 Wed Feb 22 00:02:24 2012
@@ -33,7 +33,7 @@
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 \
- bits/signalfd.h
+ bits/signalfd.h bits/timerfd.h bits/epoll.h
install-others += $(inst_includedir)/bits/syscall.h
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/epoll.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/epoll.h (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/epoll.h Wed Feb 22 00:02:24 2012
@@ -1,0 +1,29 @@
+/* Copyright (C) 2002-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_EPOLL_H
+# error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead."
+#endif
+
+/* Flags to be passed to epoll_create1. */
+enum
+ {
+ EPOLL_CLOEXEC = 02000000,
+#define EPOLL_CLOEXEC EPOLL_CLOEXEC
+ EPOLL_NONBLOCK = 00004000
+#define EPOLL_NONBLOCK EPOLL_NONBLOCK
+ };
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/timerfd.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/timerfd.h (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/timerfd.h Wed Feb 22 00:02:24 2012
@@ -1,0 +1,29 @@
+/* Copyright (C) 2008-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_TIMERFD_H
+# error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead."
+#endif
+
+/* Bits to be set in the FLAGS parameter of `timerfd_create'. */
+enum
+ {
+ TFD_CLOEXEC = 02000000,
+#define TFD_CLOEXEC TFD_CLOEXEC
+ TFD_NONBLOCK = 00004000
+#define TFD_NONBLOCK TFD_NONBLOCK
+ };
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/epoll.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/epoll.h (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/epoll.h Wed Feb 22 00:02:24 2012
@@ -1,0 +1,29 @@
+/* Copyright (C) 2002-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_EPOLL_H
+# error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead."
+#endif
+
+/* Flags to be passed to epoll_create1. */
+enum
+ {
+ EPOLL_CLOEXEC = 0x400000,
+#define EPOLL_CLOEXEC EPOLL_CLOEXEC
+ EPOLL_NONBLOCK = 0x004000
+#define EPOLL_NONBLOCK EPOLL_NONBLOCK
+ };
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/timerfd.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/timerfd.h (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/timerfd.h Wed Feb 22 00:02:24 2012
@@ -1,0 +1,29 @@
+/* Copyright (C) 2008-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_TIMERFD_H
+# error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead."
+#endif
+
+/* Bits to be set in the FLAGS parameter of `timerfd_create'. */
+enum
+ {
+ TFD_CLOEXEC = 0x400000,
+#define TFD_CLOEXEC TFD_CLOEXEC
+ TFD_NONBLOCK = 0x004000
+#define TFD_NONBLOCK TFD_NONBLOCK
+ };
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S Wed Feb 22 00:02:24 2012
@@ -20,7 +20,6 @@
#define ENV(base,reg) [%base + (reg * 4)]
#define ST_FLUSH_WINDOWS 3
-#define RW_FP [%fp + 0x48]
.section .rodata.str1.1,"aMS",@progbits,1
.type longjmp_msg,@object
@@ -63,16 +62,20 @@
nop
.Lfail:
-#ifdef PIC
-1: call 2f
- sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
-2: or %l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
- add %l7, %o7, %l7
-#endif
+#ifndef PIC
sethi %hi(longjmp_msg), %o0
or %o0, %lo(longjmp_msg), %o0
-#ifdef PIC
+#else
+ SETUP_PIC_REG(l7)
+#ifdef HAVE_BINUTILS_GOTDATA
+ sethi %gdop_hix22(longjmp_msg), %o0
+ xor %o0, %gdop_lox10(longjmp_msg), %o0
+ ld [%l7 + %o0], %o0, %gdop(longjmp_msg)
+#else
+ sethi %hi(longjmp_msg), %o0
+ or %o0, %lo(longjmp_msg), %o0
ld [%l7 + %o0], %o0
+#endif
#endif
call HIDDEN_JUMPTARGET(__fortify_fail)
nop
@@ -93,6 +96,7 @@
mov 1, %g2 /* Delay slot only hit if zero: VAL = 1. */
0:
+ save %sp, -96, %sp
/*
* Do a "flush register windows trap". The trap handler in the
* kernel writes all the register windows to their stack slots, and
@@ -104,14 +108,12 @@
ta ST_FLUSH_WINDOWS
#ifdef PTR_DEMANGLE
ld ENV(g1,JB_PC), %g1 /* Set return PC. */
- PTR_DEMANGLE2 (%o7, %g1, %g4)
+ PTR_DEMANGLE2 (%i7, %g1, %g4)
#else
- ld ENV(g1,JB_PC), %o7 /* Set return PC. */
+ ld ENV(g1,JB_PC), %i7 /* Set return PC. */
#endif
mov %g5, %fp
- sub %fp, 64, %sp /* Allocate a register frame. */
- st %g3, RW_FP /* Set saved FP on restore below. */
- retl
+ jmp %i7 + 8
restore %g2, 0, %o0 /* Restore values from above register frame. */
END(____longjmp_chk)
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h Wed Feb 22 00:02:24 2012
@@ -88,7 +88,17 @@
mov %g1, %o7;
#else
# if RTLD_PRIVATE_ERRNO
-# define SYSCALL_ERROR_HANDLER \
+# ifdef HAVE_BINUTILS_GOTDATA
+# define SYSCALL_ERROR_HANDLER \
+0: SETUP_PIC_REG_LEAF(o2,g1) \
+ sethi %gdop_hix22(rtld_errno), %g1; \
+ xor %g1, %gdop_lox10(rtld_errno), %g1;\
+ ld [%o2 + %g1], %g1, %gdop(rtld_errno); \
+ st %o0, [%g1]; \
+ jmp %o7 + 8; \
+ mov -1, %o0;
+# else
+# define SYSCALL_ERROR_HANDLER \
0: SETUP_PIC_REG_LEAF(o2,g1) \
sethi %hi(rtld_errno), %g1; \
or %g1, %lo(rtld_errno), %g1; \
@@ -96,6 +106,7 @@
st %o0, [%g1]; \
jmp %o7 + 8; \
mov -1, %o0;
+# endif
# elif defined _LIBC_REENTRANT
# ifndef NOT_IN_libc
@@ -112,7 +123,17 @@
jmp %o7 + 8; \
mov -1, %o0;
# else
-# define SYSCALL_ERROR_HANDLER \
+# ifdef HAVE_BINUTILS_GOTDATA
+# define SYSCALL_ERROR_HANDLER \
+0: SETUP_PIC_REG_LEAF(o2,g1) \
+ sethi %gdop_hix22(errno), %g1;\
+ xor %g1, %gdop_lox10(errno), %g1;\
+ ld [%o2 + %g1], %g1, %gdop(errno);\
+ st %o0, [%g1]; \
+ jmp %o7 + 8; \
+ mov -1, %o0;
+# else
+# define SYSCALL_ERROR_HANDLER \
0: SETUP_PIC_REG_LEAF(o2,g1) \
sethi %hi(errno), %g1; \
or %g1, %lo(errno), %g1; \
@@ -120,6 +141,7 @@
st %o0, [%g1]; \
jmp %o7 + 8; \
mov -1, %o0;
+# endif
# endif /* _LIBC_REENTRANT */
#endif /* PIC */
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/____longjmp_chk.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/____longjmp_chk.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/____longjmp_chk.S Wed Feb 22 00:02:24 2012
@@ -62,16 +62,20 @@
nop
.Lfail:
-#ifdef PIC
-1: call 2f
- sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
-2: or %l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
- add %l7, %o7, %l7
-#endif
+#ifndef PIC
sethi %hi(longjmp_msg), %o0
or %o0, %lo(longjmp_msg), %o0
-#ifdef PIC
+#else
+ SETUP_PIC_REG(l7)
+#ifdef HAVE_BINUTILS_GOTDATA
+ sethi %gdop_hix22(longjmp_msg), %o0
+ xor %o0, %gdop_lox10(longjmp_msg), %o0
+ ldx [%l7 + %o0], %o0, %gdop(longjmp_msg)
+#else
+ sethi %hi(longjmp_msg), %o0
+ or %o0, %lo(longjmp_msg), %o0
ldx [%l7 + %o0], %o0
+#endif
#endif
call HIDDEN_JUMPTARGET(__fortify_fail)
nop
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/brk.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/brk.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/brk.S Wed Feb 22 00:02:24 2012
@@ -42,10 +42,7 @@
cfi_window_save
cfi_register(%o7, %i7)
#ifdef PIC
-1: call 2f
- sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
-2: or %l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
- add %l7, %o7, %l7
+ SETUP_PIC_REG(l7)
#endif
LOADSYSCALL(brk)
@@ -62,10 +59,20 @@
nop
/* Update __curbrk and return cleanly. */
-.Lok: sethi %hi(__curbrk), %g1
+.Lok:
+#ifndef PIC
+ sethi %hi(__curbrk), %g1
or %g1, %lo(__curbrk), %g1
-#ifdef PIC
- ldx [%l7+%g1], %g1
+#else
+#ifdef HAVE_BINUTILS_GOTDATA
+ sethi %gdop_hix22(__curbrk), %g1
+ xor %g1, %gdop_lox10(__curbrk), %g1
+ ldx [%l7 + %g1], %g1, %gdop(__curbrk)
+#else
+ sethi %hi(__curbrk), %g1
+ or %g1, %lo(__curbrk), %g1
+ ldx [%l7 + %g1], %g1
+#endif
#endif
stx %o0, [%g1]
mov %g0, %i0
@@ -78,10 +85,19 @@
.Lerr0: set ENOMEM, %o0
.Lerr1:
#ifndef _LIBC_REENTRANT
+#ifndef PIC
sethi %hi(errno), %g1
or %g1, %lo(errno), %g1
-#ifdef PIC
- ldx [%l7+%g1], %g1
+#else
+#ifdef HAVE_BINUTILS_GOTDATA
+ sethi %gdop_hix22(errno), %g1
+ xor %g1, %gdop_lox10(errno), %g1
+ ldx [%l7 + %g1], %g1, %gdop(errno)
+#else
+ sethi %hi(errno), %g1
+ or %g1, %lo(errno), %g1
+ ldx [%l7 + %g1], %g1
+#endif
#endif
st %o0, [%g1]
#else
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h Wed Feb 22 00:02:24 2012
@@ -95,7 +95,17 @@
mov %g1, %o7;
#else
# if RTLD_PRIVATE_ERRNO
-# define SYSCALL_ERROR_HANDLER \
+# ifdef HAVE_BINUTILS_GOTDATA
+# define SYSCALL_ERROR_HANDLER \
+0: SETUP_PIC_REG_LEAF(o2,g1) \
+ sethi %gdop_hix22(rtld_errno), %g1; \
+ xor %g1, %gdop_lox10(rtld_errno), %g1;\
+ ldx [%o2 + %g1], %g1, %gdop(rtld_errno); \
+ st %o0, [%g1]; \
+ jmp %o7 + 8; \
+ mov -1, %o0;
+# else
+# define SYSCALL_ERROR_HANDLER \
0: SETUP_PIC_REG_LEAF(o2,g1) \
sethi %hi(rtld_errno), %g1; \
or %g1, %lo(rtld_errno), %g1; \
@@ -103,6 +113,7 @@
st %o0, [%g1]; \
jmp %o7 + 8; \
mov -1, %o0;
+# endif
# elif defined _LIBC_REENTRANT
# ifndef NOT_IN_libc
@@ -119,7 +130,17 @@
jmp %o7 + 8; \
mov -1, %o0;
# else
-# define SYSCALL_ERROR_HANDLER \
+# ifdef HAVE_BINUTILS_GOTDATA
+# define SYSCALL_ERROR_HANDLER \
+0: SETUP_PIC_REG_LEAF(o2,g1) \
+ sethi %gdop_hix22(errno), %g1;\
+ xor %g1, %gdop_lox10(errno), %g1;\
+ ldx [%o2 + %g1], %g1, %gdop(errno);\
+ st %o0, [%g1]; \
+ jmp %o7 + 8; \
+ mov -1, %o0;
+# else
+# define SYSCALL_ERROR_HANDLER \
0: SETUP_PIC_REG_LEAF(o2,g1) \
sethi %hi(errno), %g1; \
or %g1, %lo(errno), %g1; \
@@ -127,6 +148,7 @@
st %o0, [%g1]; \
jmp %o7 + 8; \
mov -1, %o0;
+# endif
# endif /* _LIBC_REENTRANT */
#endif /* PIC */
Removed: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sys/epoll.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sys/epoll.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sys/epoll.h (removed)
@@ -1,143 +1,0 @@
-/* Copyright (C) 2002-2008, 2010, 2011 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_EPOLL_H
-#define _SYS_EPOLL_H 1
-
-#include <stdint.h>
-#include <sys/types.h>
-
-/* Get __sigset_t. */
-#include <bits/sigset.h>
-
-#ifndef __sigset_t_defined
-# define __sigset_t_defined
-typedef __sigset_t sigset_t;
-#endif
-
-
-/* Flags to be passed to epoll_create1. */
-enum
- {
- EPOLL_CLOEXEC = 0x400000,
-#define EPOLL_CLOEXEC EPOLL_CLOEXEC
- EPOLL_NONBLOCK = 0x4000
-#define EPOLL_NONBLOCK EPOLL_NONBLOCK
- };
-
-
-enum EPOLL_EVENTS
- {
- EPOLLIN = 0x001,
-#define EPOLLIN EPOLLIN
- EPOLLPRI = 0x002,
-#define EPOLLPRI EPOLLPRI
- EPOLLOUT = 0x004,
-#define EPOLLOUT EPOLLOUT
- EPOLLRDNORM = 0x040,
-#define EPOLLRDNORM EPOLLRDNORM
- EPOLLRDBAND = 0x080,
-#define EPOLLRDBAND EPOLLRDBAND
- EPOLLWRNORM = 0x100,
-#define EPOLLWRNORM EPOLLWRNORM
- EPOLLWRBAND = 0x200,
-#define EPOLLWRBAND EPOLLWRBAND
- EPOLLMSG = 0x400,
-#define EPOLLMSG EPOLLMSG
- EPOLLERR = 0x008,
-#define EPOLLERR EPOLLERR
- EPOLLHUP = 0x010,
-#define EPOLLHUP EPOLLHUP
- EPOLLRDHUP = 0x2000,
-#define EPOLLRDHUP EPOLLRDHUP
- EPOLLONESHOT = 1u << 30,
-#define EPOLLONESHOT EPOLLONESHOT
- EPOLLET = 1u << 31
-#define EPOLLET EPOLLET
- };
-
-
-/* Valid opcodes ( "op" parameter ) to issue to epoll_ctl(). */
-#define EPOLL_CTL_ADD 1 /* Add a file descriptor to the interface. */
-#define EPOLL_CTL_DEL 2 /* Remove a file descriptor from the interface. */
-#define EPOLL_CTL_MOD 3 /* Change file descriptor epoll_event structure. */
-
-
-typedef union epoll_data
-{
- void *ptr;
- int fd;
- uint32_t u32;
- uint64_t u64;
-} epoll_data_t;
-
-struct epoll_event
-{
- uint32_t events; /* Epoll events */
- epoll_data_t data; /* User data variable */
-};
-
-
-__BEGIN_DECLS
-
-/* Creates an epoll instance. Returns an fd for the new instance.
- The "size" parameter is a hint specifying the number of file
- descriptors to be associated with the new instance. The fd
- returned by epoll_create() should be closed with close(). */
-extern int epoll_create (int __size) __THROW;
-
-/* Same as epoll_create but with an FLAGS parameter. The unused SIZE
- parameter has been dropped. */
-extern int epoll_create1 (int __flags) __THROW;
-
-
-/* Manipulate an epoll instance "epfd". Returns 0 in case of success,
- -1 in case of error ( the "errno" variable will contain the
- specific error code ) The "op" parameter is one of the EPOLL_CTL_*
- constants defined above. The "fd" parameter is the target of the
- operation. The "event" parameter describes which events the caller
- is interested in and any associated user data. */
-extern int epoll_ctl (int __epfd, int __op, int __fd,
- struct epoll_event *__event) __THROW;
-
-
-/* Wait for events on an epoll instance "epfd". Returns the number of
- triggered events returned in "events" buffer. Or -1 in case of
- error with the "errno" variable set to the specific error code. The
- "events" parameter is a buffer that will contain triggered
- events. The "maxevents" is the maximum number of events to be
- returned ( usually size of "events" ). The "timeout" parameter
- specifies the maximum wait time in milliseconds (-1 == infinite).
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
-extern int epoll_wait (int __epfd, struct epoll_event *__events,
- int __maxevents, int __timeout);
-
-
-/* Same as epoll_wait, but the thread's signal mask is temporarily
- and atomically replaced with the one provided as parameter.
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
-extern int epoll_pwait (int __epfd, struct epoll_event *__events,
- int __maxevents, int __timeout,
- const __sigset_t *__ss);
-
-__END_DECLS
-
-#endif /* sys/epoll.h */
Removed: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sys/timerfd.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sys/timerfd.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sys/timerfd.h (removed)
@@ -1,59 +1,0 @@
-/* Copyright (C) 2008, 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_TIMERFD_H
-#define _SYS_TIMERFD_H 1
-
-#include <time.h>
-
-
-/* Bits to be set in the FLAGS parameter of `timerfd_create'. */
-enum
- {
- TFD_CLOEXEC = 0x400000,
-#define TFD_CLOEXEC TFD_CLOEXEC
- TFD_NONBLOCK = 0x4000
-#define TFD_NONBLOCK TFD_NONBLOCK
- };
-
-
-/* Bits to be set in the FLAGS parameter of `timerfd_settime'. */
-enum
- {
- TFD_TIMER_ABSTIME = 1 << 0
-#define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME
- };
-
-
-__BEGIN_DECLS
-
-/* Return file descriptor for new interval timer source. */
-extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW;
-
-/* Set next expiration time of interval timer source UFD to UTMR. If
- FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is
- absolute. Optionally return the old expiration time in OTMR. */
-extern int timerfd_settime (int __ufd, int __flags,
- const struct itimerspec *__utmr,
- struct itimerspec *__otmr) __THROW;
-
-/* Return the next expiration time of UFD. */
-extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW;
-
-__END_DECLS
-
-#endif /* sys/timerfd.h */
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/epoll.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/epoll.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/epoll.h Wed Feb 22 00:02:24 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2009, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2002-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
@@ -29,15 +29,12 @@
typedef __sigset_t sigset_t;
#endif
+/* Get the platform-dependent flags. */
+#include <bits/epoll.h>
-/* Flags to be passed to epoll_create1. */
-enum
- {
- EPOLL_CLOEXEC = 02000000,
-#define EPOLL_CLOEXEC EPOLL_CLOEXEC
- EPOLL_NONBLOCK = 04000
-#define EPOLL_NONBLOCK EPOLL_NONBLOCK
- };
+#ifndef __EPOLL_PACKED
+# define __EPOLL_PACKED
+#endif
enum EPOLL_EVENTS
@@ -89,7 +86,7 @@
{
uint32_t events; /* Epoll events */
epoll_data_t data; /* User data variable */
-};
+} __EPOLL_PACKED;
__BEGIN_DECLS
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/timerfd.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/timerfd.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/timerfd.h Wed Feb 22 00:02:24 2012
@@ -20,15 +20,8 @@
#include <time.h>
-
-/* Bits to be set in the FLAGS parameter of `timerfd_create'. */
-enum
- {
- TFD_CLOEXEC = 02000000,
-#define TFD_CLOEXEC TFD_CLOEXEC
- TFD_NONBLOCK = 04000
-#define TFD_NONBLOCK TFD_NONBLOCK
- };
+/* Get the platform-dependent flags. */
+#include <bits/timerfd.h>
/* Bits to be set in the FLAGS parameter of `timerfd_settime'. */
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/epoll.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/epoll.h (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/epoll.h Wed Feb 22 00:02:24 2012
@@ -1,0 +1,31 @@
+/* Copyright (C) 2002-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_EPOLL_H
[... 163 lines stripped ...]
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits