Compare commits

...
Author SHA1 Message Date
Guo Yixuan 05573613e0 Fixed pthread_spin_lock on sparc32/64 (bug 16882)
[BZ #16882]
	* nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S
	(pthread_spin_lock): Branch out of spin loop to proper location.
	* nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S
	(pthread_spin_lock): Likewise.

	* nptl/tst-spin4.c: New test.
	* nptl/Makefile (tests): Add tst-spin4.
2014-06-03 16:43:08 -07:00
Jose E. Marchesi 8c19f86e35 Fix sparc memcpy data corruption when using niagara2 optimized routines.
* sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S: Add missing
	membar to avoid block loads/stores to overlap previous stores.
2014-05-17 17:18:51 -04:00
Aurelien Jarno 38736fdf39 SPARC: add prlimit and prlimit64 in <bits/resource.h> (BZ #16943)
prlimit and prlimit64 have been added in the main <bits/resource.h>, but
not in the SPARC specific version. Fix that.

Note: this is Debian bug#703559, reported by Emilio Pozuelo Monfort
<pochu@debian.org>

(cherry picked from commit d16e6ec7ca)
2014-05-16 00:17:22 +02:00
Aurelien Jarno 4df7d90b36 SPARC: add EFD_SEMAPHORE in <bits/eventfd.h> (BZ #16916)
EFD_SEMAPHORE has been added in the main <bits/eventfd.h>, but not in
the SPARC specific version. Fix that.

(cherry picked from commit 83df9ad0cc)
2014-05-07 00:16:48 +02:00
David S. Miller 26c9b0117c NEWS: Add 16885 to fixed bug list. 2014-05-01 16:43:39 -04:00
David S. Miller 726978490f Fix v9/64-bit strcmp when string ends in multiple zero bytes.
[BZ #16885]
	* sysdeps/sparc/sparc64/strcmp.S: Fix end comparison handling when
	multiple zero bytes exist at the end of a string.
	Reported by Aurelien Jarno <aurelien@aurel32.net>

	* string/test-strcmp.c (check): Add explicit test for situations where
	there are multiple zero bytes after the first.
2014-05-01 16:22:39 -04:00
H.J. Lu cec24099fb Disable x87 inline functions for SSE2 math
When i386 and x86-64 mathinline.h was merged into a single mathinline.h,
"gcc -m32" enables x87 inline functions on x86-64 even when -mfpmath=sse
and SSE2 is enabled.  It is a regression on x86-64.  We should check
__SSE2_MATH__ instead of __x86_64__ when disabling x87 inline functions.

(cherry picked from commit 409e00bd69)

Conflicts:
	ChangeLog
	NEWS
	sysdeps/x86/fpu/bits/mathinline.h
2014-01-29 12:04:47 -08:00
Maxim Kuvyrkov 3db0119ef5 Fix race in free() of fastbin chunk: BZ #15073
Perform sanity check only if we have_lock.  Due to lockless nature of fastbins
we need to be careful derefencing pointers to fastbin entries (chunksize(old)
in this case) in multithreaded environments.

The fix is to add have_lock to the if-condition checks.  The rest of the patch
only makes code more readable.

	* malloc/malloc.c (_int_free): Perform sanity check only if we
	have_lock.

Conflicts:

	ChangeLog
	NEWS
2014-01-05 14:58:57 +13:00
Chris Metcalf 15256e58ad tile BZ #15759: Fix bug in _dl_unmap
We returned without calling __munmap if not in the simulator.
Now we call a separate sim_dlclose() function to make the
control flow work correctly.

(cherry picked from commit 1fe2988f52)

Conflicts:
	NEWS
2013-07-23 07:47:59 -04:00
Chris Metcalf ca4023620a tile: default to little-endian in bits/endian.h
This turns out to be helpful when doing a from-scratch cross-compile of
gcc and glibc, since you can then do "make install-headers" in glibc
even before you have a functioning tile gcc.

(cherry picked from commit ad36ba2bd6)
2013-06-19 15:36:53 -04:00
Chris Metcalf 201b499c97 tile: improve detection for missing -mcmodel=large support
The existing test avoided passing -mcmodel=large if the compiler didn't
support it.  However, we need to test not just the compiler support, but
also the toolchain (as and ld) support, so make the test more complete.
In addition, we have to avoid using the hwN_plt() assembly operators if
that support is missing, so guard the uses with #ifdef NO_PLT_PCREL.

This allows us to properly build glibc with the current community
binutils, which doesn't yet have the PC-relative PLT operator support.
The -mcmodel=large support is in gcc 4.8, but the toolchain support
won't be present in the community until binutils 2.24.

(cherry picked from commit 86bd05fbc8)
2013-06-09 11:19:37 -04:00
Wilhelm Eger 2b863a1b2d Backport fixes for BZ #15006 from master.
Resolved backport request BZ #15122.

Assume all unmarked objects are compatible with all ABI variants.
Such objects may have been generated in a transitional period when
ABI tags were not added to all objects.

---

2013-02-08  Carlos O'Donell  <carlos@redhat.com>

	[BZ #15006]
	* sysdeps/generic/ldconfig.h: Define FLAG_ARM_LIBSF.
	* elf/cache.c (print_entry): Add FLAG_ARM_LIBSF support.

ports/

2013-02-08  Carlos O'Donell  <carlos@redhat.com>

	[BZ #15006]
	* sysdeps/unix/sysv/linux/arm/dl-cache.h
	[__ARM_PCS_VFP] (_dl_cache_check_flags): Allow plain FLAG_ELF_LIBC6.
	[!__ARM_PCS_VFP] (_dl_cache_check_flags): Likewise.
	* sysdeps/unix/sysv/linux/arm/readelflib.c (process_elf_file):
	Set FLAG_ARM_LIBSF for soft-float ABI otherwise just FLAG_ELF_LIBC6.
2013-05-22 16:33:03 -04:00
David S. Miller 1032040da2 Update German translations.
* po/de.po: Update from translation team.
2013-03-30 17:03:29 -04:00
Carlos O'Donell 093696517f Add BZ#11261 to 2.16 fixed bug list. 2013-03-17 18:44:03 -04:00
David S. Miller 4de767be56 Update German translations.
* po/de.po: Update from translation team.
2013-01-31 15:22:51 -05:00
Andreas Jaeger fc1abbe2cc Add MSG_FASTOPEN
[BZ #15003]
	* sysdeps/unix/sysv/linux/bits/socket.h (MSG_FASTOPEN): New
	value. Sync with Linux 3.7.
(cherry picked from commit c6fe55cf60)
2013-01-11 11:56:59 +01:00
David S. Miller b540704783 Sync netinet/tcp.h with upstream Linux kernel.
[BZ# 15003]
	* sysdeps/gnu/netinet/tcp.h (TCP_COOKIE_TRANSACTIONS,
	TCP_THIN_LINEAR_TIMEOUTS, TCP_THIN_DUPACK, TCP_USER_TIMEOUT,
	TCP_REPAIR, TCP_REPAIR_QUEUE, TCP_QUEUE_SEQ, TCP_REPAIR_OPTIONS,
	TCP_FASTOPEN): Define.
	(tcp_repair_opt): New structure.
	(TCP_NO_QUEUE, TCP_RECV_QUEUE, TCP_SEND_QUEUE, TCP_QUEUES_NR): New
	enum values.
	(TCP_COOKIE_MIN, TCP_COOKIE_MAX, TCP_COOKIE_PAIR_SIZE,
	TCP_COOKIE_IN_ALWAYS, TCP_COOKIE_OUT_NEVER, TCP_S_DATA_IN,
	TCP_S_DATA_OUT, TCP_MSS_DEFAULT, TCP_MSS_DESIRED): Define.
	(tcp_cookie_transactions): New structure.
2013-01-09 23:09:43 -08:00
Andreas Jaeger 318cd0b180 Add new defines from Linux 3.7 to <netinet/tcp.h> 2013-01-09 23:08:46 -08:00
David S. Miller 37cf37d946 Update Catalan translations.
* po/ca.po: Update from translation team.
2013-01-01 17:30:49 -08:00
David S. Miller bec30822ae Update French translation.
* po/fr.po: Update from translation team.
2013-01-01 17:30:13 -08:00
29 changed files with 2432 additions and 1805 deletions
+97
View File
@@ -1,3 +1,100 @@
2014-06-03 Guo Yixuan <culu.gyx@gmail.com>
[BZ #16882]
* nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S
(pthread_spin_lock): Branch out of spin loop to proper location.
* nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S
(pthread_spin_lock): Likewise.
* nptl/tst-spin4.c: New test.
* nptl/Makefile (tests): Add tst-spin4.
2014-05-17 Jose E. Marchesi <jose.marchesi@oracle.com>
[BZ #16958]
* sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S: Add missing
membar to avoid block loads/stores to overlap previous stores.
2014-05-16 Aurelien Jarno <aurelien@aurel32.net>
[BZ #16943]
* sysdeps/unix/sysv/linux/sparc/bits/resource.h: Declare prlimit
and prlimit64.
2014-05-06 Aurelien Jarno <aurelien@aurel32.net>
[BZ# 16916]
* sysdeps/unix/sysv/linux/sparc/bits/eventfd.h (EFD_SEMAPHORE):
Define.
2014-05-01 David S. Miller <davem@davemloft.net>
[BZ #16885]
* sysdeps/sparc/sparc64/strcmp.S: Fix end comparison handling when
multiple zero bytes exist at the end of a string.
Reported by Aurelien Jarno <aurelien@aurel32.net>
* string/test-strcmp.c (check): Add explicit test for situations where
there are multiple zero bytes after the first.
2014-01-29 H.J. Lu <hongjiu.lu@intel.com>
[BZ #16510]
* sysdeps/x86/fpu/bits/mathinline.h: Check __SSE2_MATH__ instead
of __x86_64__ when disabling x87 inline functions.
2014-01-04 Maxim Kuvyrkov <maxim@kugelworks.com>
Ondřej Bílka <neleai@seznam.cz>
[BZ #15073]
* malloc/malloc.c (_int_free): Perform sanity check only if we
have_lock.
2013-02-08 Carlos O'Donell <carlos@redhat.com>
[BZ #15006]
* sysdeps/generic/ldconfig.h: Define FLAG_ARM_LIBSF.
* elf/cache.c (print_entry): Add FLAG_ARM_LIBSF support.
2013-03-30 David S. Miller <davem@davemloft.net>
* po/de.po: Update from translation team.
2013-01-31 David S. Miller <davem@davemloft.net>
* po/de.po: Update from translation team.
2013-01-11 Andreas Jaeger <aj@suse.de>
[BZ #15003]
* sysdeps/unix/sysv/linux/bits/socket.h (MSG_FASTOPEN): New
value. Sync with Linux 3.7.
2013-01-09 David S. Miller <davem@davemloft.net>
[BZ# 15003]
* sysdeps/gnu/netinet/tcp.h (TCP_COOKIE_TRANSACTIONS,
TCP_THIN_LINEAR_TIMEOUTS, TCP_THIN_DUPACK, TCP_USER_TIMEOUT,
TCP_REPAIR, TCP_REPAIR_QUEUE, TCP_QUEUE_SEQ, TCP_REPAIR_OPTIONS,
TCP_FASTOPEN): Define.
(tcp_repair_opt): New structure.
(TCP_NO_QUEUE, TCP_RECV_QUEUE, TCP_SEND_QUEUE, TCP_QUEUES_NR): New
enum values.
(TCP_COOKIE_MIN, TCP_COOKIE_MAX, TCP_COOKIE_PAIR_SIZE,
TCP_COOKIE_IN_ALWAYS, TCP_COOKIE_OUT_NEVER, TCP_S_DATA_IN,
TCP_S_DATA_OUT, TCP_MSS_DEFAULT, TCP_MSS_DESIRED): Define.
(tcp_cookie_transactions): New structure.
2013-01-09 Andreas Jaeger <aj@suse.de>
* sysdeps/gnu/netinet/tcp.h (TCPI_OPT_SYN_DATA)
(TCPI_OPT_ECN_SEEN): Define. Sync with Linux 3.7.
2013-01-01 David S. Miller <davem@davemloft.net>
* po/fr.po: Update from translation team.
* po/ca.po: Likewise.
2012-12-21 David S. Miller <davem@davemloft.net>
* po/hr.po: Update from translation team.
+24 -18
View File
@@ -4,6 +4,12 @@ See the end for copying conditions.
Please send GNU C library bug reports via <http://sourceware.org/bugzilla/>
using `glibc' in the "product" field.
Version 2.17.1
* The following bugs are resolved with this release:
15003, 15006, 15073, 15122, 15759, 16510, 16885, 16916, 16943, 16958.
Version 2.17
@@ -23,7 +29,7 @@ Version 2.17
14767, 14783, 14784, 14785, 14793, 14796, 14797, 14801, 14803, 14805,
14807, 14811, 14815, 14821, 14822, 14824, 14828, 14831, 14833, 14835,
14838, 14856, 14863, 14865, 14866, 14868, 14869, 14871, 14872, 14879,
14889, 14893, 14898, 14914.
14889, 14893, 14898, 14914, 16882.
* Optimization of memcpy for MIPS.
@@ -103,23 +109,23 @@ Version 2.16
4822, 5077, 5461, 5805, 5993, 6471, 6486, 6578, 6649, 6730, 6770, 6794,
6884, 6890, 6894, 6895, 6907, 6911, 6959, 7064, 9739, 9902, 10110, 10135,
10140, 10153, 10210, 10254, 10346, 10375, 10545, 10716, 10846, 11174,
11322, 11365, 11451, 11494, 11521, 11677, 11837, 11959, 12047, 12097,
12193, 12194, 12297, 12298, 12301, 12340, 12354, 12416, 12495, 13058,
13223, 13361, 13525, 13526, 13527, 13528, 13529, 13530, 13531, 13532,
13533, 13547, 13551, 13552, 13553, 13555, 13556, 13559, 13563, 13566,
13576, 13579, 13583, 13592, 13594, 13613, 13618, 13637, 13656, 13658,
13673, 13691, 13695, 13704, 13705, 13706, 13718, 13726, 13738, 13739,
13743, 13750, 13758, 13760, 13761, 13775, 13786, 13787, 13792, 13806,
13824, 13840, 13841, 13844, 13846, 13848, 13851, 13852, 13854, 13871,
13872, 13873, 13879, 13882, 13883, 13884, 13885, 13886, 13892, 13895,
13908, 13910, 13911, 13912, 13913, 13914, 13915, 13916, 13917, 13918,
13919, 13920, 13921, 13922, 13923, 13924, 13926, 13927, 13928, 13938,
13941, 13942, 13954, 13955, 13956, 13963, 13967, 13968, 13970, 13973,
13979, 13983, 13986, 13996, 14012, 14027, 14033, 14034, 14036, 14040,
14043, 14044, 14048, 14049, 14050, 14053, 14055, 14059, 14064, 14075,
14080, 14083, 14103, 14104, 14109, 14112, 14117, 14122, 14123, 14134,
14153, 14183, 14188, 14199, 14210, 14218, 14229, 14241, 14273, 14277,
14278.
11261, 11322, 11365, 11451, 11494, 11521, 11677, 11837, 11959, 12047,
12097, 12193, 12194, 12297, 12298, 12301, 12340, 12354, 12416, 12495,
13058, 13223, 13361, 13525, 13526, 13527, 13528, 13529, 13530, 13531,
13532, 13533, 13547, 13551, 13552, 13553, 13555, 13556, 13559, 13563,
13566, 13576, 13579, 13583, 13592, 13594, 13613, 13618, 13637, 13656,
13658, 13673, 13691, 13695, 13704, 13705, 13706, 13718, 13726, 13738,
13739, 13743, 13750, 13758, 13760, 13761, 13775, 13786, 13787, 13792,
13806, 13824, 13840, 13841, 13844, 13846, 13848, 13851, 13852, 13854,
13871, 13872, 13873, 13879, 13882, 13883, 13884, 13885, 13886, 13892,
13895, 13908, 13910, 13911, 13912, 13913, 13914, 13915, 13916, 13917,
13918, 13919, 13920, 13921, 13922, 13923, 13924, 13926, 13927, 13928,
13938, 13941, 13942, 13954, 13955, 13956, 13963, 13967, 13968, 13970,
13973, 13979, 13983, 13986, 13996, 14012, 14027, 14033, 14034, 14036,
14040, 14043, 14044, 14048, 14049, 14050, 14053, 14055, 14059, 14064,
14075, 14080, 14083, 14103, 14104, 14109, 14112, 14117, 14122, 14123,
14134, 14153, 14183, 14188, 14199, 14210, 14218, 14229, 14241, 14273,
14277, 14278.
* Support for the x32 ABI on x86-64 added. The x32 target is selected by
configuring glibc with:
+5 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1999-2012 Free Software Foundation, Inc.
/* Copyright (C) 1999-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 1999.
@@ -100,6 +100,10 @@ print_entry (const char *lib, int flag, unsigned int osversion,
case FLAG_AARCH64_LIB64:
fputs (",AArch64", stdout);
break;
/* Uses the ARM soft-float ABI. */
case FLAG_ARM_LIBSF:
fputs (",soft-float", stdout);
break;
case 0:
break;
default:
+12 -8
View File
@@ -3816,25 +3816,29 @@ _int_free(mstate av, mchunkptr p, int have_lock)
unsigned int idx = fastbin_index(size);
fb = &fastbin (av, idx);
mchunkptr fd;
mchunkptr old = *fb;
/* Atomically link P to its fastbin: P->FD = *FB; *FB = P; */
mchunkptr old = *fb, old2;
unsigned int old_idx = ~0u;
do
{
/* Another simple check: make sure the top of the bin is not the
record we are going to add (i.e., double free). */
/* Check that the top of the bin is not the record we are going to add
(i.e., double free). */
if (__builtin_expect (old == p, 0))
{
errstr = "double free or corruption (fasttop)";
goto errout;
}
if (old != NULL)
/* Check that size of fastbin chunk at the top is the same as
size of the chunk that we are adding. We can dereference OLD
only if we have the lock, otherwise it might have already been
deallocated. See use of OLD_IDX below for the actual check. */
if (have_lock && old != NULL)
old_idx = fastbin_index(chunksize(old));
p->fd = fd = old;
p->fd = old2 = old;
}
while ((old = catomic_compare_and_exchange_val_rel (fb, p, fd)) != fd);
while ((old = catomic_compare_and_exchange_val_rel (fb, p, old2)) != old2);
if (fd != NULL && __builtin_expect (old_idx != idx, 0))
if (have_lock && old != NULL && __builtin_expect (old_idx != idx, 0))
{
errstr = "invalid fastbin entry (free)";
goto errout;
+1 -1
View File
@@ -207,7 +207,7 @@ tests = tst-typesizes \
tst-mutexpi1 tst-mutexpi2 tst-mutexpi3 tst-mutexpi4 tst-mutexpi5 \
tst-mutexpi5a tst-mutexpi6 tst-mutexpi7 tst-mutexpi7a tst-mutexpi8 \
tst-mutexpi9 \
tst-spin1 tst-spin2 tst-spin3 \
tst-spin1 tst-spin2 tst-spin3 tst-spin4 \
tst-cond1 tst-cond2 tst-cond3 tst-cond4 tst-cond5 tst-cond6 tst-cond7 \
tst-cond8 tst-cond9 tst-cond10 tst-cond11 tst-cond12 tst-cond13 \
tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \
@@ -19,11 +19,11 @@
.text
ENTRY(pthread_spin_lock)
ldstub [%o0], %g1
1: ldstub [%o0], %g1
orcc %g1, 0x0, %g0
bne,a 2f
ldub [%o0], %g1
1: retl
retl
mov 0, %o0
2: orcc %g1, 0x0, %g0
bne,a 2b
@@ -19,10 +19,10 @@
.text
ENTRY(pthread_spin_lock)
ldstub [%o0], %g1
1: ldstub [%o0], %g1
brnz,pn %g1, 2f
membar #StoreLoad | #StoreStore
1: retl
retl
mov 0, %o0
2: ldub [%o0], %g1
brnz,pt %g1, 2b
+109
View File
@@ -0,0 +1,109 @@
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
static int count = 0;
static void *
thread_add_one (void *arg)
{
int tmp;
pthread_spinlock_t *lock = (pthread_spinlock_t *) arg;
/* When do_test holds the lock for 1 sec, the two thread will be
in contention for the lock. */
if (pthread_spin_lock (lock) != 0)
{
puts ("thread_add_one(): spin_lock failed");
pthread_exit ((void *) 1l);
}
/* sleep 1s before modifying count */
tmp = count;
sleep (1);
count = tmp + 1;
if (pthread_spin_unlock (lock) != 0)
{
puts ("thread_add_one(): spin_unlock failed");
pthread_exit ((void *) 1l);
}
return NULL;
}
static int
do_test (void)
{
pthread_t thr1, thr2;
pthread_spinlock_t lock;
int tmp;
if (pthread_spin_init (&lock, PTHREAD_PROCESS_PRIVATE) != 0)
{
puts ("spin_init failed");
return 1;
}
if (pthread_spin_lock (&lock) != 0)
{
puts ("1st spin_lock failed");
return 1;
}
if (pthread_create (&thr1, NULL, thread_add_one, (void *) &lock) != 0)
{
puts ("1st pthread_create failed");
return 1;
}
if (pthread_create (&thr2, NULL, thread_add_one, (void *) &lock) != 0)
{
puts ("2nd pthread_create failed");
return 1;
}
/* sleep 1s before modifying count */
tmp = count;
sleep (1);
count = tmp + 1;
if (pthread_spin_unlock (&lock) != 0)
{
puts ("1st spin_unlock failed");
return 1;
}
void *status;
if (pthread_join (thr1, &status) != 0)
{
puts ("1st pthread_join failed");
return 1;
}
if (status != NULL)
{
puts ("failure in the 1st thread");
return 1;
}
if (pthread_join (thr2, &status) != 0)
{
puts ("2nd pthread_join failed");
return 1;
}
if (status != NULL)
{
puts ("failure in the 2nd thread");
return 1;
}
if (count != 3)
{
printf ("count is %d, should be 3\n", count);
return 1;
}
return 0;
}
#define TIMEOUT 5
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+1454 -1277
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -2,13 +2,13 @@
# Copyright © 1996, 2002 Free Software Foundation, Inc.
# This file is distributed under the same license as the glibc package.
# Karl Eichwalder <ke@suse.de>, 2002.
# Jochen Hein <jochen@jochen.org>, 1996-2012.
# Jochen Hein <jochen@jochen.org>, 1996-2013.
#
msgid ""
msgstr ""
"Project-Id-Version: GNU libc 2.17-pre1\n"
"POT-Creation-Date: 2012-12-07 15:10-0500\n"
"PO-Revision-Date: 2012-12-08 15:07+0100\n"
"PO-Revision-Date: 2013-03-30 16:56+0100\n"
"Last-Translator: Jochen Hein <jochen@jochen.org>\n"
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
"Language: de\n"
@@ -791,7 +791,7 @@ msgstr "%s ist ein unbekannter Bibliothekstyp"
#: elf/ldconfig.c:409
#, c-format
msgid "Can't stat %s"
msgstr "Kann »stat()« für »%s« nicht aufrufenen"
msgstr "Kann »stat()« für »%s« nicht aufrufen"
#: elf/ldconfig.c:483
#, c-format
@@ -988,7 +988,7 @@ msgstr "Warnung: Sie haben kein Ausführungsrecht für"
#: elf/ldd.bash.in:183
msgid "\tnot a dynamic executable"
msgstr "\\tdas Programm ist nicht dynamisch gelinkt"
msgstr "\tdas Programm ist nicht dynamisch gelinkt"
# XXX need to look at source
#: elf/ldd.bash.in:191
+470 -456
View File
File diff suppressed because it is too large Load Diff
+9
View File
@@ -1,3 +1,12 @@
2013-02-08 Carlos O'Donell <carlos@redhat.com>
[BZ #15006]
* sysdeps/unix/sysv/linux/arm/dl-cache.h
[__ARM_PCS_VFP] (_dl_cache_check_flags): Allow plain FLAG_ELF_LIBC6.
[!__ARM_PCS_VFP] (_dl_cache_check_flags): Likewise.
* sysdeps/unix/sysv/linux/arm/readelflib.c (process_elf_file):
Set FLAG_ARM_LIBSF for soft-float ABI otherwise just FLAG_ELF_LIBC6.
2012-12-04 Steve McIntyre <steve.mcintyre@linaro.org>
* sysdeps/unix/sysv/linux/arm/dl-cache.h: New file.
+19
View File
@@ -1,3 +1,22 @@
2013-07-22 Chris Metcalf <cmetcalf@tilera.com>
[BZ #15759]
* sysdeps/tile/dl-runtime.c (sim_dlclose): New function.
(_dl_unmap): Call sim_dlclose().
2013-06-12 Chris Metcalf <cmetcalf@tilera.com>
* sysdeps/tile/bits/endian.h (__BYTE_ORDER): Default to little.
2013-05-23 Chris Metcalf <cmetcalf@tilera.com>
* sysdeps/tile/tilegx/Makefile ($(cflags-mcmodel-large)):
Test for assembler and linker support for "-mcmodel=large -fpic"
in addition to compiler support; provide -DNO_PLT_PCREL if not.
* sysdeps/tile/start.S [NO_PLT_PCREL]: Guard for no PC-relative
PLT operators in assembly.
* sysdeps/tile/crti.S [NO_PLT_PCREL]: Likewise.
2012-12-14 Chris Metcalf <cmetcalf@tilera.com>
* sysdeps/unix/sysv/linux/tile/nptl/clone.S: Fix DWARF info.
+1 -3
View File
@@ -6,8 +6,6 @@
#if defined __BIG_ENDIAN__
# define __BYTE_ORDER __BIG_ENDIAN
#elif defined __LITTLE_ENDIAN__
# define __BYTE_ORDER __LITTLE_ENDIAN
#else
# error "Endianness not declared!!"
# define __BYTE_ORDER __LITTLE_ENDIAN
#endif
+1 -1
View File
@@ -95,7 +95,7 @@ _init:
LD_PTR r0, r0
BEQZ r0, .Lno_weak_fn
jalr r0
#elif defined(__tilegx__)
#elif defined(__tilegx__) && !defined(NO_PLT_PCREL)
/* Since we are calling from the start of the object to the PLT,
call by loading the full address into a register. */
lnk r2
+10 -4
View File
@@ -127,8 +127,8 @@ _dl_after_load (struct link_map *l)
}
/* Support notifying the simulator about removed objects prior to munmap(). */
void internal_function
_dl_unmap (struct link_map *l)
static void
sim_dlclose (ElfW(Addr) map_start)
{
int shift;
@@ -144,9 +144,15 @@ _dl_unmap (struct link_map *l)
DLPUTC ('0');
DLPUTC ('x');
for (shift = (int) sizeof (unsigned long) * 8 - 4; shift >= 0; shift -= 4)
DLPUTC ("0123456789abcdef"[(l->l_map_start >> shift) & 0xF]);
DLPUTC ("0123456789abcdef"[(map_start >> shift) & 0xF]);
DLPUTC ('\0');
#undef DLPUTC
#undef DLPUTC
}
void internal_function
_dl_unmap (struct link_map *l)
{
sim_dlclose (l->l_map_start);
__munmap ((void *) l->l_map_start, l->l_map_end - l->l_map_start);
}
+12 -1
View File
@@ -62,6 +62,13 @@
#include <sysdep.h>
#include <arch/abi.h>
/* Just create no-ops if we don't support PC-relative PLT relocations. */
#ifdef NO_PLT_PCREL
# define hw2_last_plt(x) 0
# define hw1_plt(x) 0
# define hw0_plt(x) 0
#endif
.text
.global _start
.type _start,@function
@@ -155,7 +162,11 @@ _start:
}
{
ADD_PTR r4, r4, r13
jalr r12
# ifdef NO_PLT_PCREL
j plt(__libc_start_main)
# else
jr r12
# endif
}
#else
addli r0, r13, lo16(main - .Lmy_pc)
+19 -2
View File
@@ -1,12 +1,16 @@
include $(common-objpfx)cflags-mcmodel-large.mk
# Check for gcc to support the command-line switch, and for
# binutils to support the hwN_plt() assembly operators and relocations.
$(common-objpfx)cflags-mcmodel-large.mk: $(common-objpfx)config.make
mcmodel=no; \
$(CC) -S -o /dev/null -xc /dev/null -mcmodel=large && mcmodel=yes; \
(echo 'int main() { return getuid(); }' | \
$(CC) -o /dev/null -xc - -mcmodel=large -fpic) && mcmodel=yes; \
echo "cflags-mcmodel-large = $$mcmodel" > $@
ifeq ($(subdir),csu)
ifeq (yes,$(cflags-mcmodel-large))
ifeq ($(subdir),csu)
# elf-init.c is in libc_nonshared.o (the end of the shared object) but
# must reach the _init symbol at the very start of the shared object.
CFLAGS-elf-init.c += -mcmodel=large
@@ -15,4 +19,17 @@ CFLAGS-elf-init.c += -mcmodel=large
# with profiling, but calls to libc.so via the PLT at the very end.
CFLAGS-gmon-start.c += -mcmodel=large
endif
else
# Don't try to compile assembly code with hwN_plt() directives if the
# toolchain doesn't support -mcmodel=large.
ifeq ($(subdir),csu)
CPPFLAGS-start.S += -DNO_PLT_PCREL
CPPFLAGS-crti.S += -DNO_PLT_PCREL
endif
ifeq ($(subdir),nptl)
CPPFLAGS-pt-crti.S += -DNO_PLT_PCREL
endif
endif
+8 -3
View File
@@ -1,5 +1,5 @@
/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
Copyright (C) 2003-2012 Free Software Foundation, Inc.
Copyright (C) 2003-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,12 +18,17 @@
#include <ldconfig.h>
/* In order to support the transition from unmarked objects
to marked objects we must treat unmarked objects as
compatible with either FLAG_ARM_LIBHF or FLAG_ARM_LIBSF. */
#ifdef __ARM_PCS_VFP
# define _dl_cache_check_flags(flags) \
((flags) == (FLAG_ARM_LIBHF | FLAG_ELF_LIBC6))
((flags) == (FLAG_ARM_LIBHF | FLAG_ELF_LIBC6) \
|| (flags) == FLAG_ELF_LIBC6)
#else
# define _dl_cache_check_flags(flags) \
((flags) == FLAG_ELF_LIBC6)
((flags) == (FLAG_ARM_LIBSF | FLAG_ELF_LIBC6) \
|| (flags) == FLAG_ELF_LIBC6)
#endif
#include_next <dl-cache.h>
@@ -1,4 +1,4 @@
/* Copyright (C) 1999-2012 Free Software Foundation, Inc.
/* Copyright (C) 1999-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 1999 and
Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -46,6 +46,12 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
if (elf32_header->e_flags & EF_ARM_ABI_FLOAT_HARD)
*flag = FLAG_ARM_LIBHF|FLAG_ELF_LIBC6;
else if (elf32_header->e_flags & EF_ARM_ABI_FLOAT_SOFT)
*flag = FLAG_ARM_LIBSF|FLAG_ELF_LIBC6;
else
/* We must assume the unmarked objects are compatible
with all ABI variants. Such objects may have been
generated in a transitional period when the ABI
tags were not added to all objects. */
*flag = FLAG_ELF_LIBC6;
}
}
+28
View File
@@ -353,6 +353,34 @@ check (void)
FOR_EACH_IMPL (impl, 0)
check_result (impl, s1 + i1, s2 + i2, exp_result);
}
/* Test cases where there are multiple zero bytes after the first. */
for (size_t i = 0; i < 16 + 1; i++)
{
s1[i] = 0x00;
s2[i] = 0x00;
}
for (size_t i = 0; i < 16; i++)
{
int exp_result;
for (int val = 0x01; val < 0x100; val++)
{
for (size_t j = 0; j < i; j++)
{
s1[j] = val;
s2[j] = val;
}
s2[i] = val;
exp_result = SIMPLE_STRCMP (s1, s2);
FOR_EACH_IMPL (impl, 0)
check_result (impl, s1, s2, exp_result);
}
}
}
+2 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1999-2012 Free Software Foundation, Inc.
/* Copyright (C) 1999-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 1999.
@@ -36,6 +36,7 @@
#define FLAG_X8664_LIBX32 0x0800
#define FLAG_ARM_LIBHF 0x0900
#define FLAG_AARCH64_LIB64 0x0a00
#define FLAG_ARM_LIBSF 0x0b00
/* Name of auxiliary cache. */
#define _PATH_LDCONFIG_AUX_CACHE "/var/cache/ldconfig/aux-cache"
+69 -15
View File
@@ -37,20 +37,29 @@
/*
* User-settable options (used with setsockopt).
*/
#define TCP_NODELAY 1 /* Don't delay send to coalesce packets */
#define TCP_MAXSEG 2 /* Set maximum segment size */
#define TCP_CORK 3 /* Control sending of partial frames */
#define TCP_KEEPIDLE 4 /* Start keeplives after this period */
#define TCP_KEEPINTVL 5 /* Interval between keepalives */
#define TCP_KEEPCNT 6 /* Number of keepalives before death */
#define TCP_SYNCNT 7 /* Number of SYN retransmits */
#define TCP_LINGER2 8 /* Life time of orphaned FIN-WAIT-2 state */
#define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */
#define TCP_WINDOW_CLAMP 10 /* Bound advertised window */
#define TCP_INFO 11 /* Information about this connection. */
#define TCP_QUICKACK 12 /* Bock/reenable quick ACKs. */
#define TCP_CONGESTION 13 /* Congestion control algorithm. */
#define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */
#define TCP_NODELAY 1 /* Don't delay send to coalesce packets */
#define TCP_MAXSEG 2 /* Set maximum segment size */
#define TCP_CORK 3 /* Control sending of partial frames */
#define TCP_KEEPIDLE 4 /* Start keeplives after this period */
#define TCP_KEEPINTVL 5 /* Interval between keepalives */
#define TCP_KEEPCNT 6 /* Number of keepalives before death */
#define TCP_SYNCNT 7 /* Number of SYN retransmits */
#define TCP_LINGER2 8 /* Life time of orphaned FIN-WAIT-2 state */
#define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */
#define TCP_WINDOW_CLAMP 10 /* Bound advertised window */
#define TCP_INFO 11 /* Information about this connection. */
#define TCP_QUICKACK 12 /* Bock/reenable quick ACKs. */
#define TCP_CONGESTION 13 /* Congestion control algorithm. */
#define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */
#define TCP_COOKIE_TRANSACTIONS 15 /* TCP Cookie Transactions */
#define TCP_THIN_LINEAR_TIMEOUTS 16 /* Use linear timeouts for thin streams*/
#define TCP_THIN_DUPACK 17 /* Fast retrans. after 1 dupack */
#define TCP_USER_TIMEOUT 18 /* How long for loss retry before timeout */
#define TCP_REPAIR 19 /* TCP sock is under repair right now */
#define TCP_REPAIR_QUEUE 20 /* Set TCP queue to repair */
#define TCP_QUEUE_SEQ 21 /* Set sequence number of repaired queue. */
#define TCP_REPAIR_OPTIONS 22 /* Repair TCP connection options */
#define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */
#ifdef __USE_MISC
# include <sys/types.h>
@@ -173,7 +182,9 @@ enum
# define TCPI_OPT_TIMESTAMPS 1
# define TCPI_OPT_SACK 2
# define TCPI_OPT_WSCALE 4
# define TCPI_OPT_ECN 8
# define TCPI_OPT_ECN 8 /* ECN was negociated at TCP session init */
# define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */
# define TCPI_OPT_SYN_DATA 32 /* SYN-ACK acked data in SYN sent or rcvd */
/* Values for tcpi_state. */
enum tcp_ca_state
@@ -241,6 +252,49 @@ struct tcp_md5sig
u_int8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* Key (binary). */
};
/* For socket repair options. */
struct tcp_repair_opt
{
u_int32_t opt_code;
u_int32_t opt_val;
};
/* Queue to repair, for TCP_REPAIR_QUEUE. */
enum
{
TCP_NO_QUEUE,
TCP_RECV_QUEUE,
TCP_SEND_QUEUE,
TCP_QUEUES_NR,
};
/* For cookie transactions socket options. */
#define TCP_COOKIE_MIN 8 /* 64-bits */
#define TCP_COOKIE_MAX 16 /* 128-bits */
#define TCP_COOKIE_PAIR_SIZE (2*TCP_COOKIE_MAX)
/* Flags for both getsockopt and setsockopt */
#define TCP_COOKIE_IN_ALWAYS (1 << 0) /* Discard SYN without cookie */
#define TCP_COOKIE_OUT_NEVER (1 << 1) /* Prohibit outgoing cookies,
* supercedes everything. */
/* Flags for getsockopt */
#define TCP_S_DATA_IN (1 << 2) /* Was data received? */
#define TCP_S_DATA_OUT (1 << 3) /* Was data sent? */
#define TCP_MSS_DEFAULT 536U /* IPv4 (RFC1122, RFC2581) */
#define TCP_MSS_DESIRED 1220U /* IPv6 (tunneled), EDNS0 (RFC3226) */
struct tcp_cookie_transactions
{
u_int16_t tcpct_flags;
u_int8_t __tcpct_pad1;
u_int8_t tcpct_cookie_desired;
u_int16_t tcpct_s_data_desired;
u_int16_t tcpct_used;
u_int8_t tcpct_value[TCP_MSS_DEFAULT];
};
#endif /* Misc. */
#endif /* netinet/tcp.h */
@@ -211,6 +211,7 @@ ENTRY(__memcpy_niagara2)
*/
VISEntryHalf
membar #Sync
alignaddr %o1, %g0, %g0
add %o1, (64 - 1), %o4
+31
View File
@@ -121,6 +121,37 @@ ENTRY(strcmp)
movleu %xcc, -1, %o0
srlx rTMP1, 7, rTMP1
/* In order not to be influenced by bytes after the zero byte, we
* have to retain only the highest bit in the mask for the comparison
* with rSTRXOR to work properly.
*/
mov 0, rTMP2
andcc rTMP1, 0x0100, %g0
movne %xcc, 8, rTMP2
sllx rTMP1, 63 - 16, %o1
movrlz %o1, 16, rTMP2
sllx rTMP1, 63 - 24, %o1
movrlz %o1, 24, rTMP2
sllx rTMP1, 63 - 32, %o1
movrlz %o1, 32, rTMP2
sllx rTMP1, 63 - 40, %o1
movrlz %o1, 40, rTMP2
sllx rTMP1, 63 - 48, %o1
movrlz %o1, 48, rTMP2
sllx rTMP1, 63 - 56, %o1
movrlz %o1, 56, rTMP2
srlx rTMP1, rTMP2, rTMP1
sllx rTMP1, rTMP2, rTMP1
cmp rTMP1, rSTRXOR
retl
movgu %xcc, 0, %o0
+3 -2
View File
@@ -1,6 +1,5 @@
/* System-specific socket constants and types. Linux version.
Copyright (C) 1991, 1992, 1994-2001, 2004, 2006-2010, 2011, 2012
Free Software Foundation, Inc.
Copyright (C) 1991-2013 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
@@ -208,6 +207,8 @@ enum
#define MSG_MORE MSG_MORE
MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/
#define MSG_WAITFORONE MSG_WAITFORONE
MSG_FASTOPEN = 0x20000000, /* Send data in TCP SYN. */
#define MSG_FASTOPEN MSG_FASTOPEN
MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file
descriptor received through
@@ -22,6 +22,8 @@
/* Flags for eventfd. */
enum
{
EFD_SEMAPHORE = 0x000001,
#define EFD_SEMAPHORE EFD_SEMAPHORE
EFD_CLOEXEC = 0x400000,
#define EFD_CLOEXEC EFD_CLOEXEC
EFD_NONBLOCK = 0x004000
@@ -253,3 +253,30 @@ enum __priority_which
PRIO_USER = 2 /* WHO is a user ID. */
#define PRIO_USER PRIO_USER
};
__BEGIN_DECLS
#ifdef __USE_GNU
/* Modify and return resource limits of a process atomically. */
# ifndef __USE_FILE_OFFSET64
extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource,
const struct rlimit *__new_limit,
struct rlimit *__old_limit) __THROW;
# else
# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (prlimit, (__pid_t __pid,
enum __rlimit_resource __resource,
const struct rlimit *__new_limit,
struct rlimit *__old_limit), prlimit64);
# else
# define prlimit prlimit64
# endif
# endif
# ifdef __USE_LARGEFILE64
extern int prlimit64 (__pid_t __pid, enum __rlimit_resource __resource,
const struct rlimit64 *__new_limit,
struct rlimit64 *__old_limit) __THROW;
# endif
#endif
__END_DECLS
+3 -3
View File
@@ -1,5 +1,5 @@
/* Inline math functions for i387 and SSE.
Copyright (C) 1995-2012 Free Software Foundation, Inc.
Copyright (C) 1995-2014 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
@@ -382,7 +382,7 @@ __END_NAMESPACE_C99
# endif
#endif
#ifndef __x86_64__
#ifndef __SSE2_MATH__
# if ((!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \
&& defined __OPTIMIZE__)
@@ -965,4 +965,4 @@ __inline_mathcode2 (__ieee754_atan2, __y, __x,
return __value;)
# endif
#endif /* !__x86_64__ */
#endif /* !__SSE2_MATH__ */