]> sourceware.org Git - glibc.git/log
glibc.git
9 years agoNew Bhilodi and Tulu locales (BZ #17475)
Tatiana Udalova [Wed, 12 Nov 2014 11:36:39 +0000 (17:06 +0530)]
New Bhilodi and Tulu locales (BZ #17475)

9 years ago[AArch64] Add ipc.h.
Alan Hayward [Tue, 11 Nov 2014 16:32:34 +0000 (16:32 +0000)]
[AArch64] Add ipc.h.

Adding ipc.h for AArch64 adjusted to behave correctly on big endian
targets.

9 years agoFix ChangeLog formatting of previous commit.
Marcus Shawcroft [Tue, 11 Nov 2014 15:51:55 +0000 (15:51 +0000)]
Fix ChangeLog formatting of previous commit.

9 years ago[AArch64] End frame record chain correctly.
Renlin Li [Tue, 11 Nov 2014 15:02:02 +0000 (15:02 +0000)]
[AArch64] End frame record chain correctly.

9 years agoUpdate minimal required bunutils version to 2.22
Andrew Senkevich [Mon, 10 Nov 2014 19:16:46 +0000 (11:16 -0800)]
Update minimal required bunutils version to 2.22

9 years agom68k: don't expect PLT reference to __tls_get_addr
Andreas Schwab [Fri, 7 Nov 2014 16:36:36 +0000 (17:36 +0100)]
m68k: don't expect PLT reference to __tls_get_addr

9 years agoRemove __libc_waitpid function name.
Joseph Myers [Fri, 7 Nov 2014 01:27:16 +0000 (01:27 +0000)]
Remove __libc_waitpid function name.

Continuing the removal of unused __libc_* function names, this patch
removes the __libc_waitpid name.

Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch; __waitpid, which is exported from
shared libc, changes from weak to strong on some configurations, which
is of no significance).

* include/sys/wait.h (__libc_waitpid): Remove declaration.
* posix/waitpid.c (__libc_waitpid): Rename to __waitpid.
(__waitpid): Don't define as alias.  Use libc_hidden_def not
libc_hidden_weak.
(waitpid): Define as alias of __waitpid.
* sysdeps/unix/bsd/waitpid.c (__libc_waitpid): Rename to
__waitpid.
(__waitpid): Don't define as alias.  Use libc_hidden_def not
libc_hidden_weak.
(waitpid): Define as alias of __waitpid.
* sysdeps/unix/sysv/linux/i386/syscalls.list (waitpid): Remove
__libc_waitpid alias.
* sysdeps/unix/sysv/linux/m68k/syscalls.list (waitpid): Likewise.
* sysdeps/unix/sysv/linux/powerpc/syscalls.list (waitpid):
Likewise.
* sysdeps/unix/sysv/linux/sh/syscalls.list (waitpid): Likewise.
* sysdeps/unix/sysv/linux/sparc/syscalls.list (waitpid): Likewise.
* sysdeps/unix/sysv/linux/tile/waitpid.S (__libc_waitpid): Remove
alias.
* sysdeps/unix/sysv/linux/waitpid.c (__libc_waitpid): Rename to
__waitpid.
(__waitpid): Don't define as alias.  Use libc_hidden_def not
libc_hidden_weak.
(waitpid): Define as alias of __waitpid.

9 years agomanual/llio.texi: Comment on write atomicity.
Carlos O'Donell [Thu, 6 Nov 2014 20:58:52 +0000 (15:58 -0500)]
manual/llio.texi: Comment on write atomicity.

We add Linux-realted comments about the atomicity of
write with respect to file offsets. As of Linux 3.14
the file offset update is atomic. That means that
multiple threads calling the write syscall can not possibly
get the same file offset. Therefore the writes should
not overlap and data should not be lost as is required
by POSIX.

9 years agoRun check-localpltk/textrel/execstack over ld.so.
Carlos O'Donell [Thu, 6 Nov 2014 20:48:44 +0000 (15:48 -0500)]
Run check-localpltk/textrel/execstack over ld.so.

For maximum paranoia we run ld.so through the normal set
of tests for all of the shared libraries. This includes
running ld.so through check-localplt, check-textrel, and
check-execstack. While none of these should trigger any
failures given the way ld.so is built, it might possibly
fail if a developer does something wrong. This paranoia
was triggered by a discussion over the use of __strcpy
vs. strcpy [1] and if the symbol could leak and use the
libc.so version.

The check-localplt test fails right away because localplt.data
needs updating for all arches. By default we add 6 new symbols:
__tls_get_addr, __libc_memalign, malloc, calloc, realloc and
free. Other machines like i386, power, and s390 require some
different symbol sets e.g. ___tls_get_addr vs. __tls_get_addr
for i386.

Verified for i386
Verified for x86_64
Verified for ppc32
Verified for ppc64
Verified for ppc64le
Verified for arm
Verified for aarch64
Verified for s390
Verified for s390x
Guessed for alpha
Guessed for ia64
Guessed for m68k
Guessed for microblaze
Guessed for sparc32
Guessed for sparc64
Defaults for sh
Defaults for mips
Defaults for hppa
Defaults for tile

Machine manintainers notified to double check the data
used in localplt.data.

[1] https://sourceware.org/ml/libc-alpha/2014-10/msg00548.html

9 years agoRemove INTDEF / INTUSE / INTVARDEF (bug 14132).
Joseph Myers [Wed, 5 Nov 2014 23:35:36 +0000 (23:35 +0000)]
Remove INTDEF / INTUSE / INTVARDEF (bug 14132).

Completing the removal of the obsolete INTDEF / INTUSE mechanism, this
patch removes the final use - that for _dl_starting_up - replacing it
by rtld_hidden_def / rtld_hidden_proto.  Having removed the last use,
the mechanism itself is also removed.

Tested for x86_64 that installed stripped shared libraries are
unchanged by the patch.  (This is not much of a test since this
variable is only defined and used in the !HAVE_INLINED_SYSCALLS case.)

[BZ #14132]
* include/libc-symbols.h (INTUSE): Remove macro.
(INTDEF): Likewise.
(INTVARDEF): Likewise.
(_INTVARDEF): Likewise.
(INTDEF2): Likewise.
(INTVARDEF2): Likewise.
* elf/rtld.c [!HAVE_INLINED_SYSCALLS] (_dl_starting_up): Use
rtld_hidden_def instead of INTVARDEF.
* sysdeps/generic/ldsodefs.h [IS_IN_rtld]
(_dl_starting_up_internal): Remove declaration.
(_dl_starting_up): Use rtld_hidden_proto.
* elf/dl-init.c [!HAVE_INLINED_SYSCALLS] (_dl_starting_up): Remove
declaration.
[!HAVE_INLINED_SYSCALLS] (_dl_starting_up_internal): Likewise.
(_dl_init) [!HAVE_INLINED_SYSCALLS]: Don't use INTUSE with
_dl_starting_up.
* elf/dl-writev.h (_dl_writev): Likewise.
* sysdeps/powerpc/powerpc64/dl-machine.h [!HAVE_INLINED_SYSCALLS]
(DL_STARTING_UP_DEF): Use __GI__dl_starting_up instead of
_dl_starting_up_internal.

9 years agolibio: Refactor tst-fmemopen to use test-skeleton.c
Adhemerval Zanella [Wed, 11 Jun 2014 18:00:14 +0000 (15:00 -0300)]
libio: Refactor tst-fmemopen to use test-skeleton.c

This patch refactor tst-fmemopen.c to use test-skeleton.c.  No logic
changes are added.

9 years agobenchtests: Add malloc microbenchmark
Will Newton [Wed, 11 Sep 2013 14:47:12 +0000 (15:47 +0100)]
benchtests: Add malloc microbenchmark

Add a microbenchmark for measuring malloc and free performance with
varying numbers of threads. The benchmark allocates and frees buffers
of random sizes in a random order and measures the overall execution
time and RSS. Variants of the benchmark are run with 1, 8, 16 and
32 threads.

The random block sizes used follow an inverse square distribution
which is intended to mimic the behaviour of real applications which
tend to allocate many more small blocks than large ones.

ChangeLog:

2014-11-05  Will Newton  <will.newton@linaro.org>

* benchtests/Makefile: (bench-malloc): Add malloc thread
scalability benchmark.
* benchtests/bench-malloc-threads.c: New file.

9 years ago[AArch64] Add optimized strchrnul.
Richard Earnshaw [Wed, 5 Nov 2014 13:51:56 +0000 (13:51 +0000)]
[AArch64] Add optimized strchrnul.

Here is an optimized implementation of __strchrnul.  The
simplification that we don't have to track precisely why the loop
terminates (match or end-of-string) means we have to do less work in
both setup and the core inner loop.  That means this should never be
slower than strchr.

As with strchr, the use of LD1 means we do not need different versions
for big-/little-endian.

9 years agopowerpc: Simplify encoding of POWER8 instruction
Adhemerval Zanella [Wed, 5 Nov 2014 13:01:09 +0000 (08:01 -0500)]
powerpc: Simplify encoding of POWER8 instruction

9 years agoModify several tests to use test-skeleton.c
Arjun Shankar [Wed, 5 Nov 2014 09:54:08 +0000 (15:24 +0530)]
Modify several tests to use test-skeleton.c

This patch modifies several test cases to use test-skeleton.c.
It was generated by a bash script written for this purpose and
thus excludes several other tests which I deemed worth a visual
inspection before making the change.

I intend to follow up with individual patches to the tests
skipped by the script.

The script itself resides at http://git.io/WODAmg and should
reproduce this very patch when run against master.

ChangeLog:

2014-10-30  Arjun Shankar  <arjun.is@lostca.se>

* catgets/test-gencat.c: Use test-skeleton.c.
* catgets/tst-catgets.c: Likewise.
* csu/tst-empty.c: Likewise.
* elf/tst-audit2.c: Likewise.
* elf/tst-global1.c: Likewise.
* elf/tst-pathopt.c: Likewise.
* elf/tst-piemod1.c: Likewise.
* elf/tst-tls10.c: Likewise.
* elf/tst-tls11.c: Likewise.
* elf/tst-tls12.c: Likewise.
* gnulib/tst-gcc.c: Likewise.
* iconvdata/tst-e2big.c: Likewise.
* iconvdata/tst-loading.c: Likewise.
* iconv/tst-iconv1.c: Likewise.
* iconv/tst-iconv2.c: Likewise.
* inet/test-inet6_opt.c: Likewise.
* inet/tst-gethnm.c: Likewise.
* inet/tst-network.c: Likewise.
* inet/tst-ntoa.c: Likewise.
* intl/tst-codeset.c: Likewise.
* intl/tst-gettext2.c: Likewise.
* intl/tst-gettext3.c: Likewise.
* intl/tst-ngettext.c: Likewise.
* intl/tst-translit.c: Likewise.
* io/test-stat.c: Likewise.
* libio/test-fmemopen.c: Likewise.
* libio/tst-freopen.c: Likewise.
* libio/tst-sscanf.c: Likewise.
* libio/tst-ungetwc1.c: Likewise.
* libio/tst-ungetwc2.c: Likewise.
* libio/tst-widetext.c: Likewise.
* localedata/tst-ctype.c: Likewise.
* localedata/tst-digits.c: Likewise.
* localedata/tst-leaks.c: Likewise.
* localedata/tst-mbswcs1.c: Likewise.
* localedata/tst-mbswcs2.c: Likewise.
* localedata/tst-mbswcs3.c: Likewise.
* localedata/tst-mbswcs4.c: Likewise.
* localedata/tst-mbswcs5.c: Likewise.
* localedata/tst-setlocale.c: Likewise.
* localedata/tst-trans.c: Likewise.
* localedata/tst-wctype.c: Likewise.
* localedata/tst-xlocale1.c: Likewise.
* login/tst-grantpt.c: Likewise.
* malloc/tst-calloc.c: Likewise.
* malloc/tst-malloc.c: Likewise.
* malloc/tst-mallocstate.c: Likewise.
* malloc/tst-mcheck.c: Likewise.
* malloc/tst-mtrace.c: Likewise.
* malloc/tst-obstack.c: Likewise.
* math/atest-exp2.c: Likewise.
* math/atest-exp.c: Likewise.
* math/atest-sincos.c: Likewise.
* math/test-matherr.c: Likewise.
* math/test-misc.c: Likewise.
* math/test-powl.c: Likewise.
* math/tst-definitions.c: Likewise.
* misc/tst-dirname.c: Likewise.
* misc/tst-efgcvt.c: Likewise.
* misc/tst-fdset.c: Likewise.
* misc/tst-hsearch.c: Likewise.
* misc/tst-mntent2.c: Likewise.
* nptl/tst-sem7.c: Likewise.
* nptl/tst-sem8.c: Likewise.
* nptl/tst-sem9.c: Likewise.
* nss/test-netdb.c: Likewise.
* posix/tst-fnmatch.c: Likewise.
* posix/tst-getlogin.c: Likewise.
* posix/tst-gnuglob.c: Likewise.
* posix/tst-mmap.c: Likewise.
* pwd/tst-getpw.c: Likewise.
* resolv/tst-inet_ntop.c: Likewise.
* rt/tst-timer.c: Likewise.
* stdio-common/test-fseek.c: Likewise.
* stdio-common/test-popen.c: Likewise.
* stdio-common/test-vfprintf.c: Likewise.
* stdio-common/tst-cookie.c: Likewise.
* stdio-common/tst-fileno.c: Likewise.
* stdio-common/tst-gets.c: Likewise.
* stdio-common/tst-obprintf.c: Likewise.
* stdio-common/tst-perror.c: Likewise.
* stdio-common/tst-sprintf2.c: Likewise.
* stdio-common/tst-sprintf3.c: Likewise.
* stdio-common/tst-sprintf.c: Likewise.
* stdio-common/tst-swprintf.c: Likewise.
* stdio-common/tst-tmpnam.c: Likewise.
* stdio-common/tst-unbputc.c: Likewise.
* stdio-common/tst-wc-printf.c: Likewise.
* stdlib/tst-environ.c: Likewise.
* stdlib/tst-fmtmsg.c: Likewise.
* stdlib/tst-limits.c: Likewise.
* stdlib/tst-rand48-2.c: Likewise.
* stdlib/tst-rand48.c: Likewise.
* stdlib/tst-random2.c: Likewise.
* stdlib/tst-random.c: Likewise.
* stdlib/tst-strtol.c: Likewise.
* stdlib/tst-strtoll.c: Likewise.
* stdlib/tst-tls-atexit.c: Likewise.
* stdlib/tst-xpg-basename.c: Likewise.
* string/test-ffs.c: Likewise.
* string/tst-bswap.c: Likewise.
* string/tst-inlcall.c: Likewise.
* string/tst-strtok.c: Likewise.
* string/tst-strxfrm.c: Likewise.
* sysdeps/x86_64/tst-audit10.c: Likewise.
* sysdeps/x86_64/tst-audit3.c: Likewise.
* sysdeps/x86_64/tst-audit4.c: Likewise.
* sysdeps/x86_64/tst-audit5.c: Likewise.
* time/tst-ftime_l.c: Likewise.
* time/tst-getdate.c: Likewise.
* time/tst-mktime3.c: Likewise.
* time/tst-mktime.c: Likewise.
* time/tst-posixtz.c: Likewise.
* time/tst-strptime2.c: Likewise.
* time/tst-strptime3.c: Likewise.
* wcsmbs/tst-btowc.c: Likewise.
* wcsmbs/tst-mbrtowc.c: Likewise.
* wcsmbs/tst-mbsrtowcs.c: Likewise.
* wcsmbs/tst-wchar-h.c: Likewise.
* wcsmbs/tst-wcpncpy.c: Likewise.
* wcsmbs/tst-wcrtomb.c: Likewise.
* wcsmbs/tst-wcsnlen.c: Likewise.
* wcsmbs/tst-wcstof.c: Likewise.

9 years agoDon't use INTDEF/INTUSE with _dl_mcount (bug 14132).
Joseph Myers [Wed, 5 Nov 2014 01:02:47 +0000 (01:02 +0000)]
Don't use INTDEF/INTUSE with _dl_mcount (bug 14132).

Continuing the removal of the obsolete INTDEF / INTUSE mechanism, this
patch replaces its use for _dl_mcount with use of rtld_hidden_def /
rtld_hidden_proto.

Tested for x86_64 that installed stripped shared libraries are
unchanged by the patch.

[BZ #14132]
* elf/dl-profile.c (_dl_mcount): Use rtld_hidden_def instead of
INTDEF.
* sysdeps/generic/ldsodefs.h (_dl_mcount_internal): Remove
declaration.
(_dl_mcount): Use rtld_hidden_proto.
* elf/dl-runtime.c (_dl_profile_fixup): Don't use INTUSE with
_dl_mcount.
* elf/rtld.c (_rtld_global_ro): Likewise.

9 years agoDon't use INTDEF/INTUSE with _dl_init (bug 14132).
Joseph Myers [Tue, 4 Nov 2014 23:26:39 +0000 (23:26 +0000)]
Don't use INTDEF/INTUSE with _dl_init (bug 14132).

Continuing the removal of the obsolete INTDEF / INTUSE mechanism, this
patch eliminates its use for _dl_init.  Since _dl_init was already
declared with hidden visibility, creating a second hidden alias for it
was completely pointless, so this patch replaces all uses of
_dl_init_internal with plain _dl_init instead of using hidden_proto /
hidden_def (which are only needed when you want a hidden alias for a
non-hidden symbol; it's quite possible there are cases where they are
used but don't need to be because the symbol in question is not part
of the public ABI and is only used within a single library, so using
attributes_hidden instead would suffice).

Tested for x86_64 that installed stripped shared libraries are
unchanged by the patch.

[BZ #14132]
* elf/dl-init.c (_dl_init): Don't use INTDEF.
* sysdeps/aarch64/dl-machine.h (RTLD_START): Use _dl_init instead
of _dl_init_internal.
* sysdeps/alpha/dl-machine.h (RTLD_START): Likewise.
* sysdeps/arm/dl-machine.h (RTLD_START): Likewise.
* sysdeps/hppa/dl-machine.h (RTLD_START): Likewise.
* sysdeps/i386/dl-machine.h (RTLD_START): Likewise.
* sysdeps/ia64/dl-machine.h (RTLD_START): Likewise.
* sysdeps/m68k/dl-machine.h (RTLD_START): Likewise.
* sysdeps/microblaze/dl-machine.h (RTLD_START): Likewise.
* sysdeps/mips/dl-machine.h (RTLD_START): Likewise.
* sysdeps/powerpc/powerpc32/dl-start.S (_start): Likewise.
* sysdeps/s390/s390-32/dl-machine.h (RTLD_START): Likewise.
* sysdeps/s390/s390-64/dl-machine.h (RTLD_START): Likewise.
* sysdeps/sh/dl-machine.h (RTLD_START): Likewise.
* sysdeps/sparc/sparc32/dl-machine.h (RTLD_START): Likewise.
* sysdeps/sparc/sparc64/dl-machine.h (RTLD_START): Likewise.
* sysdeps/tile/dl-start.S (_start): Likewise.
* sysdeps/x86_64/dl-machine.h (RTLD_START): Likewise.
* sysdeps/x86_64/x32/dl-machine.h (RTLD_START): Likewise.

9 years agoDon't use INTDEF/INTUSE with _dl_argv (bug 14132).
Joseph Myers [Tue, 4 Nov 2014 17:39:39 +0000 (17:39 +0000)]
Don't use INTDEF/INTUSE with _dl_argv (bug 14132).

Continuing the removal of the obsolete INTDEF / INTUSE mechanism, this
patch replaces its use for _dl_argv with rtld_hidden_data_def and
rtld_hidden_proto.  Some places in .S files that previously used
_dl_argv_internal or INTUSE(_dl_argv) now use __GI__dl_argv directly
(there are plenty of existing examples of such direct use of __GI_*).

A single place in rtld.c previously used _dl_argv without INTUSE,
apparently accidentally, while the rtld_hidden_proto mechanism avoids
such accidential omissions.  As a consequence, this patch *does*
change the contents of stripped ld.so.  However, the installed
stripped shared libraries are identical to those you get if instead of
this patch you change that single _dl_argv use to use INTUSE, without
any other changes.

Tested for x86_64 (testsuite as well as comparison of installed
stripped shared libraries as described above).

[BZ #14132]
* sysdeps/generic/ldsodefs.h (_dl_argv): Use rtld_hidden_proto.
[IS_IN_rtld] (_dl_argv_internal): Do not declare.
(rtld_progname): Make macro definition unconditional.
* elf/rtld.c (_dl_argv): Use rtld_hidden_data_def instead of
INTDEF.
(dlmopen_doit): Do not use INTUSE with _dl_argv.
(dl_main): Likewise.
* elf/dl-sysdep.c (_dl_sysdep_start): Likewise.
* sysdeps/alpha/dl-machine.h (RTLD_START): Use __GI__dl_argv
instead of _dl_argv_internal.
* sysdeps/powerpc/powerpc32/dl-start.S (_dl_start_user): Use
__GI__dl_argv instead of INTUSE(_dl_argv).
* sysdeps/powerpc/powerpc64/dl-machine.h (RTLD_START): Use
__GI__dl_argv instead of _dl_argv_internal.

9 years agosoft-fp: Add _FP_TO_INT_ROUND.
Joseph Myers [Tue, 4 Nov 2014 16:34:49 +0000 (16:34 +0000)]
soft-fp: Add _FP_TO_INT_ROUND.

Continuing the series of patches adding soft-fp features from the
kernel version of soft-fp to glibc so that glibc's version is able to
replace the old fork of soft-fp in the kernel, this patch adds the
last major such feature: _FP_TO_INT_ROUND, converting a floating-point
number to an integer with rounding according to the current rounding
direction (as opposed to truncating towards zero, which _FP_TO_INT
does).

The general structure of the implementation follows that of
_FP_TO_INT, but of course is more complicated.  As with glibc's
_FP_TO_INT it works with raw input (the kernel versions of these
macros predate the conversion of _FP_TO_INT and many other macros to
raw or semi-raw input).  I have not tried to work out what bugs there
might be in the kernel version that this might fix; it's a
from-scratch implementation based on _FP_TO_INT.

Tested for powerpc (soft-float) that there is no change to the
installed shared libraries; also tested with the libm tests with lrint
/ lrintf / llrint / llrintf made to use _FP_TO_INT_ROUND, to provide
some test of the functionality.  As we don't have benchmarks for those
functions, I haven't actually included the soft-fp versions of them,
although I expect them to be faster than the existing code (given that
the existing code involves adding and subtracting numbers such as
0x1p52 to achieve the desired rounding, which is not particularly
efficient when the underlying floating point is software floating
point).

2014-11-04  Joseph Myers  <joseph@codesourcery.com>

* soft-fp/op-common.h (_FP_TO_INT_ROUND): New macro.
* soft-fp/double.h [_FP_W_TYPE_SIZE < 64] (FP_TO_INT_ROUND_D): New
macro.
[_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_ROUND_D): Likewise.
* soft-fp/extended.h [_FP_W_TYPE_SIZE < 64] (FP_TO_INT_ROUND_E):
New macro.
[_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_ROUND_E): Likewise.
* soft-fp/quad.h [_FP_W_TYPE_SIZE < 64] (FP_TO_INT_ROUND_Q): New
macro.
[_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_ROUND_Q): Likewise.
* soft-fp/single.h (FP_TO_INT_ROUND_S): New macro.

9 years agoRemove unused include
Andreas Schwab [Wed, 17 Sep 2014 10:34:24 +0000 (12:34 +0200)]
Remove unused include

9 years agopowerpc: Fix encoding of POWER8 instruction
Adhemerval Zanella [Mon, 3 Nov 2014 12:26:33 +0000 (07:26 -0500)]
powerpc: Fix encoding of POWER8 instruction

This patch adds a binary encoding for 'mtvsrd' instruction to avoid
build failures when assembler does not support POWER8.

9 years agoDon't error out writing a multibyte character to an unbuffered stream (bug 17522)
Andreas Schwab [Thu, 30 Oct 2014 11:18:48 +0000 (12:18 +0100)]
Don't error out writing a multibyte character to an unbuffered stream (bug 17522)

9 years agoFix sparc struct fpu definition.
Jose E. Marchesi [Sat, 1 Nov 2014 20:45:02 +0000 (13:45 -0700)]
Fix sparc struct fpu definition.

* sysdeps/unix/sysv/linux/sparc/sys/ucontext.h (struct fpu): fix
the size of the fpu_fr.fpu_dregs[] array.

9 years agoRemove __libc_nanosleep function name.
Joseph Myers [Sat, 1 Nov 2014 12:26:09 +0000 (12:26 +0000)]
Remove __libc_nanosleep function name.

Continuing the removal of unused __libc_* function names, this patch
removes the __libc_nanosleep name.

Tested for x86_64 (testsuite, and that the disassembly of installed
shared libraries is unchanged by the patch; __nanosleep changes from
weak to strong, which is of no significance).

* posix/nanosleep.c (__libc_nanosleep): Rename to __nanosleep.
(__nanosleep): Do not define as alias.
(nanosleep): Define as alias of __nanosleep.
* sysdeps/unix/sysv/linux/syscalls.list (nanosleep): Remove
__libc_nanosleep name.

9 years agoMake aclocal.m4 comment mention updating install.texi for autoconf version.
Joseph Myers [Fri, 31 Oct 2014 22:44:17 +0000 (22:44 +0000)]
Make aclocal.m4 comment mention updating install.texi for autoconf version.

* aclocal.m4 (GLIBC_AUTOCONF_VERSION): Mention need to update
install.texi in comment.

9 years agopowerpc: Change atomic_write_barrier to have release semantics.
Torvald Riegel [Fri, 17 Oct 2014 23:01:58 +0000 (01:01 +0200)]
powerpc: Change atomic_write_barrier to have release semantics.

9 years agoAdd a hook to enable load-time inspection of program headers
Matthew Fortune [Wed, 1 Oct 2014 16:08:51 +0000 (17:08 +0100)]
Add a hook to enable load-time inspection of program headers

This hook can be used to perform additional compatibility checks
between shared libraries by inspecting custom program header
information.

* elf/dl-machine-reject-phdr.h: New file.
* elf/dl-load.c: #include that.
(open_verify): Call elf_machine_reject_phdr_p and ignore the file
if that returned true.

9 years agoBZ#17496: Fix gnu/lib-names.h dependency.
Roland McGrath [Fri, 31 Oct 2014 22:07:36 +0000 (15:07 -0700)]
BZ#17496: Fix gnu/lib-names.h dependency.

9 years agoUpdate autoconf version requirement in install.texi.
Joseph Myers [Fri, 31 Oct 2014 21:49:35 +0000 (21:49 +0000)]
Update autoconf version requirement in install.texi.

I noticed that install.texi was out of date with regard to the actual
autoconf version requirement for regenerating configure scripts.  This
patch updates the documentation.

* manual/install.texi (Tools for Compilation): Update autoconf
version requirements.
* INSTALL: Regenerated.

9 years agoRemove __libc_pselect alias.
Joseph Myers [Fri, 31 Oct 2014 21:22:35 +0000 (21:22 +0000)]
Remove __libc_pselect alias.

Continuing the removal of unused __libc_* function names, this patch
removes the __libc_pselect alias.

Tested for x86_64 that installed stripped shared libraries are
unchanged by this patch.

* misc/pselect.c [!__pselect] (__libc_pselect): Remove alias.
* sysdeps/unix/sysv/linux/pselect.c [__NR_pselect6]
(__libc_pselect): Likewise.

9 years agoAdd bug 15215 to NEWS; move bug 17344 to correct version's list in NEWS.
Joseph Myers [Fri, 31 Oct 2014 21:21:15 +0000 (21:21 +0000)]
Add bug 15215 to NEWS; move bug 17344 to correct version's list in NEWS.

9 years agoMove powerpc64 pread/pwrite definitions to syscalls.list (bug 14138).
Joseph Myers [Fri, 31 Oct 2014 21:13:32 +0000 (21:13 +0000)]
Move powerpc64 pread/pwrite definitions to syscalls.list (bug 14138).

Concluding the move of syscall definitions to syscalls.list, where the
removal of support for old kernel versions has made this possible,
this patch removes C definitions of pread, pread64, pwrite and
pwrite64 for powerpc64.  As far as I can tell, the existing
syscalls.list definitions in
sysdeps/unix/sysv/linux/wordsize-64/syscalls.list should suffice to
produce results equivalent to what these C files do.

[BZ #14138]
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c: Remove file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c: Likewise.

9 years agoFix SPARC atomic_write_barrier.
Torvald Riegel [Wed, 29 Oct 2014 18:14:14 +0000 (19:14 +0100)]
Fix SPARC atomic_write_barrier.

9 years agoClean up internal ctype.h header.
Roland McGrath [Thu, 30 Oct 2014 20:19:34 +0000 (13:19 -0700)]
Clean up internal ctype.h header.

9 years agoRemove __libc_readv and __libc_writev function names.
Joseph Myers [Thu, 30 Oct 2014 20:56:34 +0000 (20:56 +0000)]
Remove __libc_readv and __libc_writev function names.

Continuing the removal of __libc_* function names that are no longer
used anywhere, this patch removes the __libc_readv and __libc_writev
names.

Tested for x86_64 that stripped installed shared libraries are
unchanged by the patch.

* include/sys/uio.h (__libc_readv): Remove declaration.
(__libc_writev): Likewise.
* misc/readv.c (__libc_readv): Rename to __readv.
(__readv): Do not define as alias.
(readv): Define as alias of __readv.
* misc/writev.c (__libc_writev): Rename to __writev.
(__writev): Do not define as alias.
(writev): Define as alias of __writev.
* sysdeps/posix/readv.c (__libc_readv): Rename to __readv.
(__readv): Do not define as alias.
(readv): Define unconditionally as alias of __readv.
* sysdeps/posix/writev.c (__libc_writev): Rename to __writev.
(__writev): Do not define as alias.
(writev): Define unconditionally as alias of __writev.
* sysdeps/unix/syscalls.list (readv): Do not define __libc_readv
name.
(writev): Do not define __libc_writev name.

9 years agoClean up wchar_t conversion code in iconv program.
Roland McGrath [Thu, 30 Oct 2014 19:56:51 +0000 (12:56 -0700)]
Clean up wchar_t conversion code in iconv program.

9 years agoRemove __libc_creat function name.
Joseph Myers [Thu, 30 Oct 2014 19:44:31 +0000 (19:44 +0000)]
Remove __libc_creat function name.

glibc has lots of __libc_* function names that no longer serve any
purpose (are not used for any calls or exported at a public symbol
version).  This patch removes __libc_creat.  It has the effect of
creat becoming a strong symbol instead of a weak symbol in various
cases, but that's fine; in shared libraries it doesn't matter at all,
while for static linking the only other symbol sometimes defined in
the same object is creat64, and whenever creat64 is a reserved name so
is creat.

Other such cases of unnecessary __libc_* symbols are expected to be
dealt with in separate patches over time.

Tested for x86_64 (testsuite, and that the disassembly of installed
shared libraries is unchanged by the patch).

* include/fcntl.h (__libc_creat): Remove declaration.
* io/creat.c (__libc_creat): Rename to creat.
(creat): Do not define as alias.
* sysdeps/unix/sysv/linux/alpha/creat.c (creat64): Define as alias
of creat instead of __libc_creat.
* sysdeps/unix/sysv/linux/generic/creat.c (__libc_creat): Rename
to creat.
(creat): Do not define as alias.
[__WORDSIZE == 64] (creat64): Define as alias of creat instead of
__libc_creat.
* sysdeps/unix/sysv/linux/syscalls.list (creat): Do not define
__libc_creat name.
* sysdeps/unix/sysv/linux/wordsize-64/syscalls.list (creat):
Likewise.

9 years agomanual/llio.texi: Add Linux-specific comments for write().
Carlos O'Donell [Thu, 30 Oct 2014 00:39:07 +0000 (20:39 -0400)]
manual/llio.texi: Add Linux-specific comments for write().

Add Linux-specific comments about the atomicity of write() and
the POSIX requirements.

2014-10-29  Carlos O'Donell  <carlos@redhat.com>

* manual/llio.texi: Add comments discussing why write() may be
considered MT-unsafe on Linux.

9 years agoelf/dl-load.c: Use __strdup.
Carlos O'Donell [Tue, 28 Oct 2014 23:37:07 +0000 (19:37 -0400)]
elf/dl-load.c: Use __strdup.

During a refactoring pass several repeated blocks of code in dl-load.c
were turned into a call to a local function named local_strdup.  There
is no need for local_strdup, and the routines should instead call
__strdup.  This change does just that.  We call the internal symbol
__strdup because calling strdup is unsafe.  The user might be
using a standard that doesn't include strdup and may have defined this
symbol in their application. During a static link we might reference
the user defined symbol and crash if it doesn't implement a standards
conforming strdup. The resulting code is simpler to understand, and
makes it easier to debug.

No regressions on x86_64.

2014-10-28  Carlos O'Donell  <carlos@redhat.com>

* dl-load.c (local_strdup): Remove.
(expand_dynamic_string_token): Use __strdup.
(decompose_rpath): Likewise.
(_dl_map_object): Likewise.

9 years agoDon't use INTDEF/INTUSE in unwind-dw2-fde.c (bug 14132).
Joseph Myers [Tue, 28 Oct 2014 17:12:57 +0000 (17:12 +0000)]
Don't use INTDEF/INTUSE in unwind-dw2-fde.c (bug 14132).

Continuing the removal of the obsolete INTDEF / INTUSE mechanism, this
patch replaces its use in unwind-dw2-fde.c with hidden_def and
hidden_proto.

Tested for x86.  This patch does result in code generation differences
(for some reason GCC decides to partition __register_frame_info_bases
after the patch).

[BZ #14132]
* sysdeps/generic/unwind-dw2-fde.c
(__register_frame_info_bases_internal): Do not declare.
(__register_frame_info_table_bases_internal): Likewise.
(__deregister_frame_info_bases_internal): Likewise.
(__register_frame_info_bases): Declare and use hidden_proto before
definition.  Use hidden_def instead of INTDEF.
(__register_frame_info_table_bases): Likewise.
(__deregister_frame_info_bases): Likewise.
(__register_frame_info): Do not use INTUSE.
(__register_frame): Likewise.
(__register_frame_info_table): Likewise.
(__register_frame_table): Likewise.
(__deregister_frame_info): Likewise.
(__deregister_frame): Likewise.

9 years agoarm: Re-enable PI futex support for ARM kernels >= 3.14.3
Gratian Crisan [Mon, 27 Oct 2014 22:45:43 +0000 (22:45 +0000)]
arm: Re-enable PI futex support for ARM kernels >= 3.14.3

ARM linux kernels before 3.14.3 may or may not support
futex_atomic_cmpxchg_inatomic depending on the kernel configuration (e.g.
CONFIG_CPU_USE_DOMAINS && CONFIG_SMP configuration was not supported)

Starting with 3.14.3 the linux kernel unconditionally enables support for
ARM, and this re-enables the relevant __ASSUME_* macros.

Tested on ARM both with kernels >= 3.14.3 and older kernels.

* sysdeps/unix/sysv/linux/arm/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x030E03] (__ASSUME_FUTEX_LOCK_PI): Do
not undefine.
[__LINUX_KERNEL_VERSION >= 0x030E03] (__ASSUME_REQUEUE_PI):
Likewise.
[__LINUX_KERNEL_VERSION >= 0x030E03] (__ASSUME_SET_ROBUST_LIST):
Likewise.

9 years agoMove setfsgid/setfsuid definitions to syscalls.list (bug 14138).
Joseph Myers [Mon, 27 Oct 2014 12:24:42 +0000 (12:24 +0000)]
Move setfsgid/setfsuid definitions to syscalls.list (bug 14138).

Continuing the move of syscall definitions to syscalls.list, where the
removal of support for old kernel versions has made this possible,
this patch moves various definitions of setfsgid and setfsuid.

Tested for x86.

[BZ #14138]
* sysdeps/unix/sysv/linux/arm/setfsgid.c: Remove file.
* sysdeps/unix/sysv/linux/arm/setfsuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setfsgid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setfsuid.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/setfsgid.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/setfsuid.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/setfsgid.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/setfsuid.c: Likewise.
* sysdeps/unix/sysv/linux/sh/setfsgid.c: Likewise.
* sysdeps/unix/sysv/linux/sh/setfsuid.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/setfsgid.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/setfsuid.c: Likewise.
* sysdeps/unix/sysv/linux/arm/syscalls.list (setfsgid): Add
syscall.
(setfsuid): Likewise.
* sysdeps/unix/sysv/linux/i386/syscalls.list (setfsgid): Likewise.
(setfsuid): Likewise.
* sysdeps/unix/sysv/linux/m68k/syscalls.list (setfsgid): Likewise.
(setfsuid): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list (setfsgid):
Likewise.
(setfsuid): Likewise.
* sysdeps/unix/sysv/linux/sh/syscalls.list (setfsgid): Likewise.
(setfsuid): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list (setfsgid):
Likewise.
(setfsuid): Likewise.

9 years agoFix misdetected Slow_SSE4_2 cpu feature bit (bug 17501)
Andreas Schwab [Tue, 21 Oct 2014 09:09:19 +0000 (11:09 +0200)]
Fix misdetected Slow_SSE4_2 cpu feature bit (bug 17501)

9 years agoRework compiler version check in configure.
Roland McGrath [Fri, 24 Oct 2014 21:45:47 +0000 (14:45 -0700)]
Rework compiler version check in configure.

9 years agoPrototypify htonl and htons definitions.
Roland McGrath [Fri, 24 Oct 2014 19:37:36 +0000 (12:37 -0700)]
Prototypify htonl and htons definitions.

9 years agoThis patch improves strncat performance by using strlen. Strlen has a fast C implemen...
Wilco Dijkstra [Fri, 24 Oct 2014 16:12:12 +0000 (16:12 +0000)]
This patch improves strncat performance by using strlen. Strlen has a fast C implementation, so
this
will improve performance even on targets which don't have an optimized strlen. It is about twice
as
fast as the original strncat in bench-strncat.

9 years agoThis patch improves strcat performance by using strlen and strcpy. Strlen has a fast C
Wilco Dijkstra [Fri, 24 Oct 2014 16:08:42 +0000 (16:08 +0000)]
This patch improves strcat performance by using strlen and strcpy. Strlen has a fast C
implementation, so this improves performance even on targets which don't have an optimized
strlen and strcpy - it is 25% faster in bench-strcat. On targets which don't provide an
optimized strcat but which do have an optimized strlen and strcpy, performance gain is > 2x.

9 years agoCall libc_fetestexcept_aarch64 from math_private.h rather than duplicating functionality.
Wilco Dijkstra [Fri, 24 Oct 2014 13:23:12 +0000 (13:23 +0000)]
Call libc_fetestexcept_aarch64 from math_private.h rather than duplicating functionality.

9 years agoCall libc_feholdexcept_aarch64 from math_private.h rather than duplicating functionality.
Wilco Dijkstra [Fri, 24 Oct 2014 13:21:27 +0000 (13:21 +0000)]
Call libc_feholdexcept_aarch64 from math_private.h rather than duplicating functionality.

9 years agoCall get_rounding_mode rather than duplicating functionality.
Wilco Dijkstra [Fri, 24 Oct 2014 13:19:24 +0000 (13:19 +0000)]
Call get_rounding_mode rather than duplicating functionality.

9 years agoCleanup feenableexcept to use the same logic as the ARM version. No functional changes.
Wilco Dijkstra [Fri, 24 Oct 2014 13:07:17 +0000 (13:07 +0000)]
Cleanup feenableexcept to use the same logic as the ARM version. No functional changes.

9 years agoCleanup fedisableexcept to use the same logic as the ARM version. No functional changes.
Wilco Dijkstra [Fri, 24 Oct 2014 13:06:04 +0000 (13:06 +0000)]
Cleanup fedisableexcept to use the same logic as the ARM version. No functional changes.

9 years agoCleanup feclearexcept to use the same logic as the ARM version. No functional changes.
Wilco Dijkstra [Fri, 24 Oct 2014 13:01:38 +0000 (13:01 +0000)]
Cleanup feclearexcept to use the same logic as the ARM version. No functional changes.

9 years agoCleanup fesetexceptflag to use the same logic as the ARM version. No functional changes.
Wilco Dijkstra [Fri, 24 Oct 2014 12:59:44 +0000 (12:59 +0000)]
Cleanup fesetexceptflag to use the same logic as the ARM version. No functional changes.

9 years agoRemove an unused include.
Wilco Dijkstra [Fri, 24 Oct 2014 12:57:49 +0000 (12:57 +0000)]
Remove an unused include.

9 years agoMove get*id and getgroups definitions to syscalls.list (bug 14138).
Joseph Myers [Fri, 24 Oct 2014 13:01:17 +0000 (13:01 +0000)]
Move get*id and getgroups definitions to syscalls.list (bug 14138).

Continuing the move of syscall definitions to syscalls.list, where the
removal of support for old kernel versions has made this possible,
this patch moves various definitions of get*id functions and
getgroups.  The previous C definitions were because of the transition
to 32-bit uids and gids.

Tested for x86.

[BZ #14138]
* sysdeps/unix/sysv/linux/arm/getegid.c: Remove file.
* sysdeps/unix/sysv/linux/arm/geteuid.c: Likewise.
* sysdeps/unix/sysv/linux/arm/getgid.c: Likewise.
* sysdeps/unix/sysv/linux/arm/getgroups.c: Likewise.
* sysdeps/unix/sysv/linux/arm/getresgid.c: Likewise.
* sysdeps/unix/sysv/linux/arm/getresuid.c: Likewise.
* sysdeps/unix/sysv/linux/arm/getuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getegid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/geteuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getgid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getgroups.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getresgid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getresuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getuid.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/getegid.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/geteuid.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/getgid.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/getgroups.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/getresgid.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/getresuid.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/getuid.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/getegid.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/geteuid.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/getgid.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/getgroups.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/getresgid.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/getresuid.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/getuid.c: Likewise.
* sysdeps/unix/sysv/linux/sh/getegid.c: Likewise.
* sysdeps/unix/sysv/linux/sh/geteuid.c: Likewise.
* sysdeps/unix/sysv/linux/sh/getgid.c: Likewise.
* sysdeps/unix/sysv/linux/sh/getgroups.c: Likewise.
* sysdeps/unix/sysv/linux/sh/getresgid.c: Likewise.
* sysdeps/unix/sysv/linux/sh/getresuid.c: Likewise.
* sysdeps/unix/sysv/linux/sh/getuid.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/getegid.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/geteuid.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/getgid.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/getgroups.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/getuid.c: Likewise.
* sysdeps/unix/sysv/linux/arm/syscalls.list (getegid): Add
syscall.
(geteuid): Likewise.
(getgid): Likewise.
(getuid): Likewise.
(getresgid): Likewise.
(getresuid): Likewise.
(getgroups): Likewise.
* sysdeps/unix/sysv/linux/i386/syscalls.list (getegid): Likewise.
(geteuid): Likewise.
(getgid): Likewise.
(getuid): Likewise.
(getresgid): Likewise.
(getresuid): Likewise.
(getgroups): Likewise.
* sysdeps/unix/sysv/linux/m68k/syscalls.list (getegid): Likewise.
(geteuid): Likewise.
(getgid): Likewise.
(getuid): Likewise.
(getresgid): Likewise.
(getresuid): Likewise.
(getgroups): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list (getegid):
Likewise.
(geteuid): Likewise.
(getgid): Likewise.
(getuid): Likewise.
(getresgid): Likewise.
(getresuid): Likewise.
(getgroups): Likewise.
* sysdeps/unix/sysv/linux/sh/syscalls.list (getegid): Likewise.
(geteuid): Likewise.
(getgid): Likewise.
(getuid): Likewise.
(getresgid): Likewise.
(getresuid): Likewise.
(getgroups): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list (getegid):
Likewise.
(geteuid): Likewise.
(getgid): Likewise.
(getuid): Likewise.
(getgroups): Likewise.

9 years agoMove some chown / lchown / fchown definitions to syscalls.list (bug 14138).
Joseph Myers [Fri, 24 Oct 2014 12:57:59 +0000 (12:57 +0000)]
Move some chown / lchown / fchown definitions to syscalls.list (bug 14138).

Continuing the move of syscall definitions to syscalls.list, where the
removal of support for old kernel versions has made this possible,
this patch moves various definitions of chown, lchown and fchown.

In most cases the need for special syscalls.list entries (rather than
existing generic ones) is because these architectures use chown32,
lchown32 and fchown32 as syscall names.  Some architectures also have
symbol versioning compatibility for older versions of chown having
been equivalent to lchown.

The aliases specified for s390-32 had the effect of exporting
__chown@@GLIBC_2.1 (but not __chown@GLIBC_2.0) despite it not being
listed in Versions files.  (I'm not sure why versioned_symbol but not
compat_symbol were effective like that to create such __chown exports
in the absence of Versions entries.)  The natural way to preserve that
versioned export of __chown seems to be to add it in a Versions file,
so I did so.  (Maybe actually it should be a compat symbol,
__chown@GLIBC_2.1, unless there's a good reason for that export, but
this patch doesn't change anything there.)

Tested for x86.

[BZ #14138]
* sysdeps/unix/sysv/linux/i386/chown.c: Remove file.
* sysdeps/unix/sysv/linux/i386/fchown.c: Likewise.
* sysdeps/unix/sysv/linux/i386/lchown.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/chown.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/fchown.c: Remove file.
* sysdeps/unix/sysv/linux/s390/s390-32/lchown.c: Likewise.
* sysdeps/unix/sysv/linux/sh/chown.c: Likewise.
* sysdeps/unix/sysv/linux/sh/fchown.c: Likewise.
* sysdeps/unix/sysv/linux/sh/lchown.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/chown.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/fchown.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/lchown.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/Versions (GLIBC_2.1): Add
__chown.
* sysdeps/unix/sysv/linux/i386/syscalls.list (chown): Add syscall.
(lchown): Likewise.
(fchown): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list (chown):
Likewise.
(lchown): Likewise.
(fchown): Likewise.
* sysdeps/unix/sysv/linux/sh/syscalls.list (chown): Likewise.
(lchown): Likewise.
(fchown): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list (chown):
Likewise.
(lchown): Likewise.
(fchown): Likewise.

9 years agoRemove spaces.
Wilco Dijkstra [Fri, 24 Oct 2014 12:53:19 +0000 (12:53 +0000)]
Remove spaces.

9 years agohppa: Make __SIGRTMIN 32 (ABI break).
Carlos O'Donell [Fri, 24 Oct 2014 03:14:12 +0000 (23:14 -0400)]
hppa: Make __SIGRTMIN 32 (ABI break).

In the Linux kernel version 3.17 the signal numbers were rearranged in
order to make hppa like every other arch. Previously we started
__SIGRTMIN at 37, and that meant several pieces of important software,
including systemd, would fail to build. To support systemd we removed
SIGEMT and SIGLOST, and rearranged the others according to expected
values. This is technically an ABI incompatible change, but because
zero applications use SIGSTKFLT, SIGXCPU, SIGXFSZ and SIGSYS nothing
broke.  Nothing uses SIGEMT and SIGLOST, and they were present for
HPUX compatibility which is no longer supported. Thus because nothing
breaks we don't do any compatibility work here.

Upstream kernel commit is 1f25df2eff5b25f52c139d3ff31bc883eee9a0ab.

Signed-off-by: Carlos O'Donell <carlos@systemhalted.org>
Signed-off-by: Helge Deller <deller@gmx.de>
2014-10-23  Carlos O'Donell  <carlos@systemhalted.org>
    Helge Deller <deller@gmx.de>

[BZ #17508]
* sysdeps/unix/sysv/linux/hppa/bits/signum.h: Remove SIGEMT.
Define SIGSTKFLT as 7. Define SIGSYS as 31. Define SIGXCPU as 12.
Remove SIGLOST. Define SIGXFSZ as 30. Define __SIGRTMIN as 32.

9 years agoDon't use INTDEF for powerpc32 compat symbols (bug 14132).
Joseph Myers [Thu, 23 Oct 2014 21:43:41 +0000 (21:43 +0000)]
Don't use INTDEF for powerpc32 compat symbols (bug 14132).

Continuing the removal of the obsolete INTDEF / INTUSE mechanism, this
patch removes the use of INTUSE to rename symbols in
sysdeps/powerpc/powerpc32/libgcc-compat.S.  As the names in question
are purely internal to this particular object and not used anywhere
else, it doesn't matter at all whether __*_v_glibc20 or __*_internal
is used, so this patch just removes the macros in question.

Tested for powerpc32 that stripped installed shared libraries are
unchanged by this patch.

[BZ #14132]
* sysdeps/powerpc/powerpc32/libgcc-compat.S (__ashldi3_v_glibc20):
Remove macro definition.
(__ashrdi3_v_glibc20): Likewise.
(__lshrdi3_v_glibc20): Likewise.
(__cmpdi2_v_glibc20): Likewise.
(__ucmpdi2_v_glibc20): Likewise.
[!_SOFT_FLOAT && !__NO_FPRS__] (__fixdfdi_v_glibc20): Likewise.
[!_SOFT_FLOAT && !__NO_FPRS__] (__fixsfdi_v_glibc20): Likewise.
[!_SOFT_FLOAT && !__NO_FPRS__] (__fixunsdfdi_v_glibc20): Likewise.
[!_SOFT_FLOAT && !__NO_FPRS__] (__fixunssfdi_v_glibc20): Likewise.
[!_SOFT_FLOAT && !__NO_FPRS__] (__floatdidf_v_glibc20): Likewise.
[!_SOFT_FLOAT && !__NO_FPRS__] (__floatdisf_v_glibc20): Likewise.

9 years agoRework some nscd code not to use variable-length struct types.
Roland McGrath [Wed, 22 Oct 2014 20:17:20 +0000 (13:17 -0700)]
Rework some nscd code not to use variable-length struct types.

9 years agoARM: Use movw/movt more when available
Roland McGrath [Wed, 22 Oct 2014 21:20:35 +0000 (14:20 -0700)]
ARM: Use movw/movt more when available

9 years agoMIPS: Avoid a dangling `vfork@GLIBC_2.0' reference
Maciej W. Rozycki [Wed, 22 Oct 2014 14:20:37 +0000 (15:20 +0100)]
MIPS: Avoid a dangling `vfork@GLIBC_2.0' reference

This satisfies a symbol reference created with:

.symver __libc_vfork, vfork@GLIBC_2.0

where `__libc_vfork' has not been defined or referenced.  In this case
the `vfork@GLIBC_2.0' reference is supposed to be discarded, however a
bug present in GAS since forever causes an undefined symbol table entry
to be created.  This in turn triggers a problem in the linker that can
manifest itself by link errors such as:

ld: libpthread.so: invalid string offset 2765592330 >= 5154 for section `.dynstr'

The GAS and linker bugs need to be resolved, but we can avoid them too
by providing a `__libc_vfork' definition just like our other platforms.

[BZ #17485]
* sysdeps/unix/sysv/linux/mips/vfork.S (__libc_vfork): Define.

9 years agoDon't use INTDEF with __ldexpf (bug 14132).
Joseph Myers [Tue, 21 Oct 2014 23:11:49 +0000 (23:11 +0000)]
Don't use INTDEF with __ldexpf (bug 14132).

Continuing the removal of the obsolete INTDEF / INTUSE mechanism, this
patch removes the use of INTDEF for __ldexpf.  As far as I can tell,
the resulting alias is completely unused.

Tested for x86_64 that stripped installed shared libraries are
unchanged by this patch.

[BZ #14132]
* math/s_ldexpf.c (__ldexpf): Do not use INTDEF.

9 years agoAvoid local PLT reference in __nptl_main.
Roland McGrath [Tue, 21 Oct 2014 17:18:17 +0000 (10:18 -0700)]
Avoid local PLT reference in __nptl_main.

9 years agoTiny refactoring in fts to eliminate a warning.
Roland McGrath [Mon, 20 Oct 2014 22:32:26 +0000 (15:32 -0700)]
Tiny refactoring in fts to eliminate a warning.

9 years agoNPTL: Clean up gratuitous Linuxism in libpthread.so entry point.
Roland McGrath [Mon, 20 Oct 2014 21:54:12 +0000 (14:54 -0700)]
NPTL: Clean up gratuitous Linuxism in libpthread.so entry point.

9 years agoNPTL: Add some missing #include's
Roland McGrath [Mon, 20 Oct 2014 21:46:00 +0000 (14:46 -0700)]
NPTL: Add some missing #include's

9 years agoMake internal lock-init macros return void.
Roland McGrath [Mon, 20 Oct 2014 21:13:14 +0000 (14:13 -0700)]
Make internal lock-init macros return void.

9 years agopthread_once: Add fast path and remove x86 variants.
Torvald Riegel [Sun, 19 Oct 2014 19:59:26 +0000 (21:59 +0200)]
pthread_once: Add fast path and remove x86 variants.

9 years agopthread_once: Clean up constants.
Torvald Riegel [Fri, 11 Oct 2013 15:58:04 +0000 (18:58 +0300)]
pthread_once: Clean up constants.

[BZ #15215] This just gives a name to the integer constants being used.

9 years agoMove readv and writev definitions to syscalls.list (bug 14138).
Joseph Myers [Mon, 20 Oct 2014 15:49:08 +0000 (15:49 +0000)]
Move readv and writev definitions to syscalls.list (bug 14138).

Continuing the move of syscall definitions to syscalls.list, where the
removal of support for old kernel versions has made this possible,
this patch moves definitions of readv and writev.

The relevant syscalls.list entries were already in
sysdeps/unix/syscalls.list, but to match the C files they needed to
have the names __libc_readv and __libc_writev added.  In fact, I don't
see anything making use of those names - as far as I can tell, these
functions could just be defined as __readv and __writev with aliases
readv and writev.  But cleaning up unnecessary aliases for functions
should be a separate matter from cleaning up unnecessary C syscall
wrappers.

Tested for x86_64.

[BZ #14138]
* sysdeps/unix/syscalls.list (readv): Use __libc_readv as strong
name.
(writev): Use __libc_writev as strong name.
* sysdeps/unix/sysv/linux/readv.c: Remove file.
* sysdeps/unix/sysv/linux/writev.c: Likewise.

9 years agoRemove obsolete TLS_DEFINE_INIT_TP fallback.
Roland McGrath [Fri, 17 Oct 2014 22:40:36 +0000 (15:40 -0700)]
Remove obsolete TLS_DEFINE_INIT_TP fallback.

9 years agoNPTL: Clean up THREAD_SYSINFO macros.
Roland McGrath [Fri, 17 Oct 2014 22:03:00 +0000 (15:03 -0700)]
NPTL: Clean up THREAD_SYSINFO macros.

9 years agoNPTL: Conditionalize direct futex syscall uses.
Roland McGrath [Fri, 17 Oct 2014 21:30:16 +0000 (14:30 -0700)]
NPTL: Conditionalize direct futex syscall uses.

9 years agoNPTL: Conditionalize more uses of SIGCANCEL and SIGSETXID.
Roland McGrath [Fri, 17 Oct 2014 20:40:46 +0000 (13:40 -0700)]
NPTL: Conditionalize more uses of SIGCANCEL and SIGSETXID.

9 years agoFix NPTL build error when missing __NR_set_robust_list.
Roland McGrath [Fri, 17 Oct 2014 18:30:15 +0000 (11:30 -0700)]
Fix NPTL build error when missing __NR_set_robust_list.

9 years agoFix up incorrect formatting in last commit
Siddhesh Poyarekar [Fri, 17 Oct 2014 10:22:46 +0000 (15:52 +0530)]
Fix up incorrect formatting in last commit

9 years agostrcoll: improve performance by removing the cache (#15884)
Leonhard Holz [Fri, 17 Oct 2014 10:17:23 +0000 (15:47 +0530)]
strcoll: improve performance by removing the cache (#15884)

this is a path that should solve bug 15884. It complains about the performance
of strcoll(). It was found out that the runtime of strcoll() is actually bound
to strlen which is needed for calculating the size of a cache that was
installed to improve the comparison performance.

The idea for this patch was that the cache is only useful in rare cases
(strings of same length and same first-level-chars) and that it would be
better to avoid memory allocation at all. To prove this I wrote a performance
test bench-strcoll.c with test data in benchtests-strcoll.tar.gz. Also
modifications in benchtests/Makefile and localedata/Makefile are necessary to
make it work.

After removing the cache the strcoll method showed the predicted behavior
(getting slightly faster) in all but the test case for hindi word sorting.
This was due the hindi text having much more equal words than the other ones.
For equal strings the performance was worse since all comparison levels were
run through and from the second level on the cache improved the comparison
performance of the original version.

Therefore I added a bytewise test via strcmp iff the first level comparison
found that both strings did match because in this case it is very likely that
equal strings are compared. This solved the problem with the hindi test case
and improved the performance of the others.

Performance comparison:

glibc files     -33.77%
vi_VN.UTF-8     -34.12%
en_US.UTF-8     -42.42%
ar_SA.UTF-8     -27.49%
zh_CN.UTF-8     +07.90%
cs_CZ.UTF-8     -29.67%
en_GB.UTF-8     -28.50%
da_DK.UTF-8     -36.57%
pl_PL.UTF-8     -39.31%
fr_FR.UTF-8     -28.57%
pt_PT.UTF-8     -22.82%
el_GR.UTF-8     -26.77%
ru_RU.UTF-8     -35.81%
iw_IL.UTF-8     -35.34%
es_ES.UTF-8     -34.46%
hi_IN.UTF-8     -00.38%
sv_SE.UTF-8     -36.99%
hu_HU.UTF-8     -16.35%
tr_TR.UTF-8     -27.80%
is_IS.UTF-8     -33.24%
it_IT.UTF-8     -24.39%
sr_RS.UTF-8     -37.55%
ja_JP.UTF-8     +02.84%

9 years agoRemove sysdeps/arm/soft-fp directory.
Roland McGrath [Thu, 16 Oct 2014 16:54:45 +0000 (09:54 -0700)]
Remove sysdeps/arm/soft-fp directory.

9 years agoconformtest: clean up POSIX expections for sys/utsname.h, sys/wait.h.
Joseph Myers [Tue, 14 Oct 2014 17:00:11 +0000 (17:00 +0000)]
conformtest: clean up POSIX expections for sys/utsname.h, sys/wait.h.

Continuing the series of patches to clean up conformtest expectations
for "POSIX" (1995/6) based on review of the expectations against the
standard, this patch cleans up expectations for sys/utsname.h and
sys/wait.h.  Tested x86_64; a new XFAIL for sys/wait.h is added.

* conform/data/sys/utsname.h-data (*_t): Allow.
* conform/data/sys/wait.h-data [POSIX] (uid_t): Do not define.
[POSIX] (WEXITED): Do not expect constant.
[POSIX] (WSTOPPED): Likewise.
[POSIX] (WNOHANG): Likewise.
[POSIX] (WNOWAIT): Likewise.
[POSIX] (siginfo_t): Do not expect type or elements.
[POSIX] (pid_t): Do not expect type.
[POSIX] (signal.h): Do not allow header.
[POSIX] (sys/resource.h): Likewise.
[POSIX] (si_*): Do not allow pattern.
[POSIX] (W*): Likewise.
[POSIX] (P_*): Likewise.
[POSIX] (BUS_*): Likewise.
[POSIX] (CLD_*): Likewise.
[POSIX] (FPE_*): Likewise.
[POSIX] (ILL_*): Likewise.
[POSIX] (POLL_*): Likewise.
[POSIX] (SEGV_*): Likewise.
[POSIX] (SI_*): Likewise.
[POSIX] (TRAP_*): Likewise.
* conform/Makefile (test-xfail-POSIX/sys/wait.h/conform): New
variable.

9 years agoFix infinite loop in check_pf (BZ #12926)
Siddhesh Poyarekar [Tue, 14 Oct 2014 15:35:33 +0000 (21:05 +0530)]
Fix infinite loop in check_pf (BZ #12926)

The recvmsg could return 0 under some conditions and cause the
make_request function to be stuck in an infinite loop.

Thank you Jim King <jim.king@simplivity.com> for posting Paul's patch
on the list.

9 years agoRemove CANCEL-FCT-WAIVE and CANCEL-FILE-WAIVE.
Joseph Myers [Fri, 10 Oct 2014 17:05:58 +0000 (17:05 +0000)]
Remove CANCEL-FCT-WAIVE and CANCEL-FILE-WAIVE.

As far as I can tell, CANCEL-FCT-WAIVE and CANCEL-FILE-WAIVE are old
notes from the addition of cancellation support to glibc and are not
currently used by any glibc testcases or otherwise in the build
process, and it does not seem useful to me to keep them around.  This
patch removes them.

Tested for x86_64.

* CANCEL-FCT-WAIVE: Remove file.
* CANCEL-FILE-WAIVE: Likewise.

9 years agoDon't use INTVARDEF/INTUSE with __libc_enable_secure (bug 14132).
Joseph Myers [Fri, 10 Oct 2014 11:13:11 +0000 (11:13 +0000)]
Don't use INTVARDEF/INTUSE with __libc_enable_secure (bug 14132).

Continuing the removal of the obsolete INTDEF / INTVARDEF / INTUSE
mechanism, this patch replaces its use for __libc_enable_secure with
the use of rtld_hidden_data_def and rtld_hidden_proto.

Tested for x86_64 that installed stripped shared libraries are
unchanged by the patch.

[BZ #14132]
* elf/dl-sysdep.c (__libc_enable_secure): Use rtld_hidden_data_def
instead of INTVARDEF.
(_dl_sysdep_start): Do not use INTUSE with __libc_enable_secure.
* sysdeps/mach/hurd/dl-sysdep.c (__libc_enable_secure): Use
rtld_hidden_data_def instead of INTVARDEF.
(_dl_sysdep_start): Do not use INTUSE with __libc_enable_secure.
* elf/dl-deps.c (expand_dst): Likewise.
* elf/dl-load.c (_dl_dst_count): Likewise.
(_dl_dst_substitute): Likewise.
(decompose_rpath): Likewise.
(_dl_init_paths): Likewise.
(open_path): Likewise.
(_dl_map_object): Likewise.
* elf/rtld.c (dl_main): Likewise.
(process_dl_audit): Likewise.
(process_envvars): Likewise.
* include/unistd.h [IS_IN_rtld] (__libc_enable_secure_internal):
Remove declaration.
(__libc_enable_secure): Use rtld_hidden_proto.

9 years agoremove nested functions from elf/dl-load.c
Kostya Serebryany [Thu, 9 Oct 2014 18:15:24 +0000 (11:15 -0700)]
remove nested functions from elf/dl-load.c

9 years agosoft-fp: Use parentheses around macro arguments.
Joseph Myers [Thu, 9 Oct 2014 17:05:26 +0000 (17:05 +0000)]
soft-fp: Use parentheses around macro arguments.

This patch cleans up the soft-fp code to use parentheses around macro
arguments (where possible; many macro arguments are identifiers used
with ## rather than arbitrary expressions, so cannot be put in
parentheses).  (I'm not aware of any bugs caused by the lack of
parentheses, but this is generally good practice.  The patch is not
exhaustive regarding internal macros where the arguments always come
directly from the mantissa of a floating-point number, although
probably those should be cleaned up in this regard as well.)

Tested for powerpc-nofpu that the installed shared libraries are
unchanged by this patch.

* soft-fp/double.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_D): Use
parentheses around macro arguments.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_DP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_DP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_DP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_DP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_DP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_DP): Likewise.
[_FP_W_TYPE_SIZE < 64] (_FP_SQRT_MEAT_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_CMP_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_CMP_EQ_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_CMP_UNORD_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_TO_INT_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_FROM_INT_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_DP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_DP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_DP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_DP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_DP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_DP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (_FP_SQRT_MEAT_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_CMP_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_CMP_EQ_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_CMP_UNORD_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_FROM_INT_D): Likewise.
* soft-fp/extended.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_E):
Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_EP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_E): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_EP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_E): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_EP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_E): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_EP): Likewise.
[_FP_W_TYPE_SIZE < 64] (_FP_SQRT_MEAT_E): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_CMP_E): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_CMP_EQ_E): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_CMP_UNORD_E): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_TO_INT_E): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_FROM_INT_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_EP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_EP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_EP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_EP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (_FP_SQRT_MEAT_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_CMP_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_CMP_EQ_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_CMP_UNORD_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_FROM_INT_E): Likewise.
* soft-fp/op-1.h (_FP_FRAC_SRST_1): Likewise.
(_FP_FRAC_SRS_1): Likewise.
(_FP_FRAC_CLZ_1): Likewise.
(_FP_MUL_MEAT_1_imm): Likewise.
(_FP_MUL_MEAT_1_wide): Likewise.
(_FP_MUL_MEAT_1_hard): Likewise.
(_FP_SQRT_MEAT_1): Likewise.
(_FP_FRAC_ASSEMBLE_1): Likewise.
(_FP_FRAC_DISASSEMBLE_1): Likewise.
* soft-fp/op-2.h (_FP_FRAC_CLZ_2): Likewise.
(__FP_CLZ_2): Likewise.
(_FP_MUL_MEAT_2_wide): Likewise.
(_FP_MUL_MEAT_2_wide_3mul): Likewise.
(_FP_MUL_MEAT_2_gmp): Likewise.
(_FP_MUL_MEAT_2_120_240_double): Likewise.
(_FP_SQRT_MEAT_2): Likewise.
(_FP_FRAC_ASSEMBLE_2): Likewise.
(_FP_FRAC_DISASSEMBLE_2): Likewise.
* soft-fp/op-4.h (_FP_FRAC_SRS_4): Likewise.
(_FP_FRAC_CLZ_4): Likewise.
(_FP_MUL_MEAT_4_wide): Likewise.
(_FP_MUL_MEAT_4_gmp): Likewise.
(_FP_SQRT_MEAT_4): Likewise.
(_FP_FRAC_ASSEMBLE_4): Likewise.
(_FP_FRAC_DISASSEMBLE_4): Likewise.
* soft-fp/op-common.h (_FP_CMP): Likewise.
(_FP_CMP_EQ): Likewise.
(_FP_CMP_UNORD): Likewise.
(_FP_TO_INT): Likewise.
(_FP_FROM_INT): Likewise.
[!__FP_CLZ] (__FP_CLZ): Likewise.
(_FP_DIV_HELP_imm): Likewise.
* soft-fp/quad.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_Q):
Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_QP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_QP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_QP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_QP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_QP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_QP): Likewise.
[_FP_W_TYPE_SIZE < 64] (_FP_SQRT_MEAT_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_CMP_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_CMP_EQ_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_CMP_UNORD_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_TO_INT_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_FROM_INT_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_QP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_QP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_QP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_QP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_QP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_QP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (_FP_SQRT_MEAT_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_CMP_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_CMP_EQ_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_CMP_UNORD_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_FROM_INT_Q): Likewise.
* soft-fp/single.h (FP_UNPACK_RAW_S): Likewise.
(FP_UNPACK_RAW_SP): Likewise.
(FP_PACK_RAW_S): Likewise.
(FP_PACK_RAW_SP): Likewise.
(FP_UNPACK_S): Likewise.
(FP_UNPACK_SP): Likewise.
(FP_UNPACK_SEMIRAW_S): Likewise.
(FP_UNPACK_SEMIRAW_SP): Likewise.
(FP_PACK_S): Likewise.
(FP_PACK_SP): Likewise.
(FP_PACK_SEMIRAW_S): Likewise.
(FP_PACK_SEMIRAW_SP): Likewise.
(_FP_SQRT_MEAT_S): Likewise.
(FP_CMP_S): Likewise.
(FP_CMP_EQ_S): Likewise.
(FP_CMP_UNORD_S): Likewise.
(FP_TO_INT_S): Likewise.
(FP_FROM_INT_S): Likewise.

9 years agosoft-fp: Support rsigned == 2 in _FP_TO_INT.
Joseph Myers [Thu, 9 Oct 2014 15:00:37 +0000 (15:00 +0000)]
soft-fp: Support rsigned == 2 in _FP_TO_INT.

Continuing the addition of soft-fp features in the Linux kernel
version, this patch adds _FP_TO_INT support for rsigned == 2 (reduce
overflowing results modulo 2^rsize to fit in the destination, used for
alpha emulation).

The kernel version is buggy; it can left shift by a negative amount
when right shifting is required in an overflow case (the kernel
version also has other bugs fixed long ago in glibc; at least,
spurious exceptions converting to the most negative integer).  This
version avoids that by handling overflow (other than to 0) for rsigned
== 2 along with the normal non-overflow case, which already properly
determines the direction in which to shift.

Tested for powerpc-nofpu.  Some functions get slightly bigger and some
get slightly smaller, no doubt as a result of the change to where in
the macro "inexact" is raised, but I don't think those changes are
significant.  Also tested for powerpc-nofpu with the relevant __fix*
functions changed to use rsigned == 2 (which is after all just as
valid as rsigned == 1 in IEEE terms), including verifying the results
and exceptions for various cases of conversions.

With these seven patches, the one remaining feature to add for the
soft-fp code to have all the features of the kernel version is
_FP_TO_INT_ROUND.

* soft-fp/op-common.h (_FP_TO_INT): Handle rsigned == 2.

9 years agosoft-fp: Support more precise "invalid" exceptions.
Joseph Myers [Thu, 9 Oct 2014 14:59:23 +0000 (14:59 +0000)]
soft-fp: Support more precise "invalid" exceptions.

As previously discussed
<https://sourceware.org/ml/libc-alpha/2013-10/msg00345.html>, it would
be desirable to be able to use the same version of the soft-fp code in
the Linux kernel as well as in glibc and libgcc (instead of an old
version in the kernel that's missing ten years of bug fixes,
performance improvements and new features), and to that end it is
useful to add to glibc's copy features in the kernel's copy, even when
they are not directly useful in glibc.

To that end, this patch adds one of those features: support for more
precise "invalid" exceptions describing the particular kind of invalid
operation.  These are relevant for powerpc emulation, and are also as
described in IEEE 754-2008 as sub-exceptions.

The set of sub-exceptions here is the union of those supported on
powerpc and those from IEEE 754-2008 (the former adds a distinction
between 0/0 and Inf/Inf; the latter adds a distinction between Inf*0
from multiplication and the same from fma).  This includes
sub-exceptions for sqrt, conversions to integer and comparisons that
are not supported in the kernel; I see no obvious reason for these
being missing from the kernel support, given that they are supported
on powerpc so accurate powerpc emulation should generate them.

Tested for powerpc-nofpu that the disassembly of installed shared
libraries is unchanged by this patch.

* soft-fp/soft-fp.h (FP_EX_INVALID_SNAN): New macro.
(FP_EX_INVALID_IMZ): Likewise.
(FP_EX_INVALID_IMZ_FMA): Likewise.
(FP_EX_INVALID_ISI): Likewise.
(FP_EX_INVALID_ZDZ): Likewise.
(FP_EX_INVALID_IDI): Likewise.
(FP_EX_INVALID_SQRT): Likewise.
(FP_EX_INVALID_CVI): Likewise.
(FP_EX_INVALID_VC): Likewise.
* soft-fp/op-common.h (_FP_UNPACK_CANONICAL): Specify more precise
"invalid" exceptions.
(_FP_CHECK_SIGNAN_SEMIRAW): Likewise.
(_FP_ADD_INTERNAL): Likewise.
(_FP_MUL): Likewise.
(_FP_FMA): Likewise.
(_FP_DIV): Likewise.
(_FP_CMP_CHECK_NAN): Likewise.
(_FP_SQRT): Likewise.
(_FP_TO_INT): Likewise.
(FP_EXTEND): Likewise.

9 years agoUpdate French translation
Allan McRae [Thu, 9 Oct 2014 12:11:30 +0000 (22:11 +1000)]
Update French translation

9 years agoDon't use INTDEF/INTUSE with __cxa_atexit (bug 14132).
Joseph Myers [Thu, 9 Oct 2014 11:22:33 +0000 (11:22 +0000)]
Don't use INTDEF/INTUSE with __cxa_atexit (bug 14132).

This patch removes use of the obsolete INTDEF/INTUSE mechanism for
__cxa_atexit, replacing it with libc_hidden_def/libc_hidden_proto.

Tested for x86_64 that installed stripped shared libraries are
unchanged by the patch.

[BZ #14132]
* stdlib/cxa_atexit.c (__cxa_atexit): Use libc_hidden_def instead
of INTDEF.
* include/stdlib.h (__cxa_atexit_internal): Remove declaration.
(__cxa_atexit): Use libc_hidden_proto.
[!NOT_IN_libc] (__cxa_atexit): Remove macro definition.

9 years agoRemove stray *_internal aliases (bug 14132).
Joseph Myers [Thu, 9 Oct 2014 01:11:14 +0000 (01:11 +0000)]
Remove stray *_internal aliases (bug 14132).

This patch removes some stray (unused) *_internal aliases, and
function prototypes with no corresponding definitions at all, at least
some of which were missed in previous INTDEF / INTUSE removal.

Not removed in this patch: __canonicalize_directory_name_internal,
noticed in the course of preparing this patch, isn't an alias, but an
actual function in sysdeps/mach/hurd/getcwd.c - apparently unused,
however.

Tested for x86_64 that installed stripped shared libraries are
unchanged by this patch.

[BZ #14132]
* include/wctype.h [!_ISOMAC] (__iswalpha_l_internal): Remove
declaration.
[!_ISOMAC] (__iswdigit_l_internal): Likewise.
[!_ISOMAC] (__iswspace_l_internal): Likewise.
[!_ISOMAC] (__iswxdigit_l_internal): Likewise.
[!_ISOMAC] (__iswctype_internal): Likewise.
* stdio-common/siglist.c (_sys_siglist_internal): Remove alias.
* sysdeps/unix/syscalls.list (chown): Remove __chown_internal
alias.
(fcntl): Remove __fcntl_internal alias.
* sysdeps/unix/sysv/linux/hppa/syscalls.list (connect): Remove
__connect_internal alias.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (connect):
Likewise.

9 years agosoft-fp: Add FP_DENORM_ZERO.
Joseph Myers [Thu, 9 Oct 2014 01:09:22 +0000 (01:09 +0000)]
soft-fp: Add FP_DENORM_ZERO.

Continuing the addition of soft-fp features used in the Linux kernel,
this patch adds soft-fp support for FP_DENORM_ZERO (flushing input
subnormal operands to zero of the same sign).

There are some differences from the kernel version.  In the kernel,
the "inexact" exception is set when flushing to zero.  This does not
appear to match the documented semantics for either of the
architectures (alpha and sh) for which the kernel uses FP_DENORM_ZERO,
so this patch does not set "inexact" in this case.  More operations
now use raw or semi-raw unpacking for optimization than did in the
ten-year-old soft-fp version in the kernel, so checks of
FP_DENORM_ZERO are inserted in those operations.  They are also
inserted for comparisons (which already used raw unpacking in the old
version) as I believe that's the correct thing to do when input
subnormals are flushed to zero.  They are *not* inserted for _FP_NEG.
(If any processors do flush input subnormals to zero for negation, or
otherwise vary from the rules implemented when FP_DENORM_ZERO is set,
further macros for sfp-machine.h to control this may need to be
added.)

Although the addition for comparisons will cause FP_EX_DENORM to be
set in this case, it still won't be set for comparisons involving
subnormals when not flushed to zero.  It's quite possible that
accurate emulation of processors that have such an exception for
subnormal operands will require further changes relating to when
FP_EX_DENORM is set (in general, the support for things defined by
IEEE should be considered more reliable and mature than the support
for things outside the scope of IEEE floating point).

Although some processors also have a mode for abrupt underflow -
producing zeroes instead of output subnormals - there is no such mode
in the kernel's soft-fp, so no such mode is added to glibc's soft-fp
(although it could be if someone wanted to emulate such processor
support).

Tested for powerpc-nofpu that the disassembly of installed shared
libraries is unchanged by this patch.

* soft-fp/soft-fp.h (FP_DENORM_ZERO): New macro.
* soft-fp/op-common.h (_FP_UNPACK_CANONICAL): Check
FP_DENORM_ZERO.
(_FP_CHECK_FLUSH_ZERO): New macro.
(_FP_ADD_INTERNAL): Call _FP_CHECK_FLUSH_ZERO.
(_FP_CMP): Likewise.
(_FP_CMP_EQ): Likewise.
(_FP_TO_INT): Do not set inexact for subnormal arguments if
FP_DENORM_ZERO.
(FP_EXTEND): Call _FP_CHECK_FLUSH_ZERO.
(FP_TRUNC): Likewise.

9 years agosoft-fp: Fix _FP_TO_INT latent bug in overflow handling.
Joseph Myers [Thu, 9 Oct 2014 01:07:10 +0000 (01:07 +0000)]
soft-fp: Fix _FP_TO_INT latent bug in overflow handling.

This patch fixes a latent bug in _FP_TO_INT regarding handling of
arguments with maximum exponent (infinities and NaNs).  If the maximum
exponent is below that calculated as an overflow threshold, such
values would incorrectly be treated as normal values for the purposes
of the conversion.  This could not occur for any of the conversions
actually occurring in glibc, libgcc or the Linux kernel (the maximum
exponent for float is, just, big enough to ensure overflow for
unsigned __int128), but would apply if soft-fp were used for IEEE
binary16.  Appropriate checks are inserted to ensure that the maximum
exponent is always treated as an overflowing exponent, and never as a
normal one.

Tested for powerpc-nofpu that the disassembly of installed shared
libraries is unchanged by this patch.

* soft-fp/op-common.h (_FP_TO_INT): Ensure maximum exponent is
treated as invalid conversion, not as normal exponent.

9 years agosoft-fp: Refactor exception handling for comparisons.
Joseph Myers [Thu, 9 Oct 2014 01:03:56 +0000 (01:03 +0000)]
soft-fp: Refactor exception handling for comparisons.

This patch refactors how soft-fp comparisons handle setting exceptions
for NaN operands, so that exceptions are set through the FP_CMP macros
rather than directly in the C files calling them.

The _FP_CMP* and FP_CMP* macros gain an extra argument to specify when
exceptions should be set, 0 for no exception setting (I'm not sure
this is actually needed - at least it's not needed for IEEE operations
in glibc / libgcc, but might be relevant in some cases for kernel
use), 1 for exceptions only for signaling NaNs and 2 for exceptions
for all NaNs.  This argument is handled through _FP_CMP_CHECK_NAN,
newly called by the _FP_CMP* macros when a NaN is encountered.  Calls
to these macros are updated, which eliminates all the existing
checking and exception setting in soft-fp *.c files in glibc.

Tested for powerpc-nofpu.  (The __unord* functions have no code
changes; the __eq* / __ge* / __le* functions get slightly larger, but
I don't think that's significant.)

* soft-fp/op-common.h (_FP_CMP_CHECK_NAN): New macro.
(_FP_CMP): Add extra argument EX.  Call _FP_CMP_CHECK_NAN.
(_FP_CMP_EQ): Likewise.
(_FP_CMP_UNORD): Likewise.
* soft-fp/double.h (FP_CMP_D): Add extra argument EX.
(FP_CMP_EQ_D): Likewise.
(FP_CMP_UNORD_D): Likewise.
* soft-fp/extended.h (FP_CMP_E): Likewise.
(FP_CMP_EQ_E): Likewise.
(FP_CMP_UNORD_E): Likewise.
* soft-fp/quad.h (FP_CMP_Q): Likewise.
(FP_CMP_EQ_Q): Likewise.
(FP_CMP_UNORD_Q): Likewise.
* soft-fp/single.h (FP_CMP_S): Likewise.
(FP_CMP_EQ_S): Likewise.
(FP_CMP_UNORD_S): Likewise.
* soft-fp/eqdf2.c (__eqdf2): Update call to FP_CMP_EQ_D.
* soft-fp/eqsf2.c (__eqsf2): Update call to FP_CMP_EQ_S.
* soft-fp/eqtf2.c (__eqtf2): Update call to FP_CMP_EQ_Q.
* soft-fp/gedf2.c (__gedf2): Update call to FP_CMP_D.
* soft-fp/gesf2.c (__gesf2): Update call to FP_CMP_S.
* soft-fp/getf2.c (__getf2): Update call to FP_CMP_Q.
* soft-fp/ledf2.c (__ledf2): Update call to FP_CMP_D.
* soft-fp/lesf2.c (__lesf2): Update call to FP_CMP_S.
* soft-fp/letf2.c (__letf2): Update call to FP_CMP_Q.
* soft-fp/unorddf2.c (__unorddf2): Update call to FP_CMP_UNORD_D.
* soft-fp/unordsf2.c (__unordsf2): Update call to FP_CMP_UNORD_S.
* soft-fp/unordtf2.c (__unordtf2): Update call to FP_CMP_UNORD_Q.
* sysdeps/alpha/soft-fp/ots_cmpe.c (internal_compare): Update call
to FP_CMP_Q.
* sysdeps/sparc/sparc32/soft-fp/q_cmp.c (_Q_cmp): Update call to
FP_CMP_Q.
* sysdeps/sparc/sparc32/soft-fp/q_cmpe.c (_Q_cmpe): Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_feq.c (_Q_feq): Update call to
FP_CMP_EQ_Q.
* sysdeps/sparc/sparc32/soft-fp/q_fge.c (_Q_fge): Update call to
FP_CMP_Q.
* sysdeps/sparc/sparc32/soft-fp/q_fgt.c (_Q_fgt): Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_fle.c (_Q_fle): Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_flt.c (_Q_flt): Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_fne.c (_Q_fne): Update call to
FP_CMP_EQ_Q.
* sysdeps/sparc/sparc64/soft-fp/qp_cmp.c (_Qp_cmp): Update call to
FP_CMP_Q.
* sysdeps/sparc/sparc64/soft-fp/qp_cmpe.c (_Qp_cmpe): Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_feq.c (_Qp_feq): Update call to
FP_CMP_EQ_Q.
* sysdeps/sparc/sparc64/soft-fp/qp_fge.c (_Qp_fge): Update call to
FP_CMP_Q.
* sysdeps/sparc/sparc64/soft-fp/qp_fgt.c (_Qp_fgt): Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_fle.c (_Qp_fle): Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_flt.c (_Qp_flt): Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_fne.c (_Qp_fne): Update call to
FP_CMP_EQ_Q.

9 years agosoft-fp: Make extensions of subnormals from XFmode to TFmode signal underflow if...
Joseph Myers [Thu, 9 Oct 2014 01:00:41 +0000 (01:00 +0000)]
soft-fp: Make extensions of subnormals from XFmode to TFmode signal underflow if traps enabled.

This patch fixes a soft-fp corner case I previously noted in
<https://sourceware.org/ml/libc-alpha/2013-10/msg00349.html>: when
trapping on underflow is enabled, extensions of subnormals from XFmode
to TFmode need to signal underflow because the result is tiny (but
exact, so the underflow flag is not raised unless trapping is
enabled).

To avoid any excess initialization or tests for other cases of
floating-point extensions, a new FP_INIT_TRAPPING_EXCEPTIONS is added
that does the initialization required for this particular case (more
than FP_INIT_EXCEPTIONS, less than FP_INIT_ROUNDMODE, in general), and
FP_NO_EXACT_UNDERFLOW is added to stub out FP_TRAPPING_EXCEPTIONS
tests for those cases of extensions where the test would be dead code,
to avoid any uninitialized variable warnings.

As the relevant case only applies in libgcc, not to any use of soft-fp
in glibc, there is no bug report in Bugzilla and no non-default
definitions of FP_INIT_TRAPPING_EXCEPTIONS are added by the patch.  A
testcase will be added to GCC as part of an update of soft-fp in
libgcc once this patch is in libc.

Tested for powerpc-nofpu that the disassembly of installed shared
libraries is unchanged by this patch.  Bootstrapped GCC with updated
soft-fp with no regressions on x86_64-unknown-linux-gnu and verified
that a test of the relevant case passes where it failed before.

* soft-fp/op-common.h (FP_EXTEND): When a subnormal input produces
a subnormal result, set the underflow exception if trapping on
underflow is enabled.
* soft-fp/soft-fp.h (FP_INIT_TRAPPING_EXCEPTIONS): New macro.
(FP_INIT_EXCEPTIONS): Default to FP_INIT_TRAPPING_EXCEPTIONS.
[FP_NO_EXACT_UNDERFLOW] (FP_TRAPPING_EXCEPTIONS): Undefine and
redefine to 0.
* soft-fp/extenddftf2.c (FP_NO_EXACT_UNDERFLOW): Define.
* soft-fp/extendsfdf2.c (FP_NO_EXACT_UNDERFLOW): Likewise.
* soft-fp/extendsftf2.c (FP_NO_EXACT_UNDERFLOW): Likewise.
* soft-fp/extendxftf2.c (__extendxftf2): Use
FP_INIT_TRAPPING_EXCEPTIONS instead of FP_INIT_ROUNDMODE.

9 years agosoft-fp: Remove FP_CLEAR_EXCEPTIONS.
Joseph Myers [Thu, 9 Oct 2014 00:58:42 +0000 (00:58 +0000)]
soft-fp: Remove FP_CLEAR_EXCEPTIONS.

As noted in
<https://sourceware.org/ml/libc-alpha/2013-10/msg00516.html>, the
soft-fp macro FP_CLEAR_EXCEPTIONS should not be necessary, as soft-fp
code should never set an exception and later clear it.

In fact, all four uses in glibc (for SPARC) are indeed unnecessary:
they appear in files that convert 32-bit or 64-bit integers to IEEE
binary128, an operation that can never raise any exceptions.  If this
was intended to enable the compiler to optimize away any FP_FROM_INT
code testing for exceptional cases, we now have a better way of doing
this: defining FP_NO_EXCEPTIONS before including soft-fp.h causes all
code handling exceptions to be stubbed out, and the rounding mode to
be hardwired for round-to-zero, to allow such optimizations for source
files where (a) the operation in question, for the particular types in
question, can never raise exceptions, but (b) some instances of the
operation for other types can, so the macros used in the file do
contain references to rounding or exceptions, albeit dead in that
particular file.

The uses in the Linux kernel are also unnecessary (clearing exceptions
at a point where they are already cleared).

This patch duly removes FP_CLEAR_EXCEPTIONS, making the SPARC code in
question use FP_NO_EXCEPTIONS and stop using exception-related macros.

* soft-fp/soft-fp.h (FP_CLEAR_EXCEPTIONS): Remove macro.
* sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Define FP_NO_EXCEPTIONS.
(_Q_itoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or
FP_HANDLE_EXCEPTIONS.
* sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Define FP_NO_EXCEPTIONS.
(_Q_lltoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or
FP_HANDLE_EXCEPTIONS.
* sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Define FP_NO_EXCEPTIONS.
(_Q_ulltoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or
FP_HANDLE_EXCEPTIONS.
* sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Define FP_NO_EXCEPTIONS.
(_Q_utoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or
FP_HANDLE_EXCEPTIONS.

9 years agoDon't use INTUSE with __adjtimex (bug 14132).
Joseph Myers [Wed, 8 Oct 2014 23:19:32 +0000 (23:19 +0000)]
Don't use INTUSE with __adjtimex (bug 14132).

Bug 14132 is removal of the old INTDEF/INTUSE system of *_internal
aliases as obsoleted by the hidden_proto / hidden_def system.  Various
cases were cleaned up in 2012, but some remain.  This patch removes
the use of this mechanism for __adjtimex.

Tested for x86_64 that stripped installed shared libraries are
unchanged by the patch.

[BZ #14132]
* sysdeps/unix/sysv/linux/include/sys/timex.h: New file.
* sysdeps/unix/sysv/linux/adjtime.c [!ADJTIMEX] (ADJTIMEX): Do not
use INTUSE.
[!ADJTIMEX] (INTUSE(__adjtimex)): Remove declaration.
* sysdeps/unix/sysv/linux/alpha/adjtime.c (__adjtimex_internal):
Remove alias.
(__adjtimex): Define using libc_hidden_ver.
* sysdeps/unix/sysv/linux/ntp_gettime.c (INTUSE(__adjtimex)):
Remove declaration.
(ntp_gettime): Call __adjtimex directly.
* sysdeps/unix/sysv/linux/ntp_gettimex.c (INTUSE(__adjtimex)):
Remove declaration.
(ntp_gettimex): Call __adjtimex directly.
* sysdeps/unix/sysv/linux/syscalls.list (adjtimex): Remove
__adjtimex_internal alias.

9 years agoBZ#17460: Fix buffer overrun in nscd --help.
Roland McGrath [Wed, 8 Oct 2014 22:36:12 +0000 (15:36 -0700)]
BZ#17460: Fix buffer overrun in nscd --help.

9 years agoRemove unnecessarily nested function in do_lookup_unique.
Roland McGrath [Wed, 8 Oct 2014 22:18:02 +0000 (15:18 -0700)]
Remove unnecessarily nested function in do_lookup_unique.

9 years agoSupport and use mixed compat/non-compat aliases in syscalls.list.
Joseph Myers [Mon, 6 Oct 2014 22:58:59 +0000 (22:58 +0000)]
Support and use mixed compat/non-compat aliases in syscalls.list.

This patch enables syscalls.list entries to specify both compat and
non-compat symbol versions for the same syscall definition, making use
of this for setrlimit / chown / lchown where the inability to specify
such aliases showed up in the course of work on bug 14138.

The change to make-syscalls.sh is minimal: adding a SHARED conditional
on the compat_symbol calls.  It remains the case that if a compat
symbol version is specified, the syscall is only built for the shared
library at all if an explicit symbol version is given for a non-compat
symbol (so it's necessary to specify "lchown@@GLIBC_2.0
chown@GLIBC_2.0" rather than just "lchown chown@GLIBC_2.0").  It also
remains the case, as already commented in make-syscalls.sh, that no
SHLIB_COMPAT conditionals are generated, so there would be problems if
the same syscalls.list file, with compat symbols, were used for both
configurations that should have those symbols and configurations for
which they should be conditioned out with SHLIB_COMPAT.

Tested for x86.

* sysdeps/unix/make-syscalls.sh (emit_weak_aliases): Condition
compat_symbol calls on [SHARED].
* sysdeps/unix/sysv/linux/powerpc/lchown.S: Remove file.
* sysdeps/unix/sysv/linux/i386/syscalls.list (oldsetrlimit):
Remove.
(setrlimit): Add setrlimit@GLIBC_2.0 alias.
* sysdeps/unix/sysv/linux/m68k/m680x0/syscalls.list
(oldsetrlimit): Remove.
(setrlimit): Add setrlimit@GLIBC_2.0 alias.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list
(lchown): New syscall entry.
(oldsetrlimit): Remove.
(setrlimit): Add setrlimit@GLIBC_2.0 alias.
* sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list
(oldsetrlimit): Remove.
(setrlimit): Add setrlimit@GLIBC_2.0 alias.

This page took 0.095263 seconds and 5 git commands to generate.