[meego-packaging] [meego-commits] 6854: Changes to Trunk:Testing/glibc
Anas Nashif
nashif at linux.intel.com
Fri Aug 20 00:44:35 PDT 2010
Please do not do that, since this has never been in Trunk, you can just revert it to last revision in Trunk:Testing, no need to have a changelog for this.
On 2010-08-20, at 8:11 AM, Peter Zhu wrote:
> Hi,
> I have made the following changes to glibc in project Trunk:Testing. Please review and accept ASAP.
>
> Thank You,
> Peter Zhu
>
> [This message was auto-generated]
>
> ---
>
> Request #6854:
>
> submit: home:peter/glibc(r4) -> Trunk:Testing/glibc
>
>
> Message:
> Rever to 2.11
>
> State: new 2010-08-19T19:02:21 peter
> Comment: None
>
>
>
> changes files:
> --------------
> --- glibc.changes
> +++ glibc.changes
> @@ -1,2 +1,3 @@
> -* Tue Jul 06 2010 Austin Zhang <austin.zhang at intel.com> - 2.12
> -- Enable random stackguard explicitly
> +* Fri Aug 20 2010 Peter J Zhu <peter.j.zhu at intel.com> - 2.11.90
> +- Revert to 2.11
> +- Fix rpmlint errors
> @@ -4,5 +5 @@
> -* Fri Jun 30 2010 Austin Zhang <austin.zhang at intel.com> - 2.12
> -- Glibc-2.12-master and arm 2.12 port
> - Removed unnecessary stuffs
> -
> -* Thu Jun 03 2010 Austin Zhang <austin.zhang at intel.com> - 2.11.90
> +* Tue Jul 27 2010 Austin Zhang <austin.zhang at intel.com> - 2.11.90
> @@ -10,2 +6,0 @@
> -- Patch from H.J tree for bugfix in memory optimization -- fix
> - BMC#983
> @@ -13,2 +8,3 @@
> -* Wed May 05 2010 Anas Nashif <anas.nashif at intel.com> - 2.11.90
> -- Fixed rpmlint errors
> +* Fri Apr 16 2010 Austin Zhang <austin.zhang at intel.com> - 2.11.90
> +- Patch from H.J tree for bugfix in memory optimization -- fix
> + BMC#983
>
> old:
> ----
> glibc-2.12-e28c887.tar.bz2
> glibc-ports-2.12-9f99a41.tar.bz2
>
> new:
> ----
> Correct-unwind-info-in-strcmp-sse4.S.patch
> Fix-bugs-in-x86-32-strcmp-sse4.S-and-strcmp-ssse3.S.patch
> Update-xmm3-when-exit-from-loop.patch
> cve-2010-0296-mount-DoS.patch
> glibc-2.11-12-g24c0bf7-fedora.tar.bz2
> glibc-2.11-12-g24c0bf7.tar.bz2
> glibc-atom-memory-string-opt-tillto-20100226.patch
> glibc-fedora.patch
> glibc-ports-2.11.tar.bz2
> nis_shadow.diff
> prelink-causes-zypper-ref-to-die.patch
> tzdata-update.c.arm.patch
>
> spec files:
> -----------
> --- glibc.spec
> +++ glibc.spec
> @@ -1,13 +1,16 @@
> -%define glibcsrcdir glibc-2.12-e28c887
> -%define glibcversion 2.12
> +%define glibcsrcdir glibc-2.11-12-g24c0bf7
> +%define glibcversion 2.11.90
> +### glibc.spec.in follows:
> %define run_glibc_tests 0
> %define multiarcharches %{ix86} x86_64
> +
> +
> %define debuginfocommonarches alpha alphaev6 sparc sparcv9 sparcv9v sparc64 sparc64v
>
> Summary: The GNU libc libraries
> Name: glibc
> -Version: 2.12
> -Release: 1
> +Version: 2.11.90
> +Release: 12
> # GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
> # Things that are linked directly into dynamically linked programs
> # and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
> @@ -15,19 +18,38 @@
> # libraries without restrictions.
> License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
> Group: System/Libraries
> -URL: http://sourceware.org/git/?p=glibc.git;a=summary/
> -Source0: glibc-2.12-e28c887.tar.bz2
> -Source1: glibc-ports-2.12-9f99a41.tar.bz2
> -
> -Patch0: glibc-arm-alignment-fix.patch
> +URL: http://sources.redhat.com/glibc/
> +Source0: glibc-2.11-12-g24c0bf7.tar.bz2
> +Source1: %{glibcsrcdir}-fedora.tar.bz2
> +Source2: glibc-ports-2.11.tar.bz2
> +Patch0: %{name}-fedora.patch
> +Patch2: glibc-atom-memory-string-opt-tillto-20100226.patch
> +Patch3: nis_shadow.diff
> +
> +Patch4: tzdata-update.c.arm.patch
> +Patch5: glibc-arm-alignment-fix.patch
> +
> +Patch6: Correct-unwind-info-in-strcmp-sse4.S.patch
> +Patch7: Update-xmm3-when-exit-from-loop.patch
> +Patch8: prelink-causes-zypper-ref-to-die.patch
> +Patch9: Fix-bugs-in-x86-32-strcmp-sse4.S-and-strcmp-ssse3.S.patch
> +Patch10: cve-2010-0296-mount-DoS.patch
>
> Provides: ldconfig
> +# The dynamic linker supports DT_GNU_HASH
> Provides: rtld(GNU_HASH)
> Requires: glibc-common = %{version}-%{release}
> +# Require libgcc in case some program calls pthread_cancel in its %%post
> Requires(pre): basesystem, libgcc
> +# This is for building auxiliary programs like memusage, nscd
> +# For initial glibc bootstraps it can be commented out
> +#BuildRequires: gd-devel libpng-devel zlib-devel texinfo
> BuildRequires: zlib-devel texinfo
> BuildRequires: sed >= 3.95, libcap-devel, gettext, nss-devel
> +#BuildRequires: /bin/ps, /bin/kill, /bin/awk, procps
> BuildRequires: gawk, util-linux-ng
> +# This is to ensure that __frame_state_for is exported by glibc
> +# will be compatible with egcs 1.x.y
> BuildRequires: gcc >= 3.2
> %define enablekernel 2.6.25
> %ifarch %{ix86}
> @@ -145,13 +167,25 @@
>
>
> %prep
> -%setup -q -n %{glibcsrcdir} -b0 -a1
> -mv glibc-ports-9f99a41 ports
> +%setup -q -n %{glibcsrcdir} %{?glibc_release_unpack} -b1 -a2
> +%{?glibc_release_setup}
> +mv glibc-ports-2.11 ports
> +
> +%patch0 -E -p1
> +%patch2 -p1
> +%patch3 -p1
>
> %ifarch %{arm}
> -%patch0 -p1
> +%patch4 -p1
> +%patch5 -p1
> %endif
>
> +%patch6 -p1
> +%patch7 -p1
> +%patch8 -p1
> +%patch9 -p1
> +%patch10 -p1
> +
> cat > find_provides.sh <<EOF
> #!/bin/sh
> /usr/lib/rpm/find-provides | grep -v GLIBC_PRIVATE
> @@ -169,6 +203,10 @@
> BuildFlags="-march=core2 -mtune=atom"
> %endif
>
> +%ifnarch %{arm}
> +BuildFlags="$BuildFlags -fasynchronous-unwind-tables"
> +%endif
> +
> EnableKernel="--enable-kernel=%{enablekernel}"
> echo "$GCC" > Gcc
> AddOns=`echo */configure | sed -e 's!/configure!!g;s!\(linuxthreads\|nptl\|rtkaio\|powerpc-cpu\)\( \|$\)!!g;s! \+$!!;s! !,!g;s!^!,!;/^,\*$/d'`
> @@ -188,7 +226,7 @@
> --prefix=%{_prefix} \
> --enable-add-ons=nptl$AddOns --without-cvs $EnableKernel \
> --with-headers=%{_prefix}/include --enable-bind-now \
> - --with-tls --with-__thread --enable-stackguard-randomization \
> + --with-tls --with-__thread \
> %ifnarch %{arm}
> --build %{nptl_target_cpu}-meego-linux \
> --host %{nptl_target_cpu}-meego-linux \
> @@ -207,6 +245,18 @@
>
> build_nptl linuxnptl
>
> +cd build-%{nptl_target_cpu}-linuxnptl
> +$GCC -static -L. -Os ../fedora/glibc_post_upgrade.c -o glibc_post_upgrade.%{_target_cpu} \
> + -DNO_SIZE_OPTIMIZATION \
> +%ifarch i386 i486 i586
> + -DARCH_386 \
> +%endif
> + '-DLIBTLS="/%{_lib}/tls/"' \
> + '-DGCONV_MODULES_DIR="%{_prefix}/%{_lib}/gconv"' \
> + '-DLD_SO_CONF="/etc/ld.so.conf"' \
> + '-DICONVCONFIG="%{_sbindir}/iconvconfig.%{_target_cpu}"'
> +cd ..
> +
> %install
> GCC=`cat Gcc`
>
> @@ -230,7 +280,7 @@
> # the generic one (#162634)
> cp -a bits/stdio-lock.h $RPM_BUILD_ROOT%{_prefix}/include/bits/stdio-lock.h
> # And <bits/libc-lock.h> needs sanitizing as well.
> -cp -a ./nptl/sysdeps/pthread/bits/libc-lock.h $RPM_BUILD_ROOT%{_prefix}/include/bits/libc-lock.h
> +cp -a fedora/libc-lock.h $RPM_BUILD_ROOT%{_prefix}/include/bits/libc-lock.h
>
> if [ -d $RPM_BUILD_ROOT%{_prefix}/info -a "%{_infodir}" != "%{_prefix}/info" ]; then
> mkdir -p $RPM_BUILD_ROOT%{_infodir}
> @@ -242,9 +292,15 @@
>
> ln -sf libbsd-compat.a $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libbsd.a
>
> +install -p -m 644 fedora/nsswitch.conf $RPM_BUILD_ROOT/etc/nsswitch.conf
> +
> mkdir -p $RPM_BUILD_ROOT/etc/default
> install -p -m 644 nis/nss $RPM_BUILD_ROOT/etc/default/nss
>
> +# Take care of setuids
> +# -- new security review sez that this shouldn't be needed anymore
> +#chmod 755 $RPM_BUILD_ROOT%{_prefix}/libexec/pt_chown
> +
> # This is for ncsd - in glibc 2.2
> install -m 644 nscd/nscd.conf $RPM_BUILD_ROOT/etc
> mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
> @@ -265,6 +321,10 @@
>> $RPM_BUILD_ROOT%{_prefix}/%{_lib}/gconv/gconv-modules.cache
> chmod 644 $RPM_BUILD_ROOT%{_prefix}/%{_lib}/gconv/gconv-modules.cache
>
> +# Install the upgrade program
> +install -m 700 build-%{nptl_target_cpu}-linuxnptl/glibc_post_upgrade.%{_target_cpu} \
> + $RPM_BUILD_ROOT/usr/sbin/glibc_post_upgrade.%{_target_cpu}
> +
> strip -g $RPM_BUILD_ROOT%{_prefix}/%{_lib}/*.o
>
> mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_prefix}/%{_lib}
> @@ -286,6 +346,26 @@
> # rquota.x and rquota.h are now provided by quota
> rm -f $RPM_BUILD_ROOT%{_prefix}/include/rpcsvc/rquota.[hx]
>
> +# Hardlink identical locale files together
> +%ifnarch %{auxarches}
> +#From 2.11, removed hardlink
> +#gcc -O2 -o build-%{nptl_target_cpu}-linuxnptl/hardlink fedora/hardlink.c
> +olddir=`pwd`
> +pushd ${RPM_BUILD_ROOT}%{_prefix}/lib/locale
> +rm locale-archive || :
> +# Intentionally we do not pass --alias-file=, aliases will be added
> +# by build-locale-archive.
> +$olddir/build-%{nptl_target_cpu}-linuxnptl/elf/ld.so \
> + --library-path $olddir/build-%{nptl_target_cpu}-linuxnptl/ \
> + $olddir/build-%{nptl_target_cpu}-linuxnptl/locale/localedef \
> + --prefix ${RPM_BUILD_ROOT} --add-to-archive \
> + *_*
> +rm -rf *_*
> +mv locale-archive{,.tmpl}
> +popd
> +#build-%{nptl_target_cpu}-linuxnptl/hardlink -vc $RPM_BUILD_ROOT%{_prefix}/lib/locale
> +%endif
> +
> rm -f ${RPM_BUILD_ROOT}/%{_lib}/libnss1-*
> rm -f ${RPM_BUILD_ROOT}/%{_lib}/libnss-*.so.1
>
> @@ -313,7 +393,6 @@
> -path "*%{_prefix}/include/*" -o \
> -path "*%{_prefix}/lib/locale/*" \
> \) -printf "%%%%dir /%%P\n"
> -
> } | {
>
> # primary filelist
> @@ -323,7 +402,7 @@
> # languages very well, temporarily disable
> LIB_LANG=''
> sed -e "$LIB_LANG" -e "$SHARE_LANG" \
> - -e '\,/etc/\(localtime\|ld\.so\.conf\|ld\.so\.cache\|default\),d' \
> + -e '\,/etc/\(localtime\|nsswitch.conf\|ld\.so\.conf\|ld\.so\.cache\|default\),d' \
> -e '\,/%{_lib}/lib\(pcprofile\|memusage\)\.so,d' \
> -e '\,bin/\(memusage\|mtrace\|xtrace\|pcprofiledump\),d'
> } | sort > rpm.filelist
> @@ -358,6 +437,8 @@
> -e '\|nscd|d' rpm.filelist
>
> grep '%{_prefix}/bin' < rpm.filelist >> common.filelist
> +#grep '%{_prefix}/lib/locale' < rpm.filelist | grep -v /locale-archive.tmpl >> common.filelist
> +#grep '%{_prefix}/libexec/pt_chown' < rpm.filelist >> common.filelist
> grep '%{_prefix}/sbin/[^gi]' < rpm.filelist >> common.filelist
> grep '%{_prefix}/share' < rpm.filelist | \
> grep -v '%{_prefix}/share/zoneinfo' >> common.filelist
> @@ -370,11 +451,15 @@
>
>> nosegneg.filelist
>
> +echo '%{_prefix}/sbin/build-locale-archive' >> common.filelist
> +echo '%{_prefix}/sbin/tzdata-update' >> common.filelist
> echo '%{_prefix}/sbin/nscd' > nscd.filelist
>
> cat > utils.filelist <<EOF
> %{_prefix}/%{_lib}/libmemusage.so
> %{_prefix}/%{_lib}/libpcprofile.so
> +#%{_prefix}/bin/memusage
> +#%{_prefix}/bin/memusagestat
> %{_prefix}/bin/mtrace
> %{_prefix}/bin/pcprofiledump
> %{_prefix}/bin/xtrace
> @@ -388,9 +473,22 @@
> rm -rf $RPM_BUILD_ROOT%{_prefix}/share/zoneinfo
>
> # Make sure %config files have the same timestamp
> +touch -r fedora/glibc.spec.in $RPM_BUILD_ROOT/etc/ld.so.conf
> touch -r timezone/northamerica $RPM_BUILD_ROOT/etc/localtime
> touch -r sunrpc/etc.rpc $RPM_BUILD_ROOT/etc/rpc
>
> +cd fedora
> +$GCC -Os -static -o build-locale-archive build-locale-archive.c \
> + ../build-%{nptl_target_cpu}-linuxnptl/locale/locarchive.o \
> + ../build-%{nptl_target_cpu}-linuxnptl/locale/md5.o \
> + -DDATADIR=\"%{_datadir}\" -DPREFIX=\"%{_prefix}\" \
> + -L../build-%{nptl_target_cpu}-linuxnptl
> +install -m 700 build-locale-archive $RPM_BUILD_ROOT/usr/sbin/build-locale-archive
> +$GCC -Os -static -o tzdata-update tzdata-update.c \
> + -L../build-%{nptl_target_cpu}-linuxnptl
> +install -m 700 tzdata-update $RPM_BUILD_ROOT/usr/sbin/tzdata-update
> +cd ..
> +
> # the last bit: more documentation
> rm -rf documentation
> mkdir documentation
> @@ -455,11 +553,21 @@
> touch $RPM_BUILD_ROOT/var/run/nscd/{socket,nscd.pid}
> %endif
>
> +%ifnarch %{auxarches}
> +> $RPM_BUILD_ROOT/%{_prefix}/lib/locale/locale-archive
> +%endif
> +
> mkdir -p $RPM_BUILD_ROOT/var/cache/ldconfig
>> $RPM_BUILD_ROOT/var/cache/ldconfig/aux-cache
>
> +%post -p /usr/sbin/glibc_post_upgrade.%{_target_cpu}
> +
> %postun -p /sbin/ldconfig
>
> +%post common -p /usr/sbin/build-locale-archive
> +
> +%triggerin common -p /usr/sbin/tzdata-update -- tzdata
> +
> %post devel
> /sbin/install-info %{_infodir}/libc.info.gz %{_infodir}/dir || :
>
> @@ -507,6 +615,7 @@
> %files -f rpm.filelist
> %defattr(-,root,root)
> %verify(not md5 size mtime) %config(noreplace) /etc/localtime
> +%verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf
> %verify(not md5 size mtime) %config(noreplace) /etc/ld.so.conf
> %dir /etc/ld.so.conf.d
> %dir %{_prefix}/libexec/getconf
> @@ -523,6 +632,7 @@
> %files -f common.filelist common
> %defattr(-,root,root)
> %dir %{_prefix}/lib/locale
> +%attr(0644,root,root) %verify(not md5 size mtime) %{_prefix}/lib/locale/locale-archive.tmpl
> %attr(0644,root,root) %verify(not md5 size mtime mode) %ghost %config(missingok,noreplace) %{_prefix}/lib/locale/locale-archive
> %dir %attr(755,root,root) /etc/default
> %verify(not md5 size mtime) %config(noreplace) /etc/default/nss
>
> other changes:
> --------------
>
> ++++++ Correct-unwind-info-in-strcmp-sse4.S.patch (new)
> --- Correct-unwind-info-in-strcmp-sse4.S.patch
> +++ Correct-unwind-info-in-strcmp-sse4.S.patch
> +diff --git a/sysdeps/i386/i686/multiarch/strcmp-sse4.S b/sysdeps/i386/i686/multiarch/strcmp-sse4.S
> +index d5fd23e..81d6ec6 100644
> +--- a/sysdeps/i386/i686/multiarch/strcmp-sse4.S
> ++++ b/sysdeps/i386/i686/multiarch/strcmp-sse4.S
> +@@ -178,7 +178,9 @@ L(first4bytes):
> + PUSH (%ebx)
> + PUSH (%edi)
> + PUSH (%esi)
> ++#ifdef USE_AS_STRNCMP
> + cfi_remember_state
> ++#endif
> + mov %edx, %edi
> + mov %eax, %esi
> + xorl %eax, %eax
> +@@ -246,8 +248,8 @@ L(ret):
> + ret
> +
> + .p2align 4
> +- cfi_restore_state
> + #ifdef USE_AS_STRNCMP
> ++ cfi_restore_state
> + L(more16byteseq):
> + POP (%esi)
> + POP (%edi)
> +--
> +1.7.0.2
> +
>
> ++++++ Fix-bugs-in-x86-32-strcmp-sse4.S-and-strcmp-ssse3.S.patch (new)
> --- Fix-bugs-in-x86-32-strcmp-sse4.S-and-strcmp-ssse3.S.patch
> +++ Fix-bugs-in-x86-32-strcmp-sse4.S-and-strcmp-ssse3.S.patch
> +From c8d94176d320d267f11d6011f7b2dcf9679425cc Mon Sep 17 00:00:00 2001
> +From: H.J. Lu <hongjiu.lu at intel.com>
> +Date: Thu, 15 Apr 2010 07:49:30 -0700
> +Subject: [PATCH] Fix bugs in x86-32 strcmp-sse4.S and strcmp-ssse3.S
> +
> +---
> + string/test-strncmp.c | 39 +++++++++++++++++++++++++---
> + sysdeps/i386/i686/multiarch/strcmp-sse4.S | 4 +-
> + sysdeps/i386/i686/multiarch/strcmp-ssse3.S | 11 ++++---
> + 3 files changed, 43 insertions(+), 11 deletions(-)
> +
> +diff --git a/string/test-strncmp.c b/string/test-strncmp.c
> +index 5adf0eb..3687879 100644
> +--- a/string/test-strncmp.c
> ++++ b/string/test-strncmp.c
> +@@ -1,5 +1,5 @@
> + /* Test and measure strncmp functions.
> +- Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
> ++ Copyright (C) 1999, 2002, 2003, 2010 Free Software Foundation, Inc.
> + This file is part of the GNU C Library.
> + Written by Jakub Jelinek <jakub at redhat.com>, 1999.
> +
> +@@ -51,8 +51,8 @@ stupid_strncmp (const char *s1, const char *s2, size_t n)
> + return ret;
> + }
> +
> +-static void
> +-do_one_test (impl_t *impl, const char *s1, const char *s2, size_t n,
> ++static int
> ++check_result (impl_t *impl, const char *s1, const char *s2, size_t n,
> + int exp_result)
> + {
> + int result = CALL (impl, s1, s2, n);
> +@@ -63,9 +63,19 @@ do_one_test (impl_t *impl, const char *s1, const char *s2, size_t n,
> + error (0, 0, "Wrong result in function %s %d %d", impl->name,
> + result, exp_result);
> + ret = 1;
> +- return;
> ++ return -1;
> + }
> +
> ++ return 0;
> ++}
> ++
> ++static void
> ++do_one_test (impl_t *impl, const char *s1, const char *s2, size_t n,
> ++ int exp_result)
> ++{
> ++ if (check_result (impl, s1, s2, n, exp_result) < 0)
> ++ return;
> ++
> + if (HP_TIMING_AVAIL)
> + {
> + hp_timing_t start __attribute ((unused));
> +@@ -283,6 +293,25 @@ do_random_tests (void)
> + }
> + }
> +
> ++static void
> ++check1 (void)
> ++{
> ++ char *s1 = (char *)(buf1 + 0xb2c);
> ++ char *s2 = (char *)(buf1 + 0xfd8);
> ++ size_t i;
> ++ int exp_result;
> ++
> ++ strcpy(s1, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs");
> ++ strcpy(s2, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkLMNOPQRSTUV");
> ++
> ++ for (i = 0; i < 80; i++)
> ++ {
> ++ exp_result = simple_strncmp (s1, s2, i);
> ++ FOR_EACH_IMPL (impl, 0)
> ++ check_result (impl, s1, s2, i, exp_result);
> ++ }
> ++}
> ++
> + int
> + test_main (void)
> + {
> +@@ -290,6 +319,8 @@ test_main (void)
> +
> + test_init ();
> +
> ++ check1 ();
> ++
> + printf ("%23s", "");
> + FOR_EACH_IMPL (impl, 0)
> + printf ("\t%s", impl->name);
> +diff --git a/sysdeps/i386/i686/multiarch/strcmp-sse4.S b/sysdeps/i386/i686/multiarch/strcmp-sse4.S
> +index 81d6ec6..0de0a11 100644
> +--- a/sysdeps/i386/i686/multiarch/strcmp-sse4.S
> ++++ b/sysdeps/i386/i686/multiarch/strcmp-sse4.S
> +@@ -223,8 +223,8 @@ L(crosspage):
> + inc %edx
> + cmp $15, %edx
> + jle L(crosspage)
> +- add $16, %edi
> +- add $16, %esi
> ++ add %edx, %edi
> ++ add %edx, %esi
> + jmp L(check_offset)
> +
> + .p2align 4
> +diff --git a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
> +index 40994c0..a4de225 100644
> +--- a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
> ++++ b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
> +@@ -1484,17 +1484,18 @@ L(gobble_ashr_12):
> + sub $0xffff, %esi
> + jnz L(exit)
> +
> ++#ifdef USE_AS_STRNCMP
> ++ cmp $16, %ebp
> ++ lea -16(%ebp), %ebp
> ++ jbe L(more8byteseq)
> ++#endif
> ++
> + add $16, %ecx
> + movdqa %xmm4, %xmm3
> +
> + add $16, %edi
> + jg L(nibble_ashr_12)
> +
> +-#ifdef USE_AS_STRNCMP
> +- cmp $16, %ebp
> +- lea -16(%ebp), %ebp
> +- jbe L(more8byteseq)
> +-#endif
> + movdqa (%eax, %ecx), %xmm1
> + movdqa (%edx, %ecx), %xmm2
> + movdqa %xmm2, %xmm4
> +--
> +1.5.3
> +
>
> ++++++ Update-xmm3-when-exit-from-loop.patch (new)
> --- Update-xmm3-when-exit-from-loop.patch
> +++ Update-xmm3-when-exit-from-loop.patch
> +diff --git a/sysdeps/i386/i686/multiarch/memcmp-ssse3.S b/sysdeps/i386/i686/multiarch/memcmp-ssse3.S
> +index d2f852f..2e0d15f 100644
> +--- a/sysdeps/i386/i686/multiarch/memcmp-ssse3.S
> ++++ b/sysdeps/i386/i686/multiarch/memcmp-ssse3.S
> +@@ -269,6 +269,7 @@ L(shr_1_gobble_loop):
> +
> + lea 32(%edi), %edi
> + jz L(shr_1_gobble_loop)
> ++ pand %xmm0, %xmm3
> +
> + cmp $0, %ecx
> + jge L(shr_1_gobble_next)
> +@@ -352,6 +353,7 @@ L(shr_2_gobble_loop):
> +
> + lea 32(%edi), %edi
> + jz L(shr_2_gobble_loop)
> ++ pand %xmm0, %xmm3
> +
> + cmp $0, %ecx
> + jge L(shr_2_gobble_next)
> +@@ -434,6 +436,7 @@ L(shr_3_gobble_loop):
> +
> + lea 32(%edi), %edi
> + jz L(shr_3_gobble_loop)
> ++ pand %xmm0, %xmm3
> +
> + cmp $0, %ecx
> + jge L(shr_3_gobble_next)
> +@@ -516,6 +519,7 @@ L(shr_4_gobble_loop):
> +
> + lea 32(%edi), %edi
> + jz L(shr_4_gobble_loop)
> ++ pand %xmm0, %xmm3
> +
> + cmp $0, %ecx
> + jge L(shr_4_gobble_next)
> +@@ -598,6 +602,7 @@ L(shr_5_gobble_loop):
> +
> + lea 32(%edi), %edi
> + jz L(shr_5_gobble_loop)
> ++ pand %xmm0, %xmm3
> +
> + cmp $0, %ecx
> + jge L(shr_5_gobble_next)
> +@@ -680,6 +685,7 @@ L(shr_6_gobble_loop):
> +
> + lea 32(%edi), %edi
> + jz L(shr_6_gobble_loop)
> ++ pand %xmm0, %xmm3
> +
> + cmp $0, %ecx
> + jge L(shr_6_gobble_next)
> +@@ -762,6 +768,7 @@ L(shr_7_gobble_loop):
> +
> + lea 32(%edi), %edi
> + jz L(shr_7_gobble_loop)
> ++ pand %xmm0, %xmm3
> +
> + cmp $0, %ecx
> + jge L(shr_7_gobble_next)
> +@@ -844,6 +851,7 @@ L(shr_8_gobble_loop):
> +
> + lea 32(%edi), %edi
> + jz L(shr_8_gobble_loop)
> ++ pand %xmm0, %xmm3
> +
> + cmp $0, %ecx
> + jge L(shr_8_gobble_next)
> +@@ -926,6 +934,7 @@ L(shr_9_gobble_loop):
> +
> + lea 32(%edi), %edi
> + jz L(shr_9_gobble_loop)
> ++ pand %xmm0, %xmm3
> +
> + cmp $0, %ecx
> + jge L(shr_9_gobble_next)
> +@@ -1008,6 +1017,7 @@ L(shr_10_gobble_loop):
> +
> + lea 32(%edi), %edi
> + jz L(shr_10_gobble_loop)
> ++ pand %xmm0, %xmm3
> +
> + cmp $0, %ecx
> + jge L(shr_10_gobble_next)
> +@@ -1090,6 +1100,7 @@ L(shr_11_gobble_loop):
> +
> + lea 32(%edi), %edi
> + jz L(shr_11_gobble_loop)
> ++ pand %xmm0, %xmm3
> +
> + cmp $0, %ecx
> + jge L(shr_11_gobble_next)
> +@@ -1172,6 +1183,7 @@ L(shr_12_gobble_loop):
> +
> + lea 32(%edi), %edi
> + jz L(shr_12_gobble_loop)
> ++ pand %xmm0, %xmm3
> +
> + cmp $0, %ecx
> + jge L(shr_12_gobble_next)
> +@@ -1254,6 +1266,7 @@ L(shr_13_gobble_loop):
> +
> + lea 32(%edi), %edi
> + jz L(shr_13_gobble_loop)
> ++ pand %xmm0, %xmm3
> +
> + cmp $0, %ecx
> + jge L(shr_13_gobble_next)
> +@@ -1336,6 +1349,7 @@ L(shr_14_gobble_loop):
> +
> + lea 32(%edi), %edi
> + jz L(shr_14_gobble_loop)
> ++ pand %xmm0, %xmm3
> +
> + cmp $0, %ecx
> + jge L(shr_14_gobble_next)
> +@@ -1418,6 +1432,7 @@ L(shr_15_gobble_loop):
> +
> + lea 32(%edi), %edi
> + jz L(shr_15_gobble_loop)
> ++ pand %xmm0, %xmm3
> +
> + cmp $0, %ecx
> + jge L(shr_15_gobble_next)
> +--
> +1.7.0.2
> +
>
> ++++++ cve-2010-0296-mount-DoS.patch (new)
> --- cve-2010-0296-mount-DoS.patch
> +++ cve-2010-0296-mount-DoS.patch
> +From ab00f4eac8f4932211259ff87be83144f5211540 Mon Sep 17 00:00:00 2001
> +From: Ulrich Drepper <drepper at redhat.com>
> +Date: Sun, 2 May 2010 12:12:55 -0700
> +Subject: [PATCH] Fix handling if newline in addmntent.
> +
> +---
> + ChangeLog | 6 ++++++
> + misc/mntent_r.c | 6 +++---
> + 2 files changed, 9 insertions(+), 3 deletions(-)
> +
> +diff --git a/misc/mntent_r.c b/misc/mntent_r.c
> +index 829750b..9598528 100644
> +--- a/misc/mntent_r.c
> ++++ b/misc/mntent_r.c
> +@@ -1,5 +1,5 @@
> + /* Utilities for reading/writing fstab, mtab, etc.
> +- Copyright (C) 1995-2000, 2001, 2002, 2003, 2006
> ++ Copyright (C) 1995-2000, 2001, 2002, 2003, 2006, 2010
> + Free Software Foundation, Inc.
> + This file is part of the GNU C Library.
> +
> +@@ -194,7 +194,7 @@ weak_alias (__getmntent_r, getmntent_r)
> + const char *rp = name; \
> + \
> + while (*rp != '\0') \
> +- if (*rp == ' ' || *rp == '\t' || *rp == '\\') \
> ++ if (*rp == ' ' || *rp == '\t' || *rp == '\n' || *rp == '\\') \
> + break; \
> + else \
> + ++rp; \
> +@@ -202,7 +202,7 @@ weak_alias (__getmntent_r, getmntent_r)
> + if (*rp != '\0') \
> + { \
> + /* In the worst case the length of the string can increase to \
> +- founr times the current length. */ \
> ++ four times the current length. */ \
> + char *wp; \
> + \
> + rp = name; \
> +--
> +1.7.2
> +
>
> ++++++ glibc-2.11-12-g24c0bf7-fedora.tar.bz2 (new)
>
> ++++++ glibc-2.11-12-g24c0bf7.tar.bz2 (new)
>
> ++++++ glibc-atom-memory-string-opt-tillto-20100226.patch (new)
> --- glibc-atom-memory-string-opt-tillto-20100226.patch
> +++ glibc-atom-memory-string-opt-tillto-20100226.patch
> +diff -Naurp glibc-2.11-12-g24c0bf7-ori/sysdeps/i386/i686/bcopy.S glibc-2.11-12-g24c0bf7-newpatch/sysdeps/i386/i686/bcopy.S
> +--- glibc-2.11-12-g24c0bf7-ori/sysdeps/i386/i686/bcopy.S 1969-12-31 19:00:00.000000000 -0500
> ++++ glibc-2.11-12-g24c0bf7-newpatch/sysdeps/i386/i686/bcopy.S 2010-03-02 04:02:14.000000000 -0500
> +@@ -0,0 +1,3 @@
> ++#define USE_AS_BCOPY
> ++#define memmove bcopy
> ++#include <sysdeps/i386/i686/memmove.S>
> +diff -Naurp glibc-2.11-12-g24c0bf7-ori/sysdeps/i386/i686/cacheinfo.c glibc-2.11-12-g24c0bf7-newpatch/sysdeps/i386/i686/cacheinfo.c
> +--- glibc-2.11-12-g24c0bf7-ori/sysdeps/i386/i686/cacheinfo.c 2009-11-12 11:46:19.000000000 -0500
> ++++ glibc-2.11-12-g24c0bf7-newpatch/sysdeps/i386/i686/cacheinfo.c 2010-03-02 04:02:14.000000000 -0500
> +@@ -1,3 +1,4 @@
> ++#define __x86_64_data_cache_size __x86_data_cache_size
> + #define __x86_64_data_cache_size_half __x86_data_cache_size_half
> + #define __x86_64_shared_cache_size __x86_shared_cache_size
> + #define __x86_64_shared_cache_size_half __x86_shared_cache_size_half
> +diff -Naurp glibc-2.11-12-g24c0bf7-ori/sysdeps/i386/i686/memcpy.S glibc-2.11-12-g24c0bf7-newpatch/sysdeps/i386/i686/memcpy.S
> +--- glibc-2.11-12-g24c0bf7-ori/sysdeps/i386/i686/memcpy.S 2009-11-12 11:46:19.000000000 -0500
> ++++ glibc-2.11-12-g24c0bf7-newpatch/sysdeps/i386/i686/memcpy.S 2010-03-02 04:02:14.000000000 -0500
> +@@ -32,11 +32,11 @@
> +
> + .text
> + #if defined PIC && !defined NOT_IN_libc
> +-ENTRY (__memcpy_chk)
> ++ENTRY_CHK (__memcpy_chk)
> + movl 12(%esp), %eax
> + cmpl %eax, 16(%esp)
> + jb HIDDEN_JUMPTARGET (__chk_fail)
> +-END (__memcpy_chk)
> ++END_CHK (__memcpy_chk)
> + #endif
> + ENTRY (BP_SYM (memcpy))
> + ENTER
> +diff -Naurp glibc-2.11-12-g24c0bf7-ori/sysdeps/i386/i686/memmove.S glibc-2.11-12-g24c0bf7-newpatch/sysdeps/i386/i686/memmove.S
> +--- glibc-2.11-12-g24c0bf7-ori/sysdeps/i386/i686/memmove.S 2009-11-12 11:46:19.000000000 -0500
> ++++ glibc-2.11-12-g24c0bf7-newpatch/sysdeps/i386/i686/memmove.S 2010-03-02 04:02:14.000000000 -0500
> +@@ -26,18 +26,27 @@
> +
> + #define PARMS LINKAGE+4 /* one spilled register */
> + #define RTN PARMS
> +-#define DEST RTN+RTN_SIZE
> +-#define SRC DEST+PTR_SIZE
> +-#define LEN SRC+PTR_SIZE
> +
> + .text
> +-#if defined PIC && !defined NOT_IN_libc
> +-ENTRY (__memmove_chk)
> ++
> ++#ifdef USE_AS_BCOPY
> ++# define SRC RTN+RTN_SIZE
> ++# define DEST SRC+PTR_SIZE
> ++# define LEN DEST+PTR_SIZE
> ++#else
> ++# define DEST RTN+RTN_SIZE
> ++# define SRC DEST+PTR_SIZE
> ++# define LEN SRC+PTR_SIZE
> ++
> ++# if defined PIC && !defined NOT_IN_libc
> ++ENTRY_CHK (__memmove_chk)
> + movl 12(%esp), %eax
> + cmpl %eax, 16(%esp)
> + jb HIDDEN_JUMPTARGET (__chk_fail)
> +-END (__memmove_chk)
> ++END_CHK (__memmove_chk)
> ++# endif
> + #endif
> ++
> + ENTRY (BP_SYM (memmove))
> + ENTER
> +
> +@@ -69,8 +78,10 @@ ENTRY (BP_SYM (memmove))
> + movsl
> + movl %edx, %esi
> + cfi_restore (esi)
> ++#ifndef USE_AS_BCOPY
> + movl DEST(%esp), %eax
> + RETURN_BOUNDED_POINTER (DEST(%esp))
> ++#endif
> +
> + popl %edi
> + cfi_adjust_cfa_offset (-4)
> +@@ -101,8 +112,10 @@ ENTRY (BP_SYM (memmove))
> + movsl
> + movl %edx, %esi
> + cfi_restore (esi)
> ++#ifndef USE_AS_BCOPY
> + movl DEST(%esp), %eax
> + RETURN_BOUNDED_POINTER (DEST(%esp))
> ++#endif
> +
> + cld
> + popl %edi
> +@@ -112,4 +125,6 @@ ENTRY (BP_SYM (memmove))
> + LEAVE
> + RET_PTR
> + END (BP_SYM (memmove))
> ++#ifndef USE_AS_BCOPY
> + libc_hidden_builtin_def (memmove)
> ++#endif
> +diff -Naurp glibc-2.11-12-g24c0bf7-ori/sysdeps/i386/i686/mempcpy.S glibc-2.11-12-g24c0bf7-newpatch/sysdeps/i386/i686/mempcpy.S
> +--- glibc-2.11-12-g24c0bf7-ori/sysdeps/i386/i686/mempcpy.S 2009-11-12 11:46:19.000000000 -0500
> ++++ glibc-2.11-12-g24c0bf7-newpatch/sysdeps/i386/i686/mempcpy.S 2010-03-02 04:02:14.000000000 -0500
> +@@ -32,11 +32,11 @@
> +
> + .text
> + #if defined PIC && !defined NOT_IN_libc
> +-ENTRY (__mempcpy_chk)
> ++ENTRY_CHK (__mempcpy_chk)
> + movl 12(%esp), %eax
> + cmpl %eax, 16(%esp)
> + jb HIDDEN_JUMPTARGET (__chk_fail)
> +-END (__mempcpy_chk)
> ++END_CHK (__mempcpy_chk)
> + #endif
> + ENTRY (BP_SYM (__mempcpy))
> + ENTER
> +diff -Naurp glibc-2.11-12-g24c0bf7-ori/sysdeps/i386/i686/memset.S glibc-2.11-12-g24c0bf7-newpatch/sysdeps/i386/i686/memset.S
> +--- glibc-2.11-12-g24c0bf7-ori/sysdeps/i386/i686/memset.S 2009-11-12 11:46:19.000000000 -0500
> ++++ glibc-2.11-12-g24c0bf7-newpatch/sysdeps/i386/i686/memset.S 2010-03-02 04:02:14.000000000 -0500
> +@@ -40,11 +40,11 @@
> +
> + .text
> + #if defined PIC && !defined NOT_IN_libc && !BZERO_P
> +-ENTRY (__memset_chk)
> ++ENTRY_CHK (__memset_chk)
> + movl 12(%esp), %eax
> + cmpl %eax, 16(%esp)
> + jb HIDDEN_JUMPTARGET (__chk_fail)
> +-END (__memset_chk)
> ++END_CHK (__memset_chk)
> + #endif
> + ENTRY (BP_SYM (memset))
> + ENTER
> +diff -Naurp glibc-2.11-12-g24c0bf7-ori/sysdeps/i386/i686/multiarch/bcopy.S glibc-2.11-12-g24c0bf7-newpatch/sysdeps/i386/i686/multiarch/bcopy.S
> +--- glibc-2.11-12-g24c0bf7-ori/sysdeps/i386/i686/multiarch/bcopy.S 1969-12-31 19:00:00.000000000 -0500
> ++++ glibc-2.11-12-g24c0bf7-newpatch/sysdeps/i386/i686/multiarch/bcopy.S 2010-03-02 04:02:14.000000000 -0500
> +@@ -0,0 +1,89 @@
> ++/* Multiple versions of bcopy
> ++ Copyright (C) 2010 Free Software Foundation, Inc.
> ++ Contributed by Intel Corporation.
> ++ This file is part of the GNU C Library.
> ++
> ++ The GNU C Library is free software; you can redistribute it and/or
> ++ modify it under the terms of the GNU Lesser General Public
> ++ License as published by the Free Software Foundation; either
> ++ version 2.1 of the License, or (at your option) any later version.
> ++
> ++ The GNU C Library is distributed in the hope that it will be useful,
> ++ but WITHOUT ANY WARRANTY; without even the implied warranty of
> ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> ++ Lesser General Public License for more details.
> ++
> ++ You should have received a copy of the GNU Lesser General Public
> ++ License along with the GNU C Library; if not, write to the Free
> ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> ++ 02111-1307 USA. */
> ++
> ++#include <sysdep.h>
> ++#include <init-arch.h>
> ++
> ++/* Define multiple versions only for the definition in lib. */
> ++#ifndef NOT_IN_libc
> ++# ifdef SHARED
> ++ .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax", at progbits
> ++ .globl __i686.get_pc_thunk.bx
> ++ .hidden __i686.get_pc_thunk.bx
> ++ .p2align 4
> ++ .type __i686.get_pc_thunk.bx, at function
> ++__i686.get_pc_thunk.bx:
> ++ movl (%esp), %ebx
> ++ ret
> ++
> ++ .text
> ++ENTRY(bcopy)
> ++ .type bcopy, @gnu_indirect_function
> ++ pushl %ebx
> ++ cfi_adjust_cfa_offset (4)
> ++ cfi_rel_offset (ebx, 0)
> ++ call __i686.get_pc_thunk.bx
> ++ addl $_GLOBAL_OFFSET_TABLE_, %ebx
> ++ cmpl $0, KIND_OFFSET+__cpu_features at GOTOFF(%ebx)
> ++ jne 1f
> ++ call __init_cpu_features
> ++1: leal __bcopy_ia32 at GOTOFF(%ebx), %eax
> ++ testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features at GOTOFF(%ebx)
> ++ jz 2f
> ++ leal __bcopy_ssse3 at GOTOFF(%ebx), %eax
> ++ testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features at GOTOFF(%ebx)
> ++ jz 2f
> ++ leal __bcopy_ssse3_rep at GOTOFF(%ebx), %eax
> ++2: popl %ebx
> ++ cfi_adjust_cfa_offset (-4)
> ++ cfi_restore (ebx)
> ++ ret
> ++END(bcopy)
> ++# else
> ++ .text
> ++ENTRY(bcopy)
> ++ .type bcopy, @gnu_indirect_function
> (12300 more lines skipped)
>
> ++++++ glibc-fedora.patch (new)
> --- glibc-fedora.patch
> +++ glibc-fedora.patch
> +--- glibc-2.11-12-g24c0bf7/ChangeLog
> ++++ glibc-2.11.90-1/ChangeLog
> +@@ -275,22 +275,6 @@ d2009-10-30 Ulrich Drepper <drepper at redhat.com>
> + * sysdeps/generic/netinet/ip.h: Define IPTOS_ENC* and IPTOS_DSCP*
> + macros. Patch by Philip Prindeville <philipp at redfish-solutions.com>.
> +
> +- [BZ #10840]
> +- * sysdeps/unix/sysv/linux/kernel-features.h: Define
> +- __ASSUME_F_GETOWN_EX.
> +- * sysdeps/unix/sysv/linux/fcntl.c: Implement F_GETOWN using F_GETOWN_EX
> +- if possible.
> +- * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.
> +-
> +- * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Define F_OWNER_*
> +- and f_owner_ex.
> +- * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.
> +- * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise.
> +- * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Likewise.
> +- * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
> +- * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise.
> +- * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
> +-
> + [BZ #10847]
> + * sysdeps/gnu/getutmp.c: Allow compatibility code to play around with
> + getutmpx symbol.
> +@@ -378,17 +362,6 @@ d2009-10-30 Ulrich Drepper <drepper at redhat.com>
> + * locale/C-time.c: Revert week-1stday back to 19971130 and set
> + first_weekday to 1 and first_workday to 2.
> +
> +-2009-10-01 Ulrich Drepper <drepper at redhat.com>
> +-
> +- * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Define F_SETOWN_EX and
> +- F_GETOWN_EX.
> +- * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.
> +- * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise.
> +- * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Likewise.
> +- * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
> +- * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise.
> +- * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
> +-
> + 2009-09-28 Andreas Schwab <schwab at redhat.com>
> +
> + * stdio-common/printf_fp.c: Check for and avoid integer overflows.
> +@@ -1046,6 +1019,11 @@ d2009-10-30 Ulrich Drepper <drepper at redhat.com>
> + * sysdeps/generic/ldsodefs.h (struct rtld_global): The map element in
> + the unique symbol hash table should not be const.
> +
> ++2009-07-22 Jakub Jelinek <jakub at redhat.com>
> ++
> ++ * Makeconfig (ASFLAGS): Append $(sysdep-ASFLAGS).
> ++ * sysdeps/i386/Makefile (sysdep-ASFLAGS): Add -U__i686.
> ++
> + 2009-07-21 Ulrich Drepper <drepper at redhat.com>
> +
> + * sysdeps/x86_64/multiarch/strstr.c: Minor cleanups. Remove
> +@@ -1311,6 +1289,11 @@ d2009-10-30 Ulrich Drepper <drepper at redhat.com>
> + out common code into new function get_common_indeces. Determine
> + extended family and model for Intel processors.
> +
> ++2009-06-26 Andreas Schwab <aschwab at redhat.com>
> ++
> ++ * timezone/zic.c (stringzone): Don't try to generate a POSIX TZ
> ++ string when the timezone ends in DST.
> ++
> + 2009-06-26 Ulrich Drepper <drepper at redhat.com>
> +
> + * resolv/resolv.h: Define RES_SNGLKUPREOP.
> +@@ -10004,6 +9987,10 @@ d2009-10-30 Ulrich Drepper <drepper at redhat.com>
> + [BZ #4368]
> + * stdlib/stdlib.h: Remove obsolete part of comment for realpath.
> +
> ++2007-04-16 Jakub Jelinek <jakub at redhat.com>
> ++
> ++ * locale/programs/locarchive.c (add_alias, insert_name): Remove static.
> ++
> + 2007-04-16 Ulrich Drepper <drepper at redhat.com>
> +
> + [BZ #4364]
> +@@ -11261,6 +11248,15 @@ d2009-10-30 Ulrich Drepper <drepper at redhat.com>
> + separators also if no non-zero digits found.
> + * stdlib/Makefile (tests): Add tst-strtod3.
> +
> ++2006-12-10 Jakub Jelinek <jakub at redhat.com>
> ++
> ++ * sysdeps/unix/sysv/linux/netlinkaccess.h: Include linux/if_addr.h
> ++ if IFA_MAX is not defined.
> ++ (IFA_RTA, IFA_PAYLOAD, IFLA_RTA, IFLA_PAYLOAD): Define if not
> ++ defined.
> ++ * sysdeps/unix/sysv/linux/check_pf.c: Include netlinkaccess.h
> ++ instead of asm/types.h, linux/netlink.h and linux/rtnetlink.h.
> ++
> + 2006-12-09 Ulrich Drepper <drepper at redhat.com>
> +
> + [BZ #3632]
> +--- glibc-2.11-12-g24c0bf7/ChangeLog.15
> ++++ glibc-2.11.90-1/ChangeLog.15
> +@@ -477,6 +477,14 @@
> +
> + 2004-11-26 Jakub Jelinek <jakub at redhat.com>
> +
> ++ * posix/Makefile (generated: Add getconf.speclist.
> ++ ($(inst_libexecdir)/getconf): Use getconf.speclist instead of
> ++ getconf output.
> ++ ($(objpfx)getconf.speclist): New rule.
> ++ * posix/getconf.speclist.h: New file.
> ++
> ++2004-11-26 Jakub Jelinek <jakub at redhat.com>
> ++
> + * sysdeps/generic/unsecvars.h (UNSECURE_ENVVARS): Add GETCONF_DIR.
> +
> + 2004-11-26 Kaz Kojima <kkojima at rr.iij4u.or.jp>
> +@@ -1103,6 +1111,13 @@
> + * sysdeps/generic/tempname.c (__path_search): Add missing argument
> + TRY_TMPDIR.
> +
> ++2004-11-02 Jakub Jelinek <jakub at redhat.com>
> ++
> ++ * include/features.h (__USE_FORTIFY_LEVEL): Also set for Red Hat
> ++ GCC 3.4.x-RH >= 3.4.2-8.
> ++ * debug/tst-chk1.c (do_test): Deal with GCC 3.4.x-RH not
> ++ being able to recognize subobjects.
> ++
> + 2004-10-31 Mariusz Mazur <mmazur at kernel.pl>
> +
> + * sysdeps/unix/sysv/linux/alpha/setregid.c: New file.
> +@@ -1443,6 +1458,11 @@
> + * sysdeps/generic/readonly-area.c (__readonly_str): Renamed to ...
> + (__readonly_area): ... this.
> +
> ++2004-10-19 Jakub Jelinek <jakub at redhat.com>
> ++
> ++ * include/features.h (__USE_FORTIFY_LEVEL): Enable even with
> ++ Red Hat gcc4 4.0.0 and above.
> ++
> + 2004-10-18 Jakub Jelinek <jakub at redhat.com>
> +
> + * sysdeps/generic/strcpy_chk.c (__strcpy_chk): Speed up by checking
> +@@ -3182,6 +3202,23 @@
> + before return type.
> + * locale/localename.c (__current_locale_name): Likewise.
> +
> ++2004-08-31 Jakub Jelinek <jakub at redhat.com>
> ++
> ++ * elf/ldconfig.c (parse_conf): Add prefix argument, prepend it
> ++ before arguments to add_dir and pass to parse_conf_include.
> ++ (parse_conf_include): Add prefix argument, pass it down to
> ++ parse_conf.
> ++ (main): Call arch_startup. Adjust parse_conf caller.
> ++ Call add_arch_dirs.
> ++ * sysdeps/generic/dl-cache.h (arch_startup, add_arch_dirs): Define.
> ++ * sysdeps/unix/sysv/linux/i386/dl-cache.h: New file.
> ++ * sysdeps/unix/sysv/linux/ia64/dl-cache.h (EMUL_HACK, arch_startup,
> ++ add_arch_dirs): Define.
> ++ * sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed: Prepend
> ++ /emul/ia32-linux before the 32-bit ld.so pathname.
> ++ * sysdeps/unix/sysv/linux/ia64/dl-procinfo.c: New file.
> ++ * sysdeps/unix/sysv/linux/ia64/dl-procinfo.h: New file.
> ++
> + 2004-08-30 Roland McGrath <roland at frob.com>
> +
> + * scripts/extract-abilist.awk: If `lastversion' variable defined, omit
> +--- glibc-2.11-12-g24c0bf7/ChangeLog.16
> ++++ glibc-2.11.90-1/ChangeLog.16
> +@@ -2042,6 +2042,9 @@
> + (__MATHDECL_2): Use __REDIRECT_NTH instead of __REDIRECT
> + followed by __THROW.
> +
> ++ * sysdeps/unix/sysv/linux/futimesat.c (futimesat): If
> ++ file == NULL, use __futimes unconditionally.
> ++
> + 2006-02-02 Ulrich Drepper <drepper at redhat.com>
> +
> + * sysdeps/unix/sysv/linux/futimesat.c [__NR_futimesat]
> +@@ -2101,6 +2104,11 @@
> + * sysdeps/ieee754/ldbl-128/s_llrintl.c (__llrintl): Fix a typo.
> + * sysdeps/s390/fpu/libm-test-ulps: Remove llrint ulps.
> +
> ++2006-01-30 Jakub Jelinek <jakub at redhat.com>
> ++
> ++ * include/bits/stdlib-ldbl.h: New file.
> ++ * include/bits/wchar-ldbl.h: New file.
> ++
> + 2006-01-19 Thomas Schwinge <tschwinge at gnu.org>
> +
> + * libio/genops.c: Include <stdbool.h>.
> +@@ -8922,6 +8930,12 @@
> + * argp/argp-help.c (__argp_error): __asprintf -> vasprintf.
> + (__argp_failure): Likewise.
> +
> ++2005-08-08 Jakub Jelinek <jakub at redhat.com>
> ++
> ++ * sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_setup_stack_chk_guard):
> ++ Shift marked &errno down on big-endian instead of up.
> ++ * elf/tst-stackguard1.c (do_test): Fix a typo.
> ++
> + 2005-08-08 Ulrich Drepper <drepper at redhat.com>
> +
> + * nscd/cache.c (cache_add): Commit hash table and header to disk.
> (2371 more lines skipped)
>
> ++++++ glibc-ports-2.12-9f99a41.tar.bz2 -> glibc-ports-2.11.tar.bz2
> --- ChangeLog
> +++ ChangeLog
> @@ -1,11 +1,3 @@
> -2010-04-14 Joseph Myers <joseph at codesourcery.com>
> -
> - * libc-abis: Remove.
> -
> -2010-04-06 Joseph Myers <joseph at codesourcery.com>
> -
> - * libc-abis: New.
> -
> 2006-03-06 Roland McGrath <roland at redhat.com>
>
> * Makefile (%.bz2, %.gz): New pattern rules.
> --- ChangeLog.alpha
> +++ ChangeLog.alpha
> @@ -1,155 +1,3 @@
> -2010-05-03 Aurelien Jarno <aurelien at aurel32.net>
> -
> - * sysdeps/alpha/memchr.S: Use prefetch load.
> - * sysdeps/alpha/alphaev6/memchr.S: Likewise.
> -
> -2010-05-03 Aurelien Jarno <aurelien at aurel32.net>
> -
> - [BZ #6827]
> - * sysdeps/alpha/dl-machine.h: Add dl-procinfo support.
> - * sysdeps/alpha/dl-procinfo.c: New.
> - * sysdeps/alpha/dl-procinfo.h: New.
> -
> -2010-05-03 Aurelien Jarno <aurelien at aurel32.net>
> -
> - [BZ #5350]
> - * sysdeps/alpha/fpu/s_ceil.c: Fix corner cases.
> - * sysdeps/alpha/fpu/s_ceilf.c: Likewise.
> - * sysdeps/alpha/fpu/s_floor.c: Likewise.
> - * sysdeps/alpha/fpu/s_floorf.c: Likewise.
> - * sysdeps/alpha/fpu/s_rint.c: Likewise.
> - * sysdeps/alpha/fpu/s_rintf.c: Likewise.
> -
> -2010-05-03 GOTO Masanori <gotom at debian.or.jp>
> -
> - [BZ #1026]
> - * sysdeps/unix/sysv/linux/alpha/kernel-features.h: Define
> - __ASSUME_STAT64_SYSCALL.
> - * sysdeps/unix/sysv/linux/alpha/fxstat.c: Check
> - __ASSUME_STAT64_SYSCALL.
> - * sysdeps/unix/sysv/linux/alpha/fxstatat.c: Likewise.
> - * sysdeps/unix/sysv/linux/alpha/lxstat.c: Likewise.
> - * sysdeps/unix/sysv/linux/alpha/xstat.c: Likewise.
> - * sysdeps/unix/sysv/linux/alpha/xstatconv.c: Don't define
> - __libc_missing_axp_stat64 when it's not needed.
> - * sysdeps/unix/sysv/linux/alpha/xstatconv.h: Likewise.
> -
> -2010-03-30 Richard Henderson <rth at redhat.com>
> -
> - * sysdeps/unix/sysv/linux/alpha/bits/socket.h (MSG_WAITFORONE): New.
> -
> -2010-03-30 Matt Turner <mattst88 at gmail.com>
> -
> - * sysdeps/unix/sysv/linux/alpha/kernel-features.h: New.
> -
> -2010-03-26 Richard Henderson <rth at redhat.com>
> -
> - * sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S: New.
> -
> -2010-03-26 Richard Henderson <rth at redhat.com>
> -
> - * sysdeps/unix/sysv/linux/alpha/Versions: Update errlist-compat
> - for GLIBC_2.12.
> -
> -2010-03-26 Richard Henderson <rth at redhat.com>
> -
> - * sysdeps/alpha/fpu/fegetenv.c: Add hidden alias.
> -
> -2010-03-26 Richard Henderson <rth at redhat.com>
> -
> - * sysdeps/unix/sysv/linux/alpha/dl-auxv.h (__libc_alpha_cache_shape):
> - Define extern here; move definition...
> - * sysdeps/unix/sysv/linux/alpha/dl-sysdep.c: ... here.
> -
> -2010-03-26 Richard Henderson <rth at redhat.com>
> -
> - * sysdeps/unix/sysv/linux/alpha/sys/user.h: Don't include asm/page.h.
> - (PAGE_SHIFT, PAGE_SIZE, PAGE_MASK): Define.
> -
> -2010-03-26 Richard Henderson <rth at redhat.com>
> -
> - * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (F_SETOWN_EX,
> - F_GETOWN_EX, F_OWNER_TID, F_OWNER_PID, F_OWNER_PGRP,
> - F_OWNER_GID, struct f_owner_ex): Define.
> - (F_SETOWN, F_GETOWN): Define with XPG7.
> -
> -2010-03-26 Richard Henderson <rth at redhat.com>
> -
> - * sysdeps/unix/alpha/sysdep.h (PTR_MANGLE): Define for !PIC too.
> - (PTR_DEMANGLE): Likewise.
> -
> -2010-03-26 Richard Henderson <rth at redhat.com>
> -
> - * sysdeps/unix/alpha/sysdep.h (INTERNAL_SYSCALL_ERROR_P,
> - INTERNAL_SYSCALL_ERRNO): "Use" the "other" variable in each macro.
> -
> -2010-03-26 Richard Henderson <rth at redhat.com>
> -
> - * sysdep/unix/sysv/linux/alpha/creat.c: New.
> -
> -2010-03-26 Richard Henderson <rth at redhat.com>
> -
> - * sysdep/alpha/elf/configure.in (libc_cv_alpha_hidden_gprel)
> - Adjust the test for gcc 4.5.
> - * sysdep/alpha/elf/configure: Rebuild.
> -
> -2010-03-26 Richard Henderson <rth at redhat.com>
> -
> - * sysdeps/alpha/bits/atomic.h (__arch_exchange_8_int,
> - __arch_exchange_16_int, __arch_exchange_32_int,
> - __arch_exchange_64_int, __arch_exchange_and_add_32_int,
> - __arch_exchange_and_add_64_int): Use __typeof to get the
> - return type correct without warning.
> -
> -2010-03-23 Matt Turner <mattst88 at gmail.com>
> - Aurelien Jarno <aurelien at aurel32.net>
> -
> - * sysdeps/unix/sysv/linux/alpha/bits/socket.h: New file.
> -
> -2010-01-12 Matt Turner <mattst88 at gmail.com>
> -
> - * sysdeps/unix/sysv/linux/alpha/bits/stat.h: Fix double-inclusion
> - problem.
> -
> -2010-01-12 Matt Turner <mattst88 at gmail.com>
> -
> - * sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Define
> - SA_RESTART, SA_NODEFER and SA_RESETHAND if __USE_XOPEN2K8.
> -
> -2010-01-12 Matt Turner <mattst88 at gmail.com>
> -
> - * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Define O_DIRECTORY,
> - O_NOFOLLOW, O_CLOEXEC, F_DUPFD_CLOEXEC, F_SETOWN, and F_GETOWN for
> - XPG7.
> - * sysdeps/unix/sysv/linux/alpha/bits/stat.h: Enable using from
> - fcntl.h.
> -
> -2010-01-12 Matt Turner <mattst88 at gmail.com>
> -
> - * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Redefine O_SYNC and
> - O_DSYNC to match 2.6.33+ kernels.
> -
> -2009-12-02 Mike Frysinger <vapier at gentoo.org>
> -
> - * sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c: Fix typo in
> - include timer_gettime.c -> timer_settime.c.
> -
> -2009-11-23 Matt Turner <mattst88 at gmail.com>
> -
> - * sysdeps/unix/sysv/linux/alpha/bits/stat.h: Use struct timespec
> - for timestamps also if __USE_XOPEN2K8.
> -
> -2009-11-23 Matt Turner <mattst88 at gmail.com>
> -
> - * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Change misleading
> - names of parameters of sync_file_range.
> -
> -2009-11-23 Matt Turner <mattst88 at gmail.com>
> -
> - [BZ #10972]
> - * sysdeps/unix/sysv/linux/alpha/bits/mman.h: Add new MADV_*
> - constants from recent kernels.
> -
> 2009-11-10 Matt Turner <mattst88 at gmail.com>
>
> [BZ #10609]
> --- ChangeLog.arm
> +++ ChangeLog.arm
> @@ -1,114 +1,3 @@
> -2010-04-08 Daniel Jacobowitz <dan at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S: New file.
> - * sysdeps/unix/sysv/linux/arm/eabi/sysdep.h [__thumb__]
> - (INTERNAL_SYSCALL_RAW): Rewrite to use __libc_do_syscall.
> - * sysdeps/unix/sysv/linux/arm/eabi/Makefile: Add libc-do-syscall
> - to libraries and tests that require it.
> - * sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h: Delete.
> -
> -2010-03-30 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/arm/dl-machine.h (VALID_ELF_ABIVERSION, VALID_ELF_OSABI,
> - VALID_ELF_HEADER): Remove.
> - * sysdeps/unix/sysv/linux/arm/ldsodefs.h: New.
> -
> -2010-03-26 Thomas Schwinge <thomas at codesourcery.com>
> -
> - * sysdeps/arm/configure.in: New file.
> - * sysdeps/arm/configure: Generate.
> - * sysdeps/arm/sysdep.h (ENTRY, END): Add CFI statements.
> - * sysdeps/unix/arm/sysdep.S (__syscall_error): Likewise.
> - * sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
> - (PSEUDO, DOCARGS_0, RESTORE_LR_0, DOCARGS_1, UNDOCARGS_1, DOCARGS_2)
> - (UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3, DOCARGS_4, UNDOCARGS_4)
> - (DOCARGS_5, UNDOCARGS_5, RESTORE_LR_5, DOCARGS_6, UNDOCARGS_6):
> - Likewise.
> - [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
> - * sysdeps/unix/sysv/linux/arm/eabi/sysdep.h (DO_CALL): Likewise.
> - * sysdeps/unix/sysv/linux/arm/sysdep.h
> - (POP_PC, SYSCALL_ERROR_HANDLER (__local_syscall_error))
> - (DOARGS_5, UNDOARGS_5, DOARGS_6, UNDOARGS_6, DOARGS_7, UNDOARGS_7):
> - Likewise.
> - * sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
> - (__default_sa_restorer_v1, __default_sa_restorer_v2)
> - (__default_rt_sa_restorer_v1, __default_rt_sa_restorer_v2): Add END
> - statements.
> - * sysdeps/unix/sysv/linux/arm/eabi/syscall.S (syscall): Add CFI
> - statements.
> - * sysdeps/arm/memcpy.S (memcpy): Add CFI statements.
> - * sysdeps/arm/memmove.S (memmove): Likewise.
> - * sysdeps/unix/sysv/linux/arm/eabi/mmap64.S (__mmap64): Add CFI
> - statements.
> - * sysdeps/unix/sysv/linux/arm/mmap.S (__mmap): Likewise.
> - * sysdeps/arm/eabi/arm-mcount.S (__gnu_mcount_nc, _mcount): Add CFI
> - statements.
> - * sysdeps/arm/sysdep.h (CALL_MCOUNT): Likewise.
> - * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
> - (_Unwind_Resume): Add CFI statements.
> - * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
> - (_Unwind_Resume): Likewise.
> - * sysdeps/arm/dl-trampoline.S (_dl_runtime_resolve)
> - (_dl_runtime_profile) <CFI>: Only emit .debug_frame.
> - * sysdeps/arm/eabi/__longjmp.S (__longjmp): Add CFI statements.
> - * sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S (CALL_FAIL)
> - (CHECK_SP): Likewise
> - * sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S (SAVE_PID): Add CFI
> - statements.
> - * sysdeps/unix/sysv/linux/arm/nptl/vfork.S (SAVE_PID): Likewise.
> - * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Add CFI statements.
> - * sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S (cfi_startproc):
> - Redefine for signal frames.
> - (__default_sa_restorer_v1, __default_sa_restorer_v2)
> - (__default_rt_sa_restorer_v1, __default_rt_sa_restorer_v2): Add CFI
> - statements.
> -
> -2010-02-10 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/arm/eabi/fegetenv.c, sysdeps/arm/fpu/fegetenv.c: Add
> - hidden alias.
> -
> -2010-01-10 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define O_DIRECTORY,
> - O_NOFOLLOW, O_CLOEXEC, F_DUPFD_CLOEXEC, F_SETOWN, and F_GETOWN for
> - XPG7.
> -
> -2009-12-16 Thomas Schwinge <thomas at codesourcery.com>
> -
> - * sysdeps/arm/eabi/Makefile [gmon] (sysdep_routines): Add arm-mcount.
> - * sysdeps/arm/eabi/machine-gmon.h (mcount_internal): Define to
> - `__mcount_internal'.
> - (MCOUNT (__gnu_mcount_nc), OLD_MCOUNT (_mcount), mcount): Move to...
> - * sysdeps/arm/eabi/arm-mcount.S: ... this new file as __gnu_mcount_nc,
> - _mcount, and mcount, respectively.
> -
> -2009-12-15 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Redefine O_SYNC and
> - O_DSYNC to match 2.6.33+ kernels.
> -
> -2009-11-19 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Introduce new symbol
> - F_OWNER_PGRP and mark F_OWNER_GID obsolete.
> -
> -2009-11-19 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PSELECT,
> - __ASSUME_PPOLL): Don't undefine for kernel 2.6.32 and later.
> -
> -2009-11-18 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Change misleading
> - names of parameters of sync_file_range.
> -
> -2009-11-17 Joseph Myers <joseph at codesourcery.com>
> -
> - [BZ #10972]
> - * sysdeps/unix/sysv/linux/arm/bits/mman.h: Add new MADV_*
> - constants from recent kernels.
> -
> 2009-11-14 Joseph Myers <joseph at codesourcery.com>
>
> * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_SETOWN_EX,
> --- ChangeLog.hppa
> +++ ChangeLog.hppa
> @@ -1,60 +1,3 @@
> -2010-03-30 Carlos O'Donell <carlos at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/hppa/bits/socket.h: Define
> - MSG_WAITFORONE.
> -
> -2010-02-17 Matt Turner <mattst88 at gmail.com>
> -
> - * sysdeps/unix/sysv/linux/hppa/bits/socket.h: Actually fix
> - SOCK_CLOEXEC to match O_CLOEXEC.
> -
> -2010-02-02 Carlos O'Donell <carlos at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/hppa/bits/mman.h: Define
> - MADV_MERGEABLE and MADV_UNMERGEABLE.
> -
> -2010-02-02 Carlos O'Donell <carlos at codesourcery.com>
> -
> - * sysdeps/hppa/nptl/tls.h (__set_cr27): Clobber
> - link register r31.
> -
> -2010-02-02 Carlos O'Donell <carlos at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/hppa/makecontext.c (__makecontext):
> - Support more than 8 arguments.
> -
> -2010-02-01 Kyle McMartin <kyle at redhat.com>
> -
> - * sysdeps/unix/sysv/linux/hppa/bits/socket.h: Fix value of
> - SOCK_CLOEXEC to match O_CLOEXEC.
> -
> -2010-02-01 Carlos O'Donell <carlos at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/hppa/Versions: Bump
> - errlist-compat to 257 for GLIBC_2.12.
> - * sysdeps/unix/sysv/linux/hppa/bits/errno.h
> - (EOWNERDEAD): Define if not already defined.
> - (ENOTRECOVERABLE): Likewise.
> - (ERFKILL): Likewise.
> -
> -2009-11-29 Carlos O'Donell <carlos at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h:
> - Rearrange file to reduce future maintenance.
> - [__USE_GNU]: Update F_GETOWN_EX, and F_SETOWN_EX.
> - Define f_owner_ex an __pid_type.
> -
> -2009-11-25 Carlos O'Donell <carlos at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h:
> - Use correct alignment for pthread_mutex_t, pthread_cond_t,
> - and pthread_rwlock_t.
> -
> -2009-11-22 Carlos O'Donell <carlos at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Avoid warnings
> - by casting oldval to int.
> -
> 2009-11-15 Carlos O'Donell <carlos at codesourcery.com>
>
> [BZ #6676]
> --- ChangeLog.m68k
> +++ ChangeLog.m68k
> @@ -1,123 +1,3 @@
> -2010-03-13 Andreas Schwab <schwab at linux-m68k.org>
> -
> - * sysdeps/m68k/m680x0/fpu/s_ccosh.c: Use signbit macro.
> - * sysdeps/m68k/m680x0/fpu/s_ccos.c: Likewise.
> -
> - * sysdeps/m68k/m680x0/fpu/bits/mathinline.h (__signbit)
> - (__signbitf, __signbitl): Always define as inline.
> -
> - * sysdeps/unix/sysv/linux/m68k/sysdep.h (SYSCALL_ERROR_HANDLER):
> - Add variant for USE__THREAD.
> -
> -2010-03-12 Andreas Schwab <schwab at linux-m68k.org>
> -
> - * sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h: Don't include
> - <sysdep.h>.
> -
> - * sysdeps/unix/sysv/linux/m68k/m68k-helpers.S: Renamed ...
> - * sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S: ... to
> - this.
> - * sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S: New file.
> -
> -2010-03-09 Maxim Kuvyrkov <maxim at codesourcery.com>
> -
> - NPTL support for m68k/ColdFire
> - * sysdeps/unix/sysv/linux/m68k/sysdep.h (tls.h): Include.
> - (INTERNAL_SYSCALL): Convert to INTERNAL_SYSCALL_NCS.
> - (PTR_MANGLE, PTR_DEMANGLE): Define.
> - (NEED_STATIC_SYSINFO_DSO): Define.
> - * sysdeps/unix/sysv/linux/m68k/clone.S: Support RESET_PID.
> - * sysdeps/unix/sysv/linux/m68k/m68k-helpers.S: New.
> - * sysdeps/unix/sysv/linux/m68k/Makefile: Add new files to lists.
> - * sysdeps/unix/sysv/linux/m68k/vfork.S: Add SAVE_PID/RESTORE_PID.
> - * sysdeps/unix/sysv/linux/m68k/m68k-vdso.c: New.
> - * sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c: New.
> - * sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h: New.
> - * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h: New.
> - * sysdeps/unix/sysv/linux/m68k/Versions: Add symbols for NPTL support.
> - * sysdeps/unix/sysv/linux/m68k/init-first.c: New.
> - * sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h: New.
> - * sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h: New.
> - * sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h: New.
> - * sysdeps/unix/sysv/linux/m68k/nptl/clone.S: New.
> - * sysdeps/unix/sysv/linux/m68k/nptl/fork.c: New.
> - * sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h: New.
> - * sysdeps/unix/sysv/linux/m68k/nptl/vfork.S: New.
> - * sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S: New.
> - * sysdeps/unix/sysv/linux/m68k/nptl/createthread.c: New.
> - * sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c: New.
> - * sysdeps/unix/sysv/linux/m68k/socket.S: Update cancelation code.
> - * sysdeps/m68k/dl-tls.h: New.
> - * sysdeps/m68k/libc-tls.c: New.
> - * sysdeps/m68k/tls-macros.h: New.
> - * sysdeps/m68k/dl-machine.h (RTLD_START): Terminate stack frame to
> - generate better backtraces.
> - (elf_machine_type_class, elf_machine_rela): Handle TLS relocations.
> - * sysdeps/m68k/dl-machine.h: Handle TLS relocations.
> - * sysdeps/m68k/nptl/tcb-offsets.sym: New.
> - * sysdeps/m68k/nptl/pthread_spin_trylock.c: New.
> - * sysdeps/m68k/nptl/tls.h: New.
> - * sysdeps/m68k/nptl/pthread_spin_lock.c: New.
> - * sysdeps/m68k/nptl/pthreaddef.h: New.
> - * sysdeps/m68k/nptl/Makefile: New.
> -
> - * sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h: Remove.
> - * sysdeps/unix/sysv/linux/m68k/register-dump.h: Update.
> -
> - * sysdeps/unix/sysv/linux/m68k/bits/siginfo.h: Remove.
> -
> - * sysdeps/m68k/jmpbuf-unwind.h (_JMPBUF_CFA_UNWINDS_ADJ)
> - (_jmpbuf_sp, _JMPBUF_UNWINDS_ADJ, __libc_unwind_longjmp): Define.
> -
> -2010-02-10 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/m68k/fpu/fegetenv.c: Add hidden alias.
> -
> -2010-01-11 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/m68k/bits/stat.h: Fix double-inclusion
> - problem.
> -
> -2010-01-10 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Define O_DIRECTORY,
> - O_NOFOLLOW, O_CLOEXEC, F_DUPFD_CLOEXEC, F_SETOWN, and F_GETOWN for
> - XPG7.
> - * sysdeps/unix/sysv/linux/m68k/bits/stat.h: Enable using from
> - fcntl.h.
> -
> -2009-12-16 Joseph Myers <joseph at codesourcery.com>
> -
> - [BZ #11093]
> - * sysdeps/unix/sysv/linux/m68k/bits/poll.h: Define POLLRDNORM,
> - POLLRDBAND, POLLWRNORM, and POLLWRBAND also for POSIX 2008.
> -
> -2009-12-16 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Redefine O_SYNC and
> - O_DSYNC to match 2.6.33+ kernels.
> -
> -2009-11-23 Andreas Schwab <schwab at linux-m68k.org>
> -
> - * sysdeps/unix/sysv/linux/m68k/bits/stat.h: Use struct timespec
> - for timestamps also if __USE_XOPEN2K8.
> -
> -2009-11-19 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Introduce new symbol
> - F_OWNER_PGRP and mark F_OWNER_GID obsolete.
> -
> -2009-11-18 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Change misleading
> - names of parameters of sync_file_range.
> -
> -2009-11-17 Joseph Myers <joseph at codesourcery.com>
> -
> - [BZ #10972]
> - * sysdeps/unix/sysv/linux/m68k/bits/mman.h: Add new MADV_*
> - constants from recent kernels.
> -
> 2009-11-15 Andreas Schwab <schwab at linux-m68k.org>
>
> * sysdeps/m68k/libgcc_s.h: New file.
> --- ChangeLog.mips
> +++ ChangeLog.mips
> @@ -1,119 +1,3 @@
> -2010-04-14 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/mips/libc-abis: New.
> -
> -2010-04-06 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/mips/dl-machine.h (VALID_ELF_ABIVERSION,
> - VALID_ELF_OSABI, VALID_ELF_HEADER): Remove.
> - * sysdeps/unix/sysv/linux/mips/ldsodefs.h (VALID_ELF_ABIVERSION):
> - Define.
> -
> -2010-03-30 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/mips/bits/socket.h: Define
> - MSG_WAITFORONE.
> -
> -2010-03-24 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/mips/dl-lookup.c: Update from generic version.
> -
> -2010-03-23 Mischa Jonker <mischa.jonker at viragelogic.com>
> -
> - [BZ #11291]
> - * sysdeps/mips/bits/atomic.h
> - (__arch_compare_and_exchange_xxx_32_int,
> - __arch_compare_and_exchange_xxx_64_int,
> - __arch_exchange_xxx_32_int, __arch_exchange_xxx_64_int,
> - __arch_exchange_and_add_32_int, __arch_exchange_and_add_64_int):
> - Specify *mem as asm output as well as input.
> -
> -2010-02-10 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/mips/fpu/fegetenv.c: Add hidden alias.
> -
> -2010-01-28 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/mips/dl-trampoline.c (_dl_runtime_resolve,
> - _dl_runtime_pltresolve): Calculate offset from start of function
> - to .cpload instead of hardcoding instruction size.
> -
> -2010-01-11 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/mips/bits/stat.h: Fix double-inclusion
> - problem.
> -
> -2010-01-11 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Define
> - SA_RESTART, SA_NODEFER and SA_RESETHAND if __USE_XOPEN2K8.
> -
> -2010-01-10 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define O_DIRECTORY,
> - O_NOFOLLOW, O_CLOEXEC, F_DUPFD_CLOEXEC, F_SETOWN, and F_GETOWN for
> - XPG7.
> - * sysdeps/unix/sysv/linux/mips/bits/stat.h: Enable using from
> - fcntl.h.
> -
> -2009-12-16 Joseph Myers <joseph at codesourcery.com>
> -
> - [BZ #11093]
> - * sysdeps/unix/sysv/linux/mips/bits/poll.h: Define POLLRDNORM,
> - POLLRDBAND, POLLWRNORM, and POLLWRBAND also for POSIX 2008.
> -
> -2009-12-16 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/mips/dl-lookup.c: Update from generic version.
> -
> -2009-12-15 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Redefine O_SYNC and
> - O_DSYNC to match 2.6.33+ kernels.
> -
> -2009-12-09 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/mips/bits/socket.h: Define mmsghdr and
> - declare recvmmsg.
> -
> -2009-12-01 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
> - (posix_fadvise): Remove.
> - * sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c,
> - sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c,
> - sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c: New.
> -
> -2009-12-01 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/mips/dl-lookup.c: Update from generic version.
> -
> -2009-11-23 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/mips/bits/stat.h: Use struct timespec
> - for timestamps also if __USE_XOPEN2K8.
> -
> -2009-11-19 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Introduce new symbol
> - F_OWNER_PGRP and mark F_OWNER_GID obsolete.
> -
> -2009-11-18 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Change misleading
> - names of parameters of sync_file_range.
> -
> -2009-11-17 Joseph Myers <joseph at codesourcery.com>
> -
> - [BZ #10972]
> - * sysdeps/unix/sysv/linux/mips/bits/mman.h: Add new MADV_*
> - constants from recent kernels.
> -
> -2009-11-17 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/unix/sysv/linux/mips/bits/errno.h (ERFKILL): Define if
> - not already defined.
> -
> 2009-11-14 Joseph Myers <joseph at codesourcery.com>
>
> * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (F_SETOWN_EX,
> --- ChangeLog.powerpc
> +++ ChangeLog.powerpc
> @@ -1,7 +1,3 @@
> -2010-02-10 Joseph Myers <joseph at codesourcery.com>
> -
> - * sysdeps/powerpc/nofpu/fegetenv.c: Add hidden alias.
> -
> 2008-08-19 Joseph Myers <joseph at codesourcery.com>
>
> * sysdeps/powerpc/nofpu/shlib-versions: New.
> --- sysdeps/alpha/alphaev6/memchr.S
> +++ sysdeps/alpha/alphaev6/memchr.S
> @@ -127,7 +127,7 @@
> cmpbge $31, $1, $2 # E :
> bne $2, $found_it # U :
> # At least one byte left to process.
> - ldq $31, 8($0) # L :
> + ldq $1, 8($0) # L :
> subq $5, 1, $18 # E : U L U L
>
> addq $0, 8, $0 # E :
> @@ -143,38 +143,38 @@
> and $4, 8, $4 # E : odd number of quads?
> bne $4, $odd_quad_count # U :
> # At least three quads remain to be accessed
> - nop # E : L U L U : move prefetched value to correct reg
> + mov $1, $4 # E : L U L U : move prefetched value to correct reg
>
> .align 4
> $unrolled_loop:
> - ldq $1, 0($0) # L : load quad
> - xor $17, $1, $2 # E :
> - ldq $31, 8($0) # L : prefetch next quad
> - cmpbge $31, $2, $2 # E : U L U L
> + ldq $1, 8($0) # L : prefetch $1
> + xor $17, $4, $2 # E :
> + cmpbge $31, $2, $2 # E :
> + bne $2, $found_it # U : U L U L
>
> - bne $2, $found_it # U :
> addq $0, 8, $0 # E :
> nop # E :
> nop # E :
> + nop # E :
>
> $odd_quad_count:
> - ldq $1, 0($0) # L : load quad
> xor $17, $1, $2 # E :
> - ldq $31, 8($0) # L : prefetch $4
> + ldq $4, 8($0) # L : prefetch $4
> cmpbge $31, $2, $2 # E :
> -
> addq $0, 8, $6 # E :
> +
> bne $2, $found_it # U :
> cmpult $6, $18, $6 # E :
> addq $0, 8, $0 # E :
> + nop # E :
>
> bne $6, $unrolled_loop # U :
> - nop # E :
> + mov $4, $1 # E : move prefetched value into $1
> nop # E :
> nop # E :
>
> -$final: ldq $1, 0($0) # L : load last quad
> - subq $5, $0, $18 # E : $18 <- number of bytes left to do
> +$final: subq $5, $0, $18 # E : $18 <- number of bytes left to do
> + nop # E :
> nop # E :
> bne $18, $last_quad # U :
>
> --- sysdeps/alpha/bits/atomic.h
> +++ sysdeps/alpha/bits/atomic.h
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 2003, 2010 Free Software Foundation, Inc.
> +/* Copyright (C) 2003 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
> @@ -221,7 +221,7 @@
>
> #define __arch_exchange_8_int(mem, value, mb1, mb2) \
> ({ \
> - unsigned long __tmp, __addr64, __sval; __typeof(*mem) __ret; \
> + unsigned long __ret, __tmp, __addr64, __sval; \
> __asm__ __volatile__ ( \
> mb1 \
> " andnot %[__addr8],7,%[__addr64]\n" \
> @@ -244,7 +244,7 @@
>
> #define __arch_exchange_16_int(mem, value, mb1, mb2) \
> ({ \
> - unsigned long __tmp, __addr64, __sval; __typeof(*mem) __ret; \
> + unsigned long __ret, __tmp, __addr64, __sval; \
> __asm__ __volatile__ ( \
> mb1 \
> " andnot %[__addr16],7,%[__addr64]\n" \
> @@ -267,7 +267,7 @@
>
> #define __arch_exchange_32_int(mem, value, mb1, mb2) \
> ({ \
> - signed int __tmp; __typeof(*mem) __ret; \
> + signed int __ret, __tmp; \
> __asm__ __volatile__ ( \
> mb1 \
> "1: ldl_l %[__ret],%[__mem]\n" \
> @@ -284,7 +284,7 @@
>
> #define __arch_exchange_64_int(mem, value, mb1, mb2) \
> ({ \
> - unsigned long __tmp; __typeof(*mem) __ret; \
> + unsigned long __ret, __tmp; \
> __asm__ __volatile__ ( \
> mb1 \
> "1: ldq_l %[__ret],%[__mem]\n" \
> @@ -316,7 +316,7 @@
>
> #define __arch_exchange_and_add_32_int(mem, value, mb1, mb2) \
> ({ \
> - signed int __tmp; __typeof(*mem) __ret; \
> + signed int __ret, __tmp; \
> __asm__ __volatile__ ( \
> mb1 \
> "1: ldl_l %[__ret],%[__mem]\n" \
> @@ -333,7 +333,7 @@
>
> #define __arch_exchange_and_add_64_int(mem, value, mb1, mb2) \
> ({ \
> - unsigned long __tmp; __typeof(*mem) __ret; \
> + unsigned long __ret, __tmp; \
> __asm__ __volatile__ ( \
> mb1 \
> "1: ldq_l %[__ret],%[__mem]\n" \
> --- sysdeps/alpha/dl-machine.h
> +++ sysdeps/alpha/dl-machine.h
> @@ -249,18 +249,6 @@
> /* The alpha never uses Elf64_Rel relocations. */
> #define ELF_MACHINE_NO_REL 1
>
> -/* We define an initialization functions. This is called very early in
> - * _dl_sysdep_start. */
> -#define DL_PLATFORM_INIT dl_platform_init ()
> -
> -static inline void __attribute__ ((unused))
> -dl_platform_init (void)
> -{
> - if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0')
> - /* Avoid an empty string which would disturb us. */
> - GLRO(dl_platform) = NULL;
> -}
> -
> /* Fix up the instructions of a PLT entry to invoke the function
> rather than the dynamic linker. */
> static inline Elf64_Addr
> --- sysdeps/alpha/dl-procinfo.c
> +++ sysdeps/alpha/dl-procinfo.c
> -/* Data for Alpha version of processor capability information.
> - Copyright (C) 2008 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Aurelien Jarno <aurelien at aurel32.net>, 2008.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -/* This information must be kept in sync with the _DL_PLATFORM_COUNT
> - definitions in procinfo.h.
> -
> - If anything should be added here check whether the size of each string
> - is still ok with the given array size.
> -
> - All the #ifdefs in the definitions are quite irritating but
> - necessary if we want to avoid duplicating the information. There
> - are three different modes:
> -
> - - PROCINFO_DECL is defined. This means we are only interested in
> - declarations.
> -
> - - PROCINFO_DECL is not defined:
> -
> - + if SHARED is defined the file is included in an array
> - initializer. The .element = { ... } syntax is needed.
> -
> - + if SHARED is not defined a normal array initialization is
> - needed.
> - */
> -
> -#ifndef PROCINFO_CLASS
> -#define PROCINFO_CLASS
> -#endif
> -
> -#if !defined PROCINFO_DECL && defined SHARED
> - ._dl_alpha_platforms
> -#else
> -PROCINFO_CLASS const char _dl_alpha_platforms[5][5]
> -#endif
> -#ifndef PROCINFO_DECL
> -= {
> - "ev4", "ev5", "ev56", "ev6", "ev67"
> - }
> -#endif
> -#if !defined SHARED || defined PROCINFO_DECL
> -;
> -#else
> -,
> -#endif
> -
> -#undef PROCINFO_DECL
> -#undef PROCINFO_CLASS
> --- sysdeps/alpha/dl-procinfo.h
> +++ sysdeps/alpha/dl-procinfo.h
> -/* Alpha version of processor capability information handling macros.
> - Copyright (C) 2008 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Aurelien Jarno <aurelien at aurel32.net>, 2008.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#ifndef _DL_PROCINFO_H
> -#define _DL_PROCINFO_H 1
> -
> -#include <ldsodefs.h>
> -
> -
> -/* Mask to filter out platforms. */
> -#define _DL_HWCAP_PLATFORM (-1ULL)
> -
> -#define _DL_PLATFORMS_COUNT 5
> -
> -static inline const char *
> -__attribute__ ((unused))
> -_dl_platform_string (int idx)
> -{
> - return GLRO(dl_alpha_platforms)[idx];
> -};
> -
> -static inline int
> -__attribute__ ((unused, always_inline))
> -_dl_string_platform (const char *str)
> -{
> - int i;
> -
> - if (str != NULL)
> - for (i = 0; i < _DL_PLATFORMS_COUNT; ++i)
> - {
> - if (strcmp (str, _dl_platform_string (i)) == 0)
> - return i;
> - }
> - return -1;
> -};
> -
> -/* We cannot provide a general printing function. */
> -#define _dl_procinfo(word) -1
> -
> -/* There are no hardware capabilities defined. */
> -#define _dl_hwcap_string(idx) ""
> -
> -/* By default there is no important hardware capability. */
> -#define HWCAP_IMPORTANT (0)
> -
> -/* We don't have any hardware capabilities. */
> -#define _DL_HWCAP_COUNT 0
> -
> -#define _dl_string_hwcap(str) (-1)
> -
> -#endif /* dl-procinfo.h */
> --- sysdeps/alpha/elf/configure
> +++ sysdeps/alpha/elf/configure
> @@ -4,10 +4,10 @@
> if test "$usetls" != no; then
> # Check for support of thread-local storage handling in assembler and
> # linker.
> -{ $as_echo "$as_me:$LINENO: checking for Alpha TLS support" >&5
> -$as_echo_n "checking for Alpha TLS support... " >&6; }
> +echo "$as_me:$LINENO: checking for Alpha TLS support" >&5
> +echo $ECHO_N "checking for Alpha TLS support... $ECHO_C" >&6
> if test "${libc_cv_alpha_tls+set}" = set; then
> - $as_echo_n "(cached) " >&6
> + echo $ECHO_N "(cached) $ECHO_C" >&6
> else
> cat > conftest.s <<\EOF
> .section ".tdata", "awT", @progbits
> @@ -47,7 +47,7 @@
> { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
> (eval $ac_try) 2>&5
> ac_status=$?
> - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
> + echo "$as_me:$LINENO: \$? = $ac_status" >&5
> (exit $ac_status); }; }; then
> libc_cv_alpha_tls=yes
> else
> @@ -55,8 +55,8 @@
> fi
> rm -f conftest*
> fi
> -{ $as_echo "$as_me:$LINENO: result: $libc_cv_alpha_tls" >&5
> -$as_echo "$libc_cv_alpha_tls" >&6; }
> +echo "$as_me:$LINENO: result: $libc_cv_alpha_tls" >&5
> +echo "${ECHO_T}$libc_cv_alpha_tls" >&6
> if test $libc_cv_alpha_tls = yes; then
> cat >>confdefs.h <<\_ACEOF
> #define HAVE_TLS_SUPPORT 1
> @@ -65,15 +65,19 @@
> fi
> fi
>
> -{ $as_echo "$as_me:$LINENO: checking for GP relative module local relocs" >&5
> -$as_echo_n "checking for GP relative module local relocs... " >&6; }
> +echo "$as_me:$LINENO: checking for GP relative module local relocs" >&5
> +echo $ECHO_N "checking for GP relative module local relocs... $ECHO_C" >&6
> if test "${libc_cv_alpha_hidden_gprel+set}" = set; then
> - $as_echo_n "(cached) " >&6
> + echo $ECHO_N "(cached) $ECHO_C" >&6
> else
> cat > conftest.c <<\EOF
> -static volatile int bar;
> +static int bar;
> int baz __attribute__((visibility("hidden")));
> -int f(void) { return bar + baz; }
> +
> +int foo (void)
> +{
> + return bar + baz;
> +}
> EOF
>
> libc_cv_alpha_hidden_gprel=no
> @@ -81,7 +85,7 @@
> { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
> (eval $ac_try) 2>&5
> ac_status=$?
> - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
> + echo "$as_me:$LINENO: \$? = $ac_status" >&5
> (exit $ac_status); }; }; then
> if grep -q 'bar.*!gprel' conftest.s \
> && grep -q 'baz.*!gprel' conftest.s \
> @@ -92,8 +96,8 @@
> fi
> rm -f conftest*
> fi
> -{ $as_echo "$as_me:$LINENO: result: $libc_cv_alpha_hidden_gprel" >&5
> -$as_echo "$libc_cv_alpha_hidden_gprel" >&6; }
> +echo "$as_me:$LINENO: result: $libc_cv_alpha_hidden_gprel" >&5
> +echo "${ECHO_T}$libc_cv_alpha_hidden_gprel" >&6
> if test $libc_cv_alpha_hidden_gprel = yes; then
> cat >>confdefs.h <<\_ACEOF
> #define PI_STATIC_AND_HIDDEN 1
> --- sysdeps/alpha/elf/configure.in
> +++ sysdeps/alpha/elf/configure.in
> @@ -53,9 +53,13 @@
>
> AC_CACHE_CHECK(for GP relative module local relocs, libc_cv_alpha_hidden_gprel, [dnl
> cat > conftest.c <<\EOF
> -static volatile int bar;
> +static int bar;
> int baz __attribute__((visibility("hidden")));
> -int f(void) { return bar + baz; }
> +
> +int foo (void)
> +{
> + return bar + baz;
> +}
> EOF
> dnl
>
> --- sysdeps/alpha/fpu/fegetenv.c
> +++ sysdeps/alpha/fpu/fegetenv.c
> @@ -1,5 +1,5 @@
> /* Store current floating-point environment.
> - Copyright (C) 1997,99,2000,2001,2010 Free Software Foundation, Inc.
> + Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
> Contributed by Richard Henderson <rth at tamu.edu>, 1997
>
> @@ -45,4 +45,3 @@
> #endif
>
> versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
> -libm_hidden_ver(__fegetenv, fegetenv)
> --- sysdeps/alpha/fpu/s_ceil.c
> +++ sysdeps/alpha/fpu/s_ceil.c
> @@ -27,25 +27,20 @@
> double
> __ceil (double x)
> {
> - if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */
> - {
> - double tmp1, new_x;
> -
> - new_x = -x;
> - __asm (
> + double two52 = copysign (0x1.0p52, x);
> + double r, tmp;
> +
> + __asm (
> #ifdef _IEEE_FP_INEXACT
> - "cvttq/svim %2,%1\n\t"
> + "addt/suim %2, %3, %1\n\tsubt/suim %1, %3, %0"
> #else
> - "cvttq/svm %2,%1\n\t"
> + "addt/sum %2, %3, %1\n\tsubt/sum %1, %3, %0"
> #endif
> - "cvtqt/m %1,%0\n\t"
> - : "=f"(new_x), "=&f"(tmp1)
> - : "f"(new_x));
> + : "=&f"(r), "=&f"(tmp)
> + : "f"(-x), "f"(-two52));
>
> - /* Fix up the negation we did above, as well as handling -0 properly. */
> - x = copysign(new_x, x);
> - }
> - return x;
> + /* Fix up the negation we did above, as well as handling -0 properly. */
> + return copysign (r, x);
> }
>
> weak_alias (__ceil, ceil)
> --- sysdeps/alpha/fpu/s_ceilf.c
> +++ sysdeps/alpha/fpu/s_ceilf.c
> @@ -26,30 +26,20 @@
> float
> __ceilf (float x)
> {
> - if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */
> - {
> - /* Note that Alpha S_Floating is stored in registers in a
> - restricted T_Floating format, so we don't even need to
> - convert back to S_Floating in the end. The initial
> - conversion to T_Floating is needed to handle denormals. */
> -
> - float tmp1, tmp2, new_x;
> -
> - new_x = -x;
> - __asm ("cvtst/s %3,%2\n\t"
> + float two23 = copysignf (0x1.0p23, x);
> + float r, tmp;
> +
> + __asm (
> #ifdef _IEEE_FP_INEXACT
> - "cvttq/svim %2,%1\n\t"
> + "adds/suim %2, %3, %1\n\tsubs/suim %1, %3, %0"
> #else
> - "cvttq/svm %2,%1\n\t"
> + "adds/sum %2, %3, %1\n\tsubs/sum %1, %3, %0"
> #endif
> - "cvtqt/m %1,%0\n\t"
> - : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2)
> - : "f"(new_x));
> + : "=&f"(r), "=&f"(tmp)
> + : "f"(-x), "f"(-two23));
>
> - /* Fix up the negation we did above, as well as handling -0 properly. */
> - x = copysignf(new_x, x);
> - }
> - return x;
> + /* Fix up the negation we did above, as well as handling -0 properly. */
> + return copysignf (r, x);
> }
>
> weak_alias (__ceilf, ceilf)
> --- sysdeps/alpha/fpu/s_floor.c
> +++ sysdeps/alpha/fpu/s_floor.c
> @@ -21,32 +21,26 @@
> #include <math_ldbl_opt.h>
>
>
> -/* Use the -inf rounding mode conversion instructions to implement
> - floor. We note when the exponent is large enough that the value
> - must be integral, as this avoids unpleasant integer overflows. */
> +/* Use the -inf rounding mode conversion instructions to implement floor. */
>
> double
> __floor (double x)
> {
> - if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */
> - {
> - double tmp1, new_x;
> -
> - __asm (
> + double two52 = copysign (0x1.0p52, x);
> + double r, tmp;
> +
> + __asm (
> #ifdef _IEEE_FP_INEXACT
> - "cvttq/svim %2,%1\n\t"
> + "addt/suim %2, %3, %1\n\tsubt/suim %1, %3, %0"
> #else
> - "cvttq/svm %2,%1\n\t"
> + "addt/sum %2, %3, %1\n\tsubt/sum %1, %3, %0"
> #endif
> - "cvtqt/m %1,%0\n\t"
> - : "=f"(new_x), "=&f"(tmp1)
> - : "f"(x));
> + : "=&f"(r), "=&f"(tmp)
> + : "f"(x), "f"(two52));
>
> - /* floor(-0) == -0, and in general we'll always have the same
> - sign as our input. */
> - x = copysign(new_x, x);
> - }
> - return x;
> + /* floor(-0) == -0, and in general we'll always have the same
> + sign as our input. */
> + return copysign (r, x);
> }
>
> weak_alias (__floor, floor)
> --- sysdeps/alpha/fpu/s_floorf.c
> +++ sysdeps/alpha/fpu/s_floorf.c
> @@ -20,37 +20,26 @@
> #include <math.h>
>
>
> -/* Use the -inf rounding mode conversion instructions to implement
> - floor. We note when the exponent is large enough that the value
> - must be integral, as this avoids unpleasant integer overflows. */
> +/* Use the -inf rounding mode conversion instructions to implement floor. */
>
> float
> __floorf (float x)
> {
> - if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */
> - {
> - /* Note that Alpha S_Floating is stored in registers in a
> - restricted T_Floating format, so we don't even need to
> - convert back to S_Floating in the end. The initial
> - conversion to T_Floating is needed to handle denormals. */
> -
> - float tmp1, tmp2, new_x;
> -
> - __asm ("cvtst/s %3,%2\n\t"
> + float two23 = copysignf (0x1.0p23, x);
> + float r, tmp;
> +
> + __asm (
> #ifdef _IEEE_FP_INEXACT
> - "cvttq/svim %2,%1\n\t"
> + "adds/suim %2, %3, %1\n\tsubs/suim %1, %3, %0"
> #else
> - "cvttq/svm %2,%1\n\t"
> + "adds/sum %2, %3, %1\n\tsubs/sum %1, %3, %0"
> #endif
> - "cvtqt/m %1,%0\n\t"
> - : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2)
> - : "f"(x));
> + : "=&f"(r), "=&f"(tmp)
> + : "f"(x), "f"(two23));
>
> - /* floor(-0) == -0, and in general we'll always have the same
> - sign as our input. */
> - x = copysignf(new_x, x);
> - }
> - return x;
> + /* floor(-0) == -0, and in general we'll always have the same
> + sign as our input. */
> + return copysignf (r, x);
> }
>
> weak_alias (__floorf, floorf)
> --- sysdeps/alpha/fpu/s_rint.c
> +++ sysdeps/alpha/fpu/s_rint.c
> @@ -24,24 +24,15 @@
> double
> __rint (double x)
> {
> - if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */
> - {
> - double tmp1, new_x;
> - __asm (
> -#ifdef _IEEE_FP_INEXACT
> - "cvttq/svid %2,%1\n\t"
> -#else
> - "cvttq/svd %2,%1\n\t"
> -#endif
> - "cvtqt/d %1,%0\n\t"
> - : "=f"(new_x), "=&f"(tmp1)
> - : "f"(x));
> + double two52 = copysign (0x1.0p52, x);
> + double r;
> +
> + r = x + two52;
> + r = r - two52;
>
> - /* rint(-0.1) == -0, and in general we'll always have the same
> - sign as our input. */
> - x = copysign(new_x, x);
> - }
> - return x;
> + /* rint(-0.1) == -0, and in general we'll always have the same sign
> + as our input. */
> + return copysign (r, x);
> }
>
> weak_alias (__rint, rint)
> --- sysdeps/alpha/fpu/s_rintf.c
> +++ sysdeps/alpha/fpu/s_rintf.c
> @@ -23,30 +23,15 @@
> float
> __rintf (float x)
> {
> - if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */
> - {
> - /* Note that Alpha S_Floating is stored in registers in a
> - restricted T_Floating format, so we don't even need to
> - convert back to S_Floating in the end. The initial
> - conversion to T_Floating is needed to handle denormals. */
> + float two23 = copysignf (0x1.0p23, x);
> + float r;
>
> - float tmp1, tmp2, new_x;
> + r = x + two23;
> + r = r - two23;
>
> - __asm ("cvtst/s %3,%2\n\t"
> -#ifdef _IEEE_FP_INEXACT
> - "cvttq/svid %2,%1\n\t"
> -#else
> - "cvttq/svd %2,%1\n\t"
> -#endif
> - "cvtqt/d %1,%0\n\t"
> - : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2)
> - : "f"(x));
> -
> - /* rint(-0.1) == -0, and in general we'll always have the same
> - sign as our input. */
> - x = copysignf(new_x, x);
> - }
> - return x;
> + /* rint(-0.1) == -0, and in general we'll always have the same sign
> + as our input. */
> + return copysign (r, x);
> }
>
> weak_alias (__rintf, rintf)
> --- sysdeps/alpha/memchr.S
> +++ sysdeps/alpha/memchr.S
> @@ -119,7 +119,7 @@
>
> # At least one byte left to process.
>
> - ldq zero, 8(v0) # e0 : prefetch next quad
> + ldq t0, 8(v0) # e0 :
> subq t4, 1, a2 # .. e1 :
> addq v0, 8, v0 #-e0 :
>
> @@ -138,19 +138,19 @@
>
> # At least three quads remain to be accessed
>
> + mov t0, t3 # e0 : move prefetched value to correct reg
> +
> .align 4
> $unrolled_loop:
> - ldq t0, 0(v0) # e0 : load quad
> - xor a1, t0, t1 # .. e1 :
> - ldq zero, 8(v0) # e0 : prefetch next quad
> - cmpbge zero, t1, t1 # .. e1:
> - bne t1, $found_it # e0 :
> + ldq t0, 8(v0) #-e0 : prefetch t0
> + xor a1, t3, t1 # .. e1 :
> + cmpbge zero, t1, t1 # e0 :
> + bne t1, $found_it # .. e1 :
>
> - addq v0, 8, v0 # e1 :
> + addq v0, 8, v0 #-e0 :
> $odd_quad_count:
> - ldq t0, 0(v0) # e0 : load quad
> xor a1, t0, t1 # .. e1 :
> - ldq zero, 8(v0) # e0 : prefetch next quad
> + ldq t3, 8(v0) # e0 : prefetch t3
> cmpbge zero, t1, t1 # .. e1 :
> addq v0, 8, t5 #-e0 :
> bne t1, $found_it # .. e1 :
> @@ -159,8 +159,8 @@
> addq v0, 8, v0 # .. e1 :
> bne t5, $unrolled_loop #-e1 :
>
> -$final: ldq t0, 0(v0) # e0 : load last quad
> - subq t4, v0, a2 # .. e1 : a2 <- number of bytes left to do
> + mov t3, t0 # e0 : move prefetched value into t0
> +$final: subq t4, v0, a2 # .. e1 : a2 <- number of bytes left to do
> bne a2, $last_quad # e1 :
>
> $not_found:
> --- sysdeps/arm/configure
> +++ sysdeps/arm/configure
> -# This file is generated from configure.in by Autoconf. DO NOT EDIT!
> - # Local configure fragment for sysdeps/arm.
> -
> -{ $as_echo "$as_me:$LINENO: checking whether the CFI directive .cfi_sections is supported" >&5
> -$as_echo_n "checking whether the CFI directive .cfi_sections is supported... " >&6; }
> -if test "${libc_cv_asm_cfi_directive_sections+set}" = set; then
> - $as_echo_n "(cached) " >&6
> -else
> - cat > conftest.s <<EOF
> - .text
> - .cfi_sections .debug_frame, .eh_frame
> - .cfi_startproc
> - .cfi_endproc
> -EOF
> - if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
> - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
> - (eval $ac_try) 2>&5
> - ac_status=$?
> - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
> - (exit $ac_status); }; }; then
> - libc_cv_asm_cfi_directive_sections=yes
> - else
> - libc_cv_asm_cfi_directive_sections=no
> - fi
> - rm -f conftest*
> -fi
> -{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_cfi_directive_sections" >&5
> -$as_echo "$libc_cv_asm_cfi_directive_sections" >&6; }
> -if test $libc_cv_asm_cfi_directive_sections != yes; then
> - { { $as_echo "$as_me:$LINENO: error: need .cfi_sections in this configuration" >&5
> -$as_echo "$as_me: error: need .cfi_sections in this configuration" >&2;}
> - { (exit 1); exit 1; }; }
> -fi
> --- sysdeps/arm/configure.in
> +++ sysdeps/arm/configure.in
> -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
> -# Local configure fragment for sysdeps/arm.
> -
> -AC_CACHE_CHECK([whether the CFI directive .cfi_sections is supported],
> - [libc_cv_asm_cfi_directive_sections],
> - [cat > conftest.s <<EOF
> - .text
> - .cfi_sections .debug_frame, .eh_frame
> - .cfi_startproc
> - .cfi_endproc
> -EOF
> - if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
> - libc_cv_asm_cfi_directive_sections=yes
> - else
> - libc_cv_asm_cfi_directive_sections=no
> - fi
> - rm -f conftest*])
> -if test $libc_cv_asm_cfi_directive_sections != yes; then
> - AC_MSG_ERROR([need .cfi_sections in this configuration])
> -fi
> --- sysdeps/arm/dl-machine.h
> +++ sysdeps/arm/dl-machine.h
> @@ -1,6 +1,6 @@
> /* Machine-dependent ELF dynamic relocation inline functions. ARM version.
> - Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,
> - 2006, 2009, 2010 Free Software Foundation, Inc.
> + Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005
> + 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
> @@ -26,6 +26,14 @@
> #include <sys/param.h>
> #include <tls.h>
>
> +#define VALID_ELF_ABIVERSION(ver) (ver == 0)
> +#define VALID_ELF_OSABI(osabi) \
> + (osabi == ELFOSABI_SYSV || osabi == ELFOSABI_ARM)
> +#define VALID_ELF_HEADER(hdr,exp,size) \
> + memcmp (hdr,exp,size-2) == 0 \
> + && VALID_ELF_OSABI (hdr[EI_OSABI]) \
> + && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION])
> +
> #define CLEAR_CACHE(BEG,END) \
> INTERNAL_SYSCALL_ARM (cacheflush, , 3, (BEG), (END), 0)
>
> --- sysdeps/arm/dl-trampoline.S
> +++ sysdeps/arm/dl-trampoline.S
> @@ -1,5 +1,5 @@
> /* PLT trampolines. ARM version.
> - Copyright (C) 2005, 2010 Free Software Foundation, Inc.
> + Copyright (C) 2005 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> The GNU C Library is free software; you can redistribute it and/or
> @@ -29,7 +29,6 @@
> .text
> .globl _dl_runtime_resolve
> .type _dl_runtime_resolve, #function
> - .cfi_sections .debug_frame
> cfi_startproc
> .align 2
> _dl_runtime_resolve:
> @@ -78,7 +77,6 @@
> #ifndef PROF
> .globl _dl_runtime_profile
> .type _dl_runtime_profile, #function
> - .cfi_sections .debug_frame
> cfi_startproc
> .align 2
> _dl_runtime_profile:
> --- sysdeps/arm/eabi/Makefile
> +++ sysdeps/arm/eabi/Makefile
> @@ -12,10 +12,6 @@
> gen-as-const-headers += rtld-global-offsets.sym
> endif
>
> -ifeq ($(subdir),gmon)
> -sysdep_routines += arm-mcount
> -endif
> -
> ifeq ($(subdir),debug)
> CFLAGS-backtrace.c += -funwind-tables
> endif
> --- sysdeps/arm/eabi/__longjmp.S
> +++ sysdeps/arm/eabi/__longjmp.S
> @@ -1,6 +1,5 @@
> /* longjmp for ARM.
> - Copyright (C) 1997, 1998, 2005, 2006, 2009, 2010
> - Free Software Foundation, Inc.
> + Copyright (C) 1997, 1998, 2005, 2006, 2009 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> The GNU C Library is free software; you can redistribute it and/or
> @@ -32,21 +31,10 @@
> moveq r0, #1 /* can't let setjmp() return zero! */
>
> #ifdef CHECK_SP
> - ldr r4, [ip, #32] /* jmpbuf's sp */
> - cfi_undefined (r4)
> + ldr r4, [ip, #32]
> CHECK_SP (r4)
> #endif
> LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr})
> - cfi_restore (v1)
> - cfi_restore (v2)
> - cfi_restore (v3)
> - cfi_restore (v4)
> - cfi_restore (v5)
> - cfi_restore (v6)
> - cfi_restore (sl)
> - cfi_restore (fp)
> - cfi_restore (sp)
> - cfi_restore (lr)
>
> #ifdef IS_IN_rtld
> ldr a2, 1f
> --- sysdeps/arm/eabi/arm-mcount.S
> +++ sysdeps/arm/eabi/arm-mcount.S
> -/* Implementation of profiling support. ARM EABI version.
> - Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -/* Don't call mcount when calling mcount... */
> -#undef PROF
> -
> -#include <sysdep.h>
> -
> -
> -#ifdef __thumb2__
> - .thumb
> - .syntax unified
> -#endif
> -
> -
> -/* Use an assembly stub with a special ABI. The calling lr has been
> - pushed to the stack (which will be misaligned). We should preserve
> - all registers except ip and pop a word off the stack.
> -
> - NOTE: This assumes mcount_internal does not clobber any non-core
> - (coprocessor) registers. Currently this is true, but may require
> - additional attention in the future.
> -
> - The calling sequence looks something like:
> -func:
> - push {lr}
> - bl __gnu_mount_nc
> - <function body>
> -*/
> -
> -ENTRY(__gnu_mcount_nc)
> - push {r0, r1, r2, r3, lr}
> - cfi_adjust_cfa_offset (20)
> - cfi_rel_offset (r0, 0)
> - cfi_rel_offset (r1, 4)
> - cfi_rel_offset (r2, 8)
> - cfi_rel_offset (r3, 12)
> - cfi_rel_offset (lr, 16)
> - bic r1, lr, #1
> - ldr r0, [sp, #20]
> - bl __mcount_internal
> - pop {r0, r1, r2, r3, ip, lr}
> - cfi_adjust_cfa_offset (-24)
> - cfi_restore (r0)
> - cfi_restore (r1)
> - cfi_restore (r2)
> - cfi_restore (r3)
> - cfi_register (lr, ip)
> - bx ip
> -END(__gnu_mcount_nc)
> -
> -
> -/* Provide old mcount for backwards compatibility. This requires
> - code be compiled with APCS frame pointers. */
> -
> -ENTRY(_mcount)
> - stmdb sp!, {r0, r1, r2, r3, fp, lr}
> - cfi_adjust_cfa_offset (24)
> - cfi_rel_offset (r0, 0)
> - cfi_rel_offset (r1, 4)
> - cfi_rel_offset (r2, 8)
> - cfi_rel_offset (r3, 12)
> - cfi_rel_offset (fp, 16)
> - cfi_rel_offset (lr, 20)
> -#ifdef __thumb2__
> - movs r0, fp
> - ittt ne
> - ldrne r0, [r0, #-4]
> -#else
> - movs fp, fp
> - ldrne r0, [fp, #-4]
> -#endif
> - movnes r1, lr
> - blne __mcount_internal
> -#ifdef __thumb2__
> - ldmia sp!, {r0, r1, r2, r3, fp, pc}
> -#else
> - ldmia sp!, {r0, r1, r2, r3, fp, lr}
> - cfi_adjust_cfa_offset (-24)
> - cfi_restore (r0)
> - cfi_restore (r1)
> - cfi_restore (r2)
> - cfi_restore (r3)
> - cfi_restore (fp)
> - cfi_restore (lr)
> - bx lr
> -#endif
> -END(_mcount)
> -
> -/* The canonical name for the function is `_mcount' in both C and asm,
> - but some old asm code might assume it's `mcount'. */
> -#undef mcount
> -weak_alias (_mcount, mcount)
> --- sysdeps/arm/eabi/fegetenv.c
> +++ sysdeps/arm/eabi/fegetenv.c
> @@ -1,5 +1,5 @@
> /* Store current floating-point environment.
> - Copyright (C) 1997,98,99,2000,01,05,10 Free Software Foundation, Inc.
> + Copyright (C) 1997,98,99,2000,01,05 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
> @@ -48,5 +48,4 @@
> compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1);
> #endif
>
> -libm_hidden_ver (__fegetenv, fegetenv)
> versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
> --- sysdeps/arm/eabi/machine-gmon.h
> +++ sysdeps/arm/eabi/machine-gmon.h
> @@ -1,5 +1,5 @@
> /* Machine-dependent definitions for profiling support. ARM EABI version.
> - Copyright (C) 2008, 2009 Free Software Foundation, Inc.
> + Copyright (C) 2008 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> The GNU C Library is free software; you can redistribute it and/or
> @@ -17,18 +17,83 @@
> Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA. */
>
> -#include <sysdep.h>
> -
> /* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0,
> so we must use an assembly stub. */
>
> -/* We must not pollute the global namespace. */
> -#define mcount_internal __mcount_internal
> +#include <sysdep.h>
> +static void mcount_internal (u_long frompc, u_long selfpc) __attribute_used__;
>
> -extern void mcount_internal (u_long frompc, u_long selfpc) internal_function;
> #define _MCOUNT_DECL(frompc, selfpc) \
> - void internal_function mcount_internal (u_long frompc, u_long selfpc)
> +static void mcount_internal (u_long frompc, u_long selfpc)
>
> +/* Use an assembly stub with a special ABI. The calling lr has been
> + pushed to the stack (which will be misaligned). We should preserve
> + all registers except ip and pop a word off the stack.
> +
> + NOTE: This assumes mcount_internal does not clobber any non-core
> + (coprocessor) registers. Currently this is true, but may require
> + additional attention in the future.
> +
> + The calling sequence looks something like:
> +func:
> + push {lr}
> + bl __gnu_mount_nc
> + <function body>
> + */
> +
> +
> +#define MCOUNT \
> +void __attribute__((__naked__)) __gnu_mcount_nc(void) \
> +{ \
> + asm ("push {r0, r1, r2, r3, lr}\n\t" \
> + "bic r1, lr, #1\n\t" \
> + "ldr r0, [sp, #20]\n\t" \
> + "bl mcount_internal\n\t" \
> + "pop {r0, r1, r2, r3, ip, lr}\n\t" \
> + "bx ip"); \
> +} \
> +OLD_MCOUNT
> +
> +/* Provide old mcount for backwards compatibility. This requires
> + code be compiled with APCS frame pointers. */
> +
> +#ifndef NO_UNDERSCORES
> +/* The asm symbols for C functions are `_function'.
> + The canonical name for the counter function is `mcount', no _. */
> +void _mcount (void) asm ("mcount");
> +#else
> +/* The canonical name for the function is `_mcount' in both C and asm,
> + but some old asm code might assume it's `mcount'. */
> +void _mcount (void);
> +weak_alias (_mcount, mcount)
> +#endif
> +
> +#ifdef __thumb2__
> +
> +#define OLD_MCOUNT \
> +void __attribute__((__naked__)) _mcount (void) \
> +{ \
> + __asm__("push {r0, r1, r2, r3, fp, lr};" \
> + "movs r0, fp;" \
> + "ittt ne;" \
> + "ldrne r0, [r0, #-4];" \
> + "movsne r1, lr;" \
> + "blne mcount_internal;" \
> + "pop {r0, r1, r2, r3, fp, pc}"); \
> +}
> +
> +#else
> +
> +#define OLD_MCOUNT \
> +void __attribute__((__naked__)) _mcount (void) \
> +{ \
> + __asm__("stmdb sp!, {r0, r1, r2, r3, fp, lr};" \
> + "movs fp, fp;" \
> + "ldrne r0, [fp, #-4];" \
> + "movnes r1, lr;" \
> + "blne mcount_internal;" \
> + "ldmia sp!, {r0, r1, r2, r3, fp, lr};" \
> + "bx lr"); \
> +}
>
> -/* Define MCOUNT as empty since we have the implementation in another file. */
> -#define MCOUNT
> +#endif
> --- sysdeps/arm/fpu/fegetenv.c
> +++ sysdeps/arm/fpu/fegetenv.c
> @@ -1,5 +1,5 @@
> /* Store current floating-point environment.
> - Copyright (C) 1997,98,99,2000,01,10 Free Software Foundation, Inc.
> + Copyright (C) 1997,98,99,2000,01 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
> @@ -37,5 +37,4 @@
> compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1);
> #endif
>
> -libm_hidden_ver (__fegetenv, fegetenv)
> versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
> --- sysdeps/arm/memcpy.S
> +++ sysdeps/arm/memcpy.S
> @@ -58,11 +58,6 @@
> ENTRY(memcpy)
>
> stmfd sp!, {r0, r4, lr}
> - cfi_adjust_cfa_offset (12)
> - cfi_rel_offset (r4, 4)
> - cfi_rel_offset (lr, 8)
> -
> - cfi_remember_state
>
> subs r2, r2, #4
> blt 8f
> @@ -74,11 +69,6 @@
>
> 1: subs r2, r2, #(28)
> stmfd sp!, {r5 - r8}
> - cfi_adjust_cfa_offset (16)
> - cfi_rel_offset (r5, 0)
> - cfi_rel_offset (r6, 4)
> - cfi_rel_offset (r7, 8)
> - cfi_rel_offset (r8, 12)
> blt 5f
>
> CALGN( ands ip, r1, #31 )
> @@ -131,11 +121,6 @@
> CALGN( bcs 2b )
>
> 7: ldmfd sp!, {r5 - r8}
> - cfi_adjust_cfa_offset (-16)
> - cfi_restore (r5)
> - cfi_restore (r6)
> - cfi_restore (r7)
> - cfi_restore (r8)
>
> 8: movs r2, r2, lsl #31
> ldrneb r3, [r1], #1
> @@ -147,16 +132,11 @@
>
> #if defined (__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
> ldmfd sp!, {r0, r4, lr}
> - cfi_adjust_cfa_offset (-12)
> - cfi_restore (r4)
> - cfi_restore (lr)
> bx lr
> #else
> ldmfd sp!, {r0, r4, pc}
> #endif
>
> - cfi_restore_state
> -
> 9: rsb ip, ip, #4
> cmp ip, #2
> ldrgtb r3, [r1], #1
> @@ -189,12 +169,6 @@
> CALGN( bcc 15f )
>
> 11: stmfd sp!, {r5 - r9}
> - cfi_adjust_cfa_offset (20)
> - cfi_rel_offset (r5, 0)
> - cfi_rel_offset (r6, 4)
> - cfi_rel_offset (r7, 8)
> - cfi_rel_offset (r8, 12)
> - cfi_rel_offset (r9, 16)
>
> PLD( pld [r1, #0] )
> PLD( subs r2, r2, #96 )
> @@ -229,12 +203,6 @@
> PLD( bge 13b )
>
> ldmfd sp!, {r5 - r9}
> - cfi_adjust_cfa_offset (-20)
> - cfi_restore (r5)
> - cfi_restore (r6)
> - cfi_restore (r7)
> - cfi_restore (r8)
> - cfi_restore (r9)
>
> 14: ands ip, r2, #28
> beq 16f
> --- sysdeps/arm/memmove.S
> +++ sysdeps/arm/memmove.S
> @@ -73,12 +73,6 @@
> #endif
>
> stmfd sp!, {r0, r4, lr}
> - cfi_adjust_cfa_offset (12)
> - cfi_rel_offset (r4, 4)
> - cfi_rel_offset (lr, 8)
> -
> - cfi_remember_state
> -
> add r1, r1, r2
> add r0, r0, r2
> subs r2, r2, #4
> @@ -91,11 +85,6 @@
>
> 1: subs r2, r2, #(28)
> stmfd sp!, {r5 - r8}
> - cfi_adjust_cfa_offset (16)
> - cfi_rel_offset (r5, 0)
> - cfi_rel_offset (r6, 4)
> - cfi_rel_offset (r7, 8)
> - cfi_rel_offset (r8, 12)
> blt 5f
>
> CALGN( ands ip, r1, #31 )
> @@ -147,11 +136,6 @@
> CALGN( bcs 2b )
>
> 7: ldmfd sp!, {r5 - r8}
> - cfi_adjust_cfa_offset (-16)
> - cfi_restore (r5)
> - cfi_restore (r6)
> - cfi_restore (r7)
> - cfi_restore (r8)
>
> 8: movs r2, r2, lsl #31
> ldrneb r3, [r1, #-1]!
> @@ -160,19 +144,13 @@
> strneb r3, [r0, #-1]!
> strcsb r4, [r0, #-1]!
> strcsb ip, [r0, #-1]
> -
> #if defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__)
> ldmfd sp!, {r0, r4, lr}
> - cfi_adjust_cfa_offset (-12)
> - cfi_restore (r4)
> - cfi_restore (lr)
> bx lr
> #else
> ldmfd sp!, {r0, r4, pc}
> #endif
>
> - cfi_restore_state
> -
> 9: cmp ip, #2
> ldrgtb r3, [r1, #-1]!
> ldrgeb r4, [r1, #-1]!
> @@ -204,12 +182,6 @@
> CALGN( bcc 15f )
>
> 11: stmfd sp!, {r5 - r9}
> - cfi_adjust_cfa_offset (20)
> - cfi_rel_offset (r5, 0)
> - cfi_rel_offset (r6, 4)
> - cfi_rel_offset (r7, 8)
> - cfi_rel_offset (r8, 12)
> - cfi_rel_offset (r9, 16)
>
> PLD( pld [r1, #-4] )
> PLD( subs r2, r2, #96 )
> @@ -244,12 +216,6 @@
> PLD( bge 13b )
>
> ldmfd sp!, {r5 - r9}
> - cfi_adjust_cfa_offset (-20)
> - cfi_restore (r5)
> - cfi_restore (r6)
> - cfi_restore (r7)
> - cfi_restore (r8)
> - cfi_restore (r9)
>
> 14: ands ip, r2, #28
> beq 16f
> --- sysdeps/arm/sysdep.h
> +++ sysdeps/arm/sysdep.h
> @@ -1,5 +1,5 @@
> /* Assembler macros for ARM.
> - Copyright (C) 1997, 1998, 2003, 2009, 2010 Free Software Foundation, Inc.
> + Copyright (C) 1997, 1998, 2003 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
> @@ -81,25 +81,18 @@
> ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),function) \
> .align ALIGNARG(4); \
> C_LABEL(name) \
> - .cfi_sections .debug_frame; \
> - cfi_startproc; \
> CALL_MCOUNT
>
> #undef END
> #define END(name) \
> - cfi_endproc; \
> ASM_SIZE_DIRECTIVE(name)
>
> /* If compiled for profiling, call `mcount' at the start of each function. */
> #ifdef PROF
> -#define CALL_MCOUNT \
> - str lr,[sp, #-4]!; \
> - cfi_adjust_cfa_offset (4); \
> - cfi_rel_offset (lr, 0); \
> - bl PLTJMP(mcount); \
> - ldr lr, [sp], #4; \
> - cfi_adjust_cfa_offset (-4); \
> - cfi_restore (lr)
> +#define CALL_MCOUNT \
> + str lr,[sp, #-4]! ; \
> + bl PLTJMP(mcount) ; \
> + ldr lr, [sp], #4 ;
> #else
> #define CALL_MCOUNT /* Do nothing. */
> #endif
> --- sysdeps/hppa/nptl/tls.h
> +++ sysdeps/hppa/nptl/tls.h
> @@ -1,5 +1,5 @@
> /* Definition for thread-local data handling. NPTL/hppa version.
> - Copyright (C) 2005, 2007, 2010 Free Software Foundation, Inc.
> + Copyright (C) 2005, 2007 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
> @@ -140,13 +140,11 @@
> return (struct pthread *) cr27;
> }
>
> -/* We write to cr27, clobber r26 as the input argument, and clobber
> - r31 as the link register. */
> static inline void __set_cr27(struct pthread *cr27)
> {
> asm ( "ble 0xe0(%%sr2, %%r0)\n\t"
> "copy %0, %%r26"
> - : : "r" (cr27) : "r26", "r31" );
> + : : "r" (cr27) : "r26" );
> }
>
> /* Get and set the global scope generation counter in struct pthread. */
> --- sysdeps/m68k/dl-machine.h
> +++ sysdeps/m68k/dl-machine.h
> @@ -1,6 +1,5 @@
> /* Machine-dependent ELF dynamic relocation inline functions. m68k version.
> - Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2010
> - Free Software Foundation, Inc.
> + Copyright (C) 1996-2001, 2002, 2003, 2004, 2005 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
> @@ -25,7 +24,6 @@
>
> #include <sys/param.h>
> #include <sysdep.h>
> -#include <dl-tls.h>
>
> /* Return nonzero iff ELF header is compatible with the running host. */
> static inline int
> @@ -123,7 +121,6 @@
> .globl _start\n\
> .type _start, at function\n\
> _start:\n\
> - sub.l %fp, %fp\n\
> move.l %sp, -(%sp)\n\
> jbsr _dl_start\n\
> addq.l #4, %sp\n\
> @@ -162,16 +159,12 @@
> .size _dl_start_user, . - _dl_start_user\n\
> .previous");
>
> -/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
> - TLS variable, so undefined references should not be allowed to
> - define the value.
> +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
> + PLT entries should not be allowed to define the value.
> ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
> of the main executable's symbols, as for a COPY reloc. */
> #define elf_machine_type_class(type) \
> - ((((type) == R_68K_JMP_SLOT \
> - || (type) == R_68K_TLS_DTPMOD32 \
> - || (type) == R_68K_TLS_DTPREL32 \
> - || (type) == R_68K_TLS_TPREL32) * ELF_RTYPE_CLASS_PLT) \
> + ((((type) == R_68K_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
> | (((type) == R_68K_COPY) * ELF_RTYPE_CLASS_COPY))
>
> /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
> @@ -269,25 +262,6 @@
> case R_68K_PC32:
> *reloc_addr = value + reloc->r_addend - (Elf32_Addr) reloc_addr;
> break;
> -#if defined USE_TLS && !defined RTLD_BOOTSTRAP
> - case R_68K_TLS_DTPMOD32:
> - /* Get the information from the link map returned by the
> - resolv function. */
> - if (sym_map != NULL)
> - *reloc_addr = sym_map->l_tls_modid;
> - break;
> - case R_68K_TLS_DTPREL32:
> - if (sym != NULL)
> - *reloc_addr = TLS_DTPREL_VALUE (sym, reloc);
> - break;
> - case R_68K_TLS_TPREL32:
> - if (sym != NULL)
> - {
> - CHECK_STATIC_TLS (map, sym_map);
> - *reloc_addr = TLS_TPREL_VALUE (sym_map, sym, reloc);
> - }
> - break;
> -#endif /* defined USE_TLS && !defined RTLD_BOOTSTRAP */
> case R_68K_NONE: /* Alright, Wilbur. */
> break;
> default:
> --- sysdeps/m68k/dl-tls.h
> +++ sysdeps/m68k/dl-tls.h
> -/* Thread-local storage handling in the ELF dynamic linker. M68K version.
> - Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -
> -/* Type used for the representation of TLS information in the GOT. */
> -typedef struct
> -{
> - unsigned long int ti_module;
> - unsigned long int ti_offset;
> -} tls_index;
> -
> -/* The thread pointer points 0x7000 past the first static TLS block. */
> -#define TLS_TP_OFFSET 0x7000
> -
> -/* Dynamic thread vector pointers point 0x8000 past the start of each
> - TLS block. */
> -#define TLS_DTV_OFFSET 0x8000
> -
> -/* Compute the value for a TPREL reloc. */
> -#define TLS_TPREL_VALUE(sym_map, sym, reloc) \
> - ((sym_map)->l_tls_offset + (sym)->st_value + (reloc)->r_addend \
> - - TLS_TP_OFFSET)
> -
> -/* Compute the value for a DTPREL reloc. */
> -#define TLS_DTPREL_VALUE(sym, reloc) \
> - ((sym)->st_value + (reloc)->r_addend - TLS_DTV_OFFSET)
> -
> -extern void *__tls_get_addr (tls_index *ti);
> -
> -#define GET_ADDR_OFFSET (ti->ti_offset + TLS_DTV_OFFSET)
> -#define __TLS_GET_ADDR(__ti) (__tls_get_addr (__ti) - TLS_DTV_OFFSET)
> --- sysdeps/m68k/fpu/fegetenv.c
> +++ sysdeps/m68k/fpu/fegetenv.c
> @@ -1,5 +1,5 @@
> /* Store current floating-point environment.
> - Copyright (C) 1997,99,2000,01,10 Free Software Foundation, Inc.
> + Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
> Contributed by Andreas Schwab <schwab at issan.informatik.uni-dortmund.de>
>
> @@ -41,5 +41,4 @@
> compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1);
> #endif
>
> -libm_hidden_ver (__fegetenv, fegetenv)
> versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
> --- sysdeps/m68k/jmpbuf-unwind.h
> +++ sysdeps/m68k/jmpbuf-unwind.h
> @@ -1,5 +1,5 @@
> /* Examine __jmp_buf for unwinding frames. m68k version.
> - Copyright (C) 2006, 2010 Free Software Foundation, Inc.
> + Copyright (C) 2006 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,29 +18,8 @@
> 02111-1307 USA. */
>
> #include <setjmp.h>
> -#include <stdint.h>
> -#include <unwind.h>
>
> /* Test if longjmp to JMPBUF would unwind the frame
> containing a local variable at ADDRESS. */
> #define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
> ((void *) (address) < (void *) demangle ((jmpbuf)->__sp))
> -
> -#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
> - _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
> -
> -static inline uintptr_t __attribute__ ((unused))
> -_jmpbuf_sp (__jmp_buf regs)
> -{
> - uintptr_t sp = regs[0].__sp;
> -#ifdef PTR_DEMANGLE
> - PTR_DEMANGLE (sp);
> -#endif
> - return sp;
> -}
> -
> -#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
> - ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
> -
> -/* We use the normal longjmp for unwinding. */
> -#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
> --- sysdeps/m68k/libc-tls.c
> +++ sysdeps/m68k/libc-tls.c
> -/* Thread-local storage handling in the ELF dynamic linker. m68k version.
> - Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#include <csu/libc-tls.c>
> -#include <dl-tls.h>
> -
> -#if USE_TLS
> -
> -/* On M68K, linker optimizations are not required, so __tls_get_addr
> - can be called even in statically linked binaries. In this case module
> - must be always 1 and PT_TLS segment exist in the binary, otherwise it
> - would not link. */
> -
> -void *
> -__tls_get_addr (tls_index *ti)
> -{
> - dtv_t *dtv = THREAD_DTV ();
> - return (char *) dtv[1].pointer.val + GET_ADDR_OFFSET;
> -}
> -
> -#endif
> --- sysdeps/m68k/m680x0/fpu/bits/mathinline.h
> +++ sysdeps/m68k/m680x0/fpu/bits/mathinline.h
> @@ -1,5 +1,5 @@
> /* Definitions of inline math functions implemented by the m68881/2.
> - Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003, 2004, 2008, 2010
> + Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003, 2004, 2008
> Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> @@ -85,26 +85,6 @@
> : "=dm" (__result) : "f" (x), "f" (y)); \
> __result != 0; })
> # endif /* GCC 3.1 */
> -
> -/* Test for negative number. Used in the signbit() macro. */
> -__MATH_INLINE int
> -__NTH (__signbitf (float __x))
> -{
> - __extension__ union { float __f; int __i; } __u = { __f: __x };
> - return __u.__i < 0;
> -}
> -__MATH_INLINE int
> -__NTH (__signbit (double __x))
> -{
> - __extension__ union { double __d; int __i[2]; } __u = { __d: __x };
> - return __u.__i[0] < 0;
> -}
> -__MATH_INLINE int
> -__NTH (__signbitl (long double __x))
> -{
> - __extension__ union { long double __d; int __i[3]; } __u = { __d: __x };
> - return __u.__i[0] < 0;
> -}
> #endif
>
>
> @@ -301,7 +281,17 @@
> #ifdef __USE_ISOC99
>
> # define __inline_functions(float_type, s) \
> -__m81_defun (float_type, __CONCAT(__scalbln,s), \
> +__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \
> +{ \
> + /* There is no branch-condition for the sign bit, so we must extract \
> + and examine the condition codes manually. */ \
> + unsigned long int __fpsr; \
> + __asm ("ftst%.x %1\n" \
> + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \
> + return (__fpsr >> 27) & 1; \
> +} \
> + \
> + __m81_defun (float_type, __CONCAT(__scalbln,s), \
> (float_type __x, long int __n)) \
> { \
> return __CONCAT(__scalbn,s) (__x, __n); \
> --- sysdeps/m68k/m680x0/fpu/s_ccos.c
> +++ sysdeps/m68k/m680x0/fpu/s_ccos.c
> @@ -1,5 +1,5 @@
> /* Complex cosine function. m68k fpu version
> - Copyright (C) 1997, 1999, 2010 Free Software Foundation, Inc.
> + Copyright (C) 1997, 1999 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
> Contributed by Andreas Schwab <schwab at issan.informatik.uni-dortmund.de>.
>
> @@ -48,7 +48,7 @@
> : "f" (__real__ x));
> __real__ retval = cos_rx * m81(__ieee754_cosh) (__imag__ x);
> if (rx_cond & __M81_COND_ZERO)
> - __imag__ retval = (signbit (__imag__ x)
> + __imag__ retval = (m81(__signbit) (__imag__ x)
> ? __real__ x : -__real__ x);
> else
> __imag__ retval = -sin_rx * m81(__ieee754_sinh) (__imag__ x);
> --- sysdeps/m68k/m680x0/fpu/s_ccosh.c
> +++ sysdeps/m68k/m680x0/fpu/s_ccosh.c
> @@ -1,5 +1,5 @@
> /* Complex cosine hyperbole function. m68k fpu version
> - Copyright (C) 1997, 1999, 2010 Free Software Foundation, Inc.
> + Copyright (C) 1997, 1999 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
> Contributed by Andreas Schwab <schwab at issan.informatik.uni-dortmund.de>.
>
> @@ -48,7 +48,7 @@
> : "f" (__imag__ x));
> __real__ retval = cos_ix * m81(__ieee754_cosh) (__real__ x);
> if (ix_cond & __M81_COND_ZERO)
> - __imag__ retval = (signbit (__real__ x)
> + __imag__ retval = (m81(__signbit) (__real__ x)
> ? -__imag__ x : __imag__ x);
> else
> __imag__ retval = sin_ix * m81(__ieee754_sinh) (__real__ x);
> --- sysdeps/m68k/nptl
> +++ sysdeps/m68k/nptl
> -(directory)
> --- sysdeps/m68k/nptl/Makefile
> +++ sysdeps/m68k/nptl/Makefile
> -# Copyright (C) 2010 Free Software Foundation, Inc.
> -# This file is part of the GNU C Library.
> -# Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -#
> -# The GNU C Library is free software; you can redistribute it and/or
> -# modify it under the terms of the GNU Lesser General Public
> -# License as published by the Free Software Foundation; either
> -# version 2.1 of the License, or (at your option) any later version.
> -#
> -# The GNU C Library is distributed in the hope that it will be useful,
> -# but WITHOUT ANY WARRANTY; without even the implied warranty of
> -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> -# Lesser General Public License for more details.
> -#
> -# You should have received a copy of the GNU Lesser General Public
> -# License along with the GNU C Library; if not, write to the Free
> -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> -# 02111-1307 USA.
> -
> -ifeq ($(subdir),csu)
> -gen-as-const-headers += tcb-offsets.sym
> -endif
> --- sysdeps/m68k/nptl/pthread_spin_lock.c
> +++ sysdeps/m68k/nptl/pthread_spin_lock.c
> -/* Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#include <atomic.h>
> -#include "pthreadP.h"
> -
> -int
> -pthread_spin_lock (pthread_spinlock_t *lock)
> -{
> - while (atomic_compare_and_exchange_val_acq(lock, 1, 0) != 0)
> - while (*lock != 0)
> - ;
> -
> - return 0;
> -}
> --- sysdeps/m68k/nptl/pthread_spin_trylock.c
> +++ sysdeps/m68k/nptl/pthread_spin_trylock.c
> -/* Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#include <errno.h>
> -#include <atomic.h>
> -#include "pthreadP.h"
> -
> -int
> -pthread_spin_trylock (pthread_spinlock_t *lock)
> -{
> - return atomic_compare_and_exchange_val_acq(lock, 1, 0) ? EBUSY : 0;
> -}
> --- sysdeps/m68k/nptl/pthreaddef.h
> +++ sysdeps/m68k/nptl/pthreaddef.h
> -/* Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -/* Default stack size. */
> -#define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
> -
> -/* Required stack pointer alignment at beginning. */
> -#define STACK_ALIGN 16
> -
> -/* Minimal stack size after allocating thread descriptor and guard size. */
> -#define MINIMAL_REST_STACK 2048
> -
> -/* Alignment requirement for TCB. */
> -#define TCB_ALIGNMENT 16
> -
> -
> -/* Location of current stack frame. */
> -#define CURRENT_STACK_FRAME __builtin_frame_address (0)
> -
> -
> -/* XXX Until we have a better place keep the definitions here. */
> -#define __exit_thread_inline(val) \
> - INLINE_SYSCALL (exit, 1, (val))
> --- sysdeps/m68k/nptl/tcb-offsets.sym
> +++ sysdeps/m68k/nptl/tcb-offsets.sym
> -#include <sysdep.h>
> -#include <tls.h>
> -
> ---
> -
> --- Derive offsets relative to the thread register.
> -#define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)
> -
> -MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
> -PID_OFFSET thread_offsetof (pid)
> -TID_OFFSET thread_offsetof (tid)
> --- sysdeps/m68k/nptl/tls.h
> +++ sysdeps/m68k/nptl/tls.h
> -/* Definition for thread-local data handling. NPTL/m68k version.
> - Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#ifndef _TLS_H
> -#define _TLS_H 1
> -
> -#include <dl-sysdep.h>
> -
> -#ifndef __ASSEMBLER__
> -# include <stdbool.h>
> -# include <stddef.h>
> -# include <stdint.h>
> -
> -/* Type for the dtv. */
> -typedef union dtv
> -{
> - size_t counter;
> - struct
> - {
> - void *val;
> - bool is_static;
> - } pointer;
> -} dtv_t;
> -
> -#else /* __ASSEMBLER__ */
> -# include <tcb-offsets.h>
> -#endif /* __ASSEMBLER__ */
> -
> -/* Signal that TLS support is available. */
> -#define USE_TLS 1
> -
> -#ifndef __ASSEMBLER__
> -
> -/* Get system call information. */
> -# include <sysdep.h>
> -
> -/* The TP points to the start of the thread blocks. */
> -# define TLS_DTV_AT_TP 1
> -
> -/* Get the thread descriptor definition. */
> -# include <nptl/descr.h>
> -
> -typedef struct
> -{
> - dtv_t *dtv;
> - void *private;
> -} tcbhead_t;
> -
> -/* This is the size of the initial TCB. Because our TCB is before the thread
> - pointer, we don't need this. */
> -# define TLS_INIT_TCB_SIZE 0
> -
> -/* Alignment requirements for the initial TCB. */
> -# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread)
> -
> -/* This is the size of the TCB. Because our TCB is before the thread
> - pointer, we don't need this. */
> -# define TLS_TCB_SIZE 0
> -
> -/* Alignment requirements for the TCB. */
> -# define TLS_TCB_ALIGN __alignof__ (struct pthread)
> -
> -/* This is the size we need before TCB - actually, it includes the TCB. */
> -# define TLS_PRE_TCB_SIZE \
> - (sizeof (struct pthread) \
> - + ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1)))
> -
> -/* The thread pointer (TP) points to the end of the
> - TCB + 0x7000, as for PowerPC and MIPS. This implies that TCB address is
> - TP - 0x7000. As we define TLS_DTV_AT_TP we can
> - assume that the pthread struct is allocated immediately ahead of the
> - TCB. This implies that the pthread_descr address is
> - TP - (TLS_PRE_TCB_SIZE + 0x7000). */
> -# define TLS_TCB_OFFSET 0x7000
> -
> -/* Install the dtv pointer. The pointer passed is to the element with
> - index -1 which contain the length. */
> -# define INSTALL_DTV(tcbp, dtvp) \
> - ((tcbhead_t *) (tcbp))[-1].dtv = dtvp + 1
> -
> -/* Install new dtv for current thread. */
> -# define INSTALL_NEW_DTV(dtv) \
> - (THREAD_DTV () = (dtv))
> -
> -/* Return dtv of given thread descriptor. */
> -# define GET_DTV(tcbp) \
> - (((tcbhead_t *) (tcbp))[-1].dtv)
> -
> -/* Code to initially initialize the thread pointer. This might need
> - special attention since 'errno' is not yet available and if the
> - operation can cause a failure 'errno' must not be touched. */
> -# define TLS_INIT_TP(tcbp, secondcall) \
> - ({ \
> - INTERNAL_SYSCALL_DECL (err); \
> - int _sys_result; \
> - \
> - _sys_result = INTERNAL_SYSCALL (set_thread_area, err, 1, \
> - ((void *) (tcbp)) + TLS_TCB_OFFSET); \
> - INTERNAL_SYSCALL_ERROR_P (_sys_result, err) ? "unknown error" : NULL; })
> -
> -extern void * __m68k_read_tp (void);
> -
> -/* Return the address of the dtv for the current thread. */
> -# define THREAD_DTV() \
> - (((tcbhead_t *) (__m68k_read_tp () - TLS_TCB_OFFSET))[-1].dtv)
> -
> -/* Return the thread descriptor for the current thread. */
> -# define THREAD_SELF \
> - ((struct pthread *) (__m68k_read_tp () - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE))
> -
> -/* Magic for libthread_db to know how to do THREAD_SELF. */
> -# define DB_THREAD_SELF \
> - CONST_THREAD_AREA (32, TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE)
> -
> -/* Access to data in the thread descriptor is easy. */
> -# define THREAD_GETMEM(descr, member) \
> - descr->member
> -# define THREAD_GETMEM_NC(descr, member, idx) \
> - descr->member[idx]
> -# define THREAD_SETMEM(descr, member, value) \
> - descr->member = (value)
> -# define THREAD_SETMEM_NC(descr, member, idx, value) \
> - descr->member[idx] = (value)
> -
> -/* l_tls_offset == 0 is perfectly valid on M68K, so we have to use some
> - different value to mean unset l_tls_offset. */
> -# define NO_TLS_OFFSET -1
> -
> -/* Get and set the global scope generation counter in struct pthread. */
> -#define THREAD_GSCOPE_FLAG_UNUSED 0
> -#define THREAD_GSCOPE_FLAG_USED 1
> -#define THREAD_GSCOPE_FLAG_WAIT 2
> -#define THREAD_GSCOPE_RESET_FLAG() \
> - do \
> - { int __res \
> - = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
> - THREAD_GSCOPE_FLAG_UNUSED); \
> - if (__res == THREAD_GSCOPE_FLAG_WAIT) \
> - lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \
> - } \
> - while (0)
> -#define THREAD_GSCOPE_SET_FLAG() \
> - do \
> - { \
> - THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \
> - atomic_write_barrier (); \
> - } \
> - while (0)
> -#define THREAD_GSCOPE_WAIT() \
> - GL(dl_wait_lookup_done) ()
> -
> -#endif /* __ASSEMBLER__ */
> -
> -#endif /* tls.h */
> --- sysdeps/m68k/tls-macros.h
> +++ sysdeps/m68k/tls-macros.h
> -/* Macros for accessing thread-local storage. m68k version.
> - Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#define TLS_GD(x) \
> - ({ \
> - void *__result; \
> - extern void *__tls_get_addr (void *); \
> - \
> - asm ("movel #_GLOBAL_OFFSET_TABLE_ at GOTPC, %0\n\t" \
> - "lea (-6, %%pc, %0), %0\n\t" \
> - "lea " #x "@TLSGD(%0), %0" \
> - : "=&a" (__result)); \
> - (int *) __tls_get_addr (__result); })
> -
> -#define TLS_LD(x) \
> - ({ \
> - char *__tp; \
> - int __offset; \
> - extern void *__tls_get_addr (void *); \
> - \
> - asm ("movel #_GLOBAL_OFFSET_TABLE_ at GOTPC, %0\n\t" \
> - "lea (-6, %%pc, %0), %0\n\t" \
> - "lea " #x "@TLSLDM(%0), %0" \
> - : "=&a" (__tp)); \
> - __tp = (char *) __tls_get_addr (__tp); \
> - asm ("movel #" #x "@TLSLDO, %0" \
> - : "=a" (__offset)); \
> - (int *) (__tp + __offset); })
> -
> -#define TLS_IE(x) \
> - ({ \
> - char *__tp; \
> - int __offset; \
> - extern void * __m68k_read_tp (void); \
> - \
> - __tp = (char *) __m68k_read_tp (); \
> - asm ("movel #_GLOBAL_OFFSET_TABLE_ at GOTPC, %0\n\t" \
> - "lea (-6, %%pc, %0), %0\n\t" \
> - "movel " #x "@TLSIE(%0), %0" \
> - : "=&a" (__offset)); \
> - (int *) (__tp + __offset); })
> -
> -#define TLS_LE(x) \
> - ({ \
> - char *__tp; \
> - int __offset; \
> - extern void * __m68k_read_tp (void); \
> - \
> - __tp = (char *) __m68k_read_tp (); \
> - asm ("movel #" #x "@TLSLE, %0" \
> - : "=a" (__offset)); \
> - (int *) (__tp + __offset); })
> -
> --- sysdeps/mips/bits/atomic.h
> +++ sysdeps/mips/bits/atomic.h
> @@ -69,16 +69,16 @@
> MIPS_PUSH_MIPS2 \
> rel "\n" \
> "1:\t" \
> - "ll %0,%5\n\t" \
> + "ll %0,%4\n\t" \
> "move %1,$0\n\t" \
> - "bne %0,%3,2f\n\t" \
> - "move %1,%4\n\t" \
> - "sc %1,%2\n\t" \
> + "bne %0,%2,2f\n\t" \
> + "move %1,%3\n\t" \
> + "sc %1,%4\n\t" \
> "beqz %1,1b\n" \
> acq "\n\t" \
> ".set pop\n" \
> "2:\n\t" \
> - : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem) \
> + : "=&r" (__prev), "=&r" (__cmp) \
> : "r" (oldval), "r" (newval), "m" (*mem) \
> : "memory")
>
> @@ -93,16 +93,16 @@
> MIPS_PUSH_MIPS2 \
> rel "\n" \
> "1:\t" \
> - "lld %0,%5\n\t" \
> + "lld %0,%4\n\t" \
> "move %1,$0\n\t" \
> - "bne %0,%3,2f\n\t" \
> - "move %1,%4\n\t" \
> - "scd %1,%2\n\t" \
> + "bne %0,%2,2f\n\t" \
> + "move %1,%3\n\t" \
> + "scd %1,%4\n\t" \
> "beqz %1,1b\n" \
> acq "\n\t" \
> ".set pop\n" \
> "2:\n\t" \
> - : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem) \
> + : "=&r" (__prev), "=&r" (__cmp) \
> : "r" (oldval), "r" (newval), "m" (*mem) \
> : "memory")
> #endif
> @@ -189,14 +189,14 @@
> MIPS_PUSH_MIPS2 \
> rel "\n" \
> "1:\t" \
> - "ll %0,%4\n\t" \
> - "move %1,%3\n\t" \
> - "sc %1,%2\n\t" \
> + "ll %0,%3\n\t" \
> + "move %1,%2\n\t" \
> + "sc %1,%3\n\t" \
> "beqz %1,1b\n" \
> acq "\n\t" \
> ".set pop\n" \
> "2:\n\t" \
> - : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem) \
> + : "=&r" (__prev), "=&r" (__cmp) \
> : "r" (newval), "m" (*mem) \
> : "memory"); \
> __prev; })
> @@ -213,14 +213,14 @@
> MIPS_PUSH_MIPS2 \
> rel "\n" \
> "1:\n" \
> - "lld %0,%4\n\t" \
> - "move %1,%3\n\t" \
> - "scd %1,%2\n\t" \
> + "lld %0,%3\n\t" \
> + "move %1,%2\n\t" \
> + "scd %1,%3\n\t" \
> "beqz %1,1b\n" \
> acq "\n\t" \
> ".set pop\n" \
> "2:\n\t" \
> - : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem) \
> + : "=&r" (__prev), "=&r" (__cmp) \
> : "r" (newval), "m" (*mem) \
> : "memory"); \
> __prev; })
> @@ -248,14 +248,14 @@
> MIPS_PUSH_MIPS2 \
> rel "\n" \
> "1:\t" \
> - "ll %0,%4\n\t" \
> - "addu %1,%0,%3\n\t" \
> - "sc %1,%2\n\t" \
> + "ll %0,%3\n\t" \
> + "addu %1,%0,%2\n\t" \
> + "sc %1,%3\n\t" \
> "beqz %1,1b\n" \
> acq "\n\t" \
> ".set pop\n" \
> "2:\n\t" \
> - : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem) \
> + : "=&r" (__prev), "=&r" (__cmp) \
> : "r" (value), "m" (*mem) \
> : "memory"); \
> __prev; })
> @@ -272,14 +272,14 @@
> MIPS_PUSH_MIPS2 \
> rel "\n" \
> "1:\t" \
> - "lld %0,%4\n\t" \
> - "daddu %1,%0,%3\n\t" \
> - "scd %1,%2\n\t" \
> + "lld %0,%3\n\t" \
> + "daddu %1,%0,%2\n\t" \
> + "scd %1,%3\n\t" \
> "beqz %1,1b\n" \
> acq "\n\t" \
> ".set pop\n" \
> "2:\n\t" \
> - : "=&r" (__prev), "=&r" (__cmp), "=m" (*mem) \
> + : "=&r" (__prev), "=&r" (__cmp) \
> : "r" (value), "m" (*mem) \
> : "memory"); \
> __prev; })
> --- sysdeps/mips/dl-lookup.c
> +++ sysdeps/mips/dl-lookup.c
> @@ -1,7 +1,6 @@
> /* Look up a symbol in the loaded objects.
> MIPS/Linux version - special handling of non-PIC undefined symbol rules.
> - Copyright (C) 1995-2005, 2006, 2007, 2009, 2010
> - Free Software Foundation, Inc.
> + Copyright (C) 1995-2005, 2006, 2007, 2009 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> The GNU C Library is free software; you can redistribute it and/or
> @@ -330,16 +329,16 @@
> definition we have to use it. */
> void enter (struct unique_sym *table, size_t size,
> unsigned int hash, const char *name,
> - const ElfW(Sym) *sym, struct link_map *map)
> + const ElfW(Sym) *sym, const struct link_map *map)
> {
> size_t idx = hash % size;
> size_t hash2 = 1 + hash % (size - 2);
> while (1)
> {
> - if (table[idx].name == NULL)
> + if (table[idx].hashval == 0)
> {
> table[idx].hashval = hash;
> - table[idx].name = name;
> + table[idx].name = strtab + sym->st_name;
> if ((type_class & ELF_RTYPE_CLASS_COPY) != 0)
> {
> table[idx].sym = ref;
> @@ -349,13 +348,7 @@
> {
> table[idx].sym = sym;
> table[idx].map = map;
> -
> - if (map->l_type == lt_loaded)
> - /* Make sure we don't unload this object by
> - setting the appropriate flag. */
> - map->l_flags_1 |= DF_1_NODELETE;
> }
> -
> return;
> }
>
> @@ -387,7 +380,8 @@
> return 1;
> }
>
> - if (entries[idx].name == NULL)
> + if (entries[idx].hashval == 0
> + && entries[idx].name == NULL)
> break;
>
> idx += hash2;
> @@ -395,14 +389,10 @@
> idx -= size;
> }
>
> - if (size * 3 <= tab->n_elements * 4)
> + if (size * 3 <= tab->n_elements)
> {
> /* Expand the table. */
> -#ifdef RTLD_CHECK_FOREIGN_CALL
> - /* This must not happen during runtime relocations. */
> - assert (!RTLD_CHECK_FOREIGN_CALL);
> -#endif
> - size_t newsize = _dl_higher_prime_number (size + 1);
> + size_t newsize = _dl_higher_prime_number (size);
> struct unique_sym *newentries
> = calloc (sizeof (struct unique_sym), newsize);
> if (newentries == NULL)
> @@ -413,39 +403,19 @@
> }
>
> for (idx = 0; idx < size; ++idx)
> - if (entries[idx].name != NULL)
> + if (entries[idx].hashval != 0)
> enter (newentries, newsize, entries[idx].hashval,
> entries[idx].name, entries[idx].sym,
> entries[idx].map);
>
> tab->free (entries);
> tab->size = newsize;
> - size = newsize;
> entries = tab->entries = newentries;
> tab->free = free;
> }
> }
> else
> {
> -#ifdef RTLD_CHECK_FOREIGN_CALL
> - /* This must not happen during runtime relocations. */
> - assert (!RTLD_CHECK_FOREIGN_CALL);
> -#endif
> -
> -#ifdef SHARED
> - /* If tab->entries is NULL, but tab->size is not, it means
> - this is the second, conflict finding, lookup for
> - LD_TRACE_PRELINKING in _dl_debug_bindings. Don't
> - allocate anything and don't enter anything into the
> - hash table. */
> - if (__builtin_expect (tab->size, 0))
> - {
> - assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK);
> - __rtld_lock_unlock_recursive (tab->lock);
> - goto success;
> - }
> -#endif
> -
> #define INITIAL_NUNIQUE_SYM_TABLE 31
> size = INITIAL_NUNIQUE_SYM_TABLE;
> entries = calloc (sizeof (struct unique_sym), size);
> @@ -457,8 +427,7 @@
> tab->free = free;
> }
>
> - enter (entries, size, new_hash, strtab + sym->st_name, sym,
> - (struct link_map *) map);
> + enter (entries, size, new_hash, strtab + sym->st_name, sym, map);
> ++tab->n_elements;
>
> __rtld_lock_unlock_recursive (tab->lock);
> @@ -641,10 +610,6 @@
> unsigned int max
> = undef_map->l_reldepsmax ? undef_map->l_reldepsmax * 2 : 10;
>
> -#ifdef RTLD_PREPARE_FOREIGN_CALL
> - RTLD_PREPARE_FOREIGN_CALL;
> -#endif
> -
> newp = malloc (sizeof (*newp) + max * sizeof (struct link_map *));
> if (newp == NULL)
> {
> @@ -809,7 +774,7 @@
> if (__builtin_expect (protected != 0, 0))
> {
> /* It is very tricky. We need to figure out what value to
> - return for the protected symbol. */
> + return for the protected symbol. */
> if (type_class == ELF_RTYPE_CLASS_PLT)
> {
> if (current_value.s != NULL && current_value.m != undef_map)
> @@ -854,8 +819,7 @@
> version, type_class, flags, skip_map);
>
> /* The object is used. */
> - if (__builtin_expect (current_value.m->l_used == 0, 0))
> - current_value.m->l_used = 1;
> + current_value.m->l_used = 1;
>
> if (__builtin_expect (GLRO(dl_debug_mask)
> & (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
> @@ -877,7 +841,7 @@
> Elf_Symndx nchain;
>
> if (__builtin_expect (map->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM
> - + DT_THISPROCNUM + DT_VERSIONTAGNUM
> + + DT_THISPROCNUM + DT_VERSIONTAGNUM
> + DT_EXTRANUM + DT_VALNUM] != NULL, 1))
> {
> Elf32_Word *hash32
> @@ -949,48 +913,13 @@
> {
> const uint_fast32_t new_hash = dl_new_hash (undef_name);
> unsigned long int old_hash = 0xffffffff;
> - struct unique_sym *saved_entries
> - = GL(dl_ns)[LM_ID_BASE]._ns_unique_sym_table.entries;
>
> - GL(dl_ns)[LM_ID_BASE]._ns_unique_sym_table.entries = NULL;
> do_lookup_x (undef_name, new_hash, &old_hash, *ref, &val,
> undef_map->l_local_scope[0], 0, version, 0, NULL,
> type_class, undef_map);
> +
> if (val.s != value->s || val.m != value->m)
> conflict = 1;
> - else if (__builtin_expect (undef_map->l_symbolic_in_local_scope, 0)
> - && val.s
> - && __builtin_expect (ELFW(ST_BIND) (val.s->st_info),
> - STB_GLOBAL) == STB_GNU_UNIQUE)
> - {
> - /* If it is STB_GNU_UNIQUE and undef_map's l_local_scope
> - contains any DT_SYMBOLIC libraries, unfortunately there
> - can be conflicts even if the above is equal. As symbol
> - resolution goes from the last library to the first and
> - if a STB_GNU_UNIQUE symbol is found in some late DT_SYMBOLIC
> - library, it would be the one that is looked up. */
> - struct sym_val val2 = { NULL, NULL };
> - size_t n;
> - struct r_scope_elem *scope = undef_map->l_local_scope[0];
> -
> - for (n = 0; n < scope->r_nlist; n++)
> - if (scope->r_list[n] == val.m)
> - break;
> -
> - for (n++; n < scope->r_nlist; n++)
> - if (scope->r_list[n]->l_info[DT_SYMBOLIC] != NULL
> - && do_lookup_x (undef_name, new_hash, &old_hash, *ref,
> - &val2,
> - &scope->r_list[n]->l_symbolic_searchlist,
> - 0, version, 0, NULL, type_class,
> - undef_map) > 0)
> - {
> - conflict = 1;
> - val = val2;
> - break;
> - }
> - }
> - GL(dl_ns)[LM_ID_BASE]._ns_unique_sym_table.entries = saved_entries;
> }
>
> if (value->s)
> --- sysdeps/mips/dl-machine.h
> +++ sysdeps/mips/dl-machine.h
> @@ -75,6 +75,15 @@
> (ElfW(Addr)) (r); \
> } while (0)
>
> +/* Allow ABIVERSION == 1, meaning PLTs and copy relocations are
> + required. */
> +#define VALID_ELF_ABIVERSION(ver) (ver == 0 || ver == 2)
> +#define VALID_ELF_OSABI(osabi) (osabi == ELFOSABI_SYSV)
> +#define VALID_ELF_HEADER(hdr,exp,size) \
> + memcmp (hdr,exp,size-2) == 0 \
> + && VALID_ELF_OSABI (hdr[EI_OSABI]) \
> + && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION])
> +
> /* Return nonzero iff ELF header is compatible with the running host. */
> static inline int __attribute_used__
> elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
> --- sysdeps/mips/dl-trampoline.c
> +++ sysdeps/mips/dl-trampoline.c
> @@ -278,13 +278,13 @@
> .frame $29, " STRINGXP(ELF_DL_FRAME_SIZE) ", $31\n\
> .set noreorder\n\
> # Save GP.\n\
> -1: move $3, $28\n\
> + move $3, $28\n\
> # Save arguments and sp value in stack.\n\
> " STRINGXP(PTR_SUBIU) " $29, " STRINGXP(ELF_DL_FRAME_SIZE) "\n\
> # Modify t9 ($25) so as to point .cpload instruction.\n\
> - " IFABIO32(STRINGXP(PTR_ADDIU) " $25, (2f-1b)\n") "\
> + " IFABIO32(STRINGXP(PTR_ADDIU) " $25, 12\n") "\
> # Compute GP.\n\
> -2: " STRINGXP(SETUP_GP) "\n\
> + " STRINGXP(SETUP_GP) "\n\
> " STRINGXV(SETUP_GP64 (0, _dl_runtime_resolve)) "\n\
> .set reorder\n\
> # Save slot call pc.\n\
> @@ -334,13 +334,13 @@
> .frame $29, " STRINGXP(ELF_DL_PLT_FRAME_SIZE) ", $31\n\
> .set noreorder\n\
> # Save arguments and sp value in stack.\n\
> -1: " STRINGXP(PTR_SUBIU) " $29, " STRINGXP(ELF_DL_PLT_FRAME_SIZE) "\n\
> + " STRINGXP(PTR_SUBIU) " $29, " STRINGXP(ELF_DL_PLT_FRAME_SIZE) "\n\
> " IFABIO32(STRINGXP(PTR_L) " $13, " STRINGXP(PTRSIZE) "($28)") "\n\
> " IFNEWABI(STRINGXP(PTR_L) " $13, " STRINGXP(PTRSIZE) "($14)") "\n\
> # Modify t9 ($25) so as to point .cpload instruction.\n\
> - " IFABIO32(STRINGXP(PTR_ADDIU) " $25, (2f-1b)\n") "\
> + " IFABIO32(STRINGXP(PTR_ADDIU) " $25, 12\n") "\
> # Compute GP.\n\
> -2: " STRINGXP(SETUP_GP) "\n\
> + " STRINGXP(SETUP_GP) "\n\
> " STRINGXV(SETUP_GP64 (0, _dl_runtime_pltresolve)) "\n\
> .set reorder\n\
> " IFABIO32(STRINGXP(CPRESTORE(32))) "\n\
> --- sysdeps/mips/fpu/fegetenv.c
> +++ sysdeps/mips/fpu/fegetenv.c
> @@ -1,5 +1,5 @@
> /* Store current floating-point environment.
> - Copyright (C) 1998, 1999, 2000, 2002, 2010 Free Software Foundation, Inc.
> + Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
> Contributed by Andreas Jaeger <aj at suse.de>, 1998.
>
> @@ -29,4 +29,3 @@
> /* Success. */
> return 0;
> }
> -libm_hidden_def (fegetenv)
> --- sysdeps/powerpc/nofpu/fegetenv.c
> +++ sysdeps/powerpc/nofpu/fegetenv.c
> @@ -1,6 +1,6 @@
> /* Store current floating-point environment (soft-float edition).
> Copyright (C) 2002 Free Software Foundation, Inc.
> - Contributed by Aldy Hernandez <aldyh at redhat.com>, 2002, 2010.
> + Contributed by Aldy Hernandez <aldyh at redhat.com>, 2002.
> This file is part of the GNU C Library.
>
> The GNU C Library is free software; you can redistribute it and/or
> @@ -46,5 +46,4 @@
> compat_symbol (libm, BP_SYM (__old_fegetenv), BP_SYM (fegetenv), GLIBC_2_1);
> #endif
>
> -libm_hidden_ver (__fegetenv, fegetenv)
> versioned_symbol (libm, BP_SYM (__fegetenv), BP_SYM (fegetenv), GLIBC_2_2);
> --- sysdeps/unix/alpha/sysdep.h
> +++ sysdeps/unix/alpha/sysdep.h
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004, 2006, 2010
> +/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004, 2006
> Free Software Foundation, Inc.
> This file is part of the GNU C Library.
> Contributed by Brendan Kehoe (brendan at zen.org).
> @@ -191,10 +191,8 @@
> })
>
> #define INTERNAL_SYSCALL_DECL(err) long int err
> -/* Make sure and "use" the variable that we're not returning,
> - in order to suppress unused variable warnings. */
> -#define INTERNAL_SYSCALL_ERROR_P(val, err) ((void)val, err)
> -#define INTERNAL_SYSCALL_ERRNO(val, err) ((void)err, val)
> +#define INTERNAL_SYSCALL_ERROR_P(val, err) err
> +#define INTERNAL_SYSCALL_ERRNO(val, err) val
>
> #define inline_syscall_clobbers \
> "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \
> @@ -430,21 +428,11 @@
> # define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
> # define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
> # else
> -extern const uintptr_t __pointer_chk_guard attribute_relro;
> +extern uintptr_t __pointer_chk_guard attribute_relro;
> # define PTR_MANGLE(var) \
> - (var) = (__typeof(var)) ((uintptr_t) (var) ^ __pointer_chk_guard)
> + (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
> # define PTR_DEMANGLE(var) PTR_MANGLE(var)
> # endif
> -#else
> -/* There exists generic C code that assumes that PTR_MANGLE is always
> - defined. When generating code for the static libc, we don't have
> - __pointer_chk_guard defined. Nor is there any place that would
> - initialize it if it were defined, so there's little point in doing
> - anything more than nothing. */
> -# ifndef __ASSEMBLER__
> -# define PTR_MANGLE(var)
> -# define PTR_DEMANGLE(var)
> -# endif
> #endif
>
> #endif /* ASSEMBLER */
> --- sysdeps/unix/arm/sysdep.S
> +++ sysdeps/unix/arm/sysdep.S
> @@ -1,5 +1,5 @@
> /* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2002, 2003,
> - 2004, 2005, 2009
> + 2004, 2005
> Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> @@ -44,7 +44,6 @@
>
> #if USE___THREAD
> mov ip, lr
> - cfi_register (lr, ip)
> mov r1, r0
>
> mov r0, #0xffff0fff
> @@ -67,13 +66,9 @@
> 1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8
> #elif defined(_LIBC_REENTRANT)
> str lr, [sp, #-4]!
> - cfi_adjust_cfa_offset (4)
> - cfi_rel_offset (lr, 0)
> str r0, [sp, #-4]!
> - cfi_adjust_cfa_offset (4)
> bl PLTJMP(C_SYMBOL_NAME(__errno_location))
> ldr r1, [sp], #4
> - cfi_adjust_cfa_offset (-4)
> str r1, [r0]
> mvn r0, $0
> ldr pc, [sp], #4
> --- sysdeps/unix/sysv/linux/alpha/Versions
> +++ sysdeps/unix/sysv/linux/alpha/Versions
> @@ -77,10 +77,6 @@
> #errlist-compat 138
> _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
> }
> - GLIBC_2.12 {
> - #errlist-compat 139
> - _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
> - }
> GLIBC_PRIVATE {
> __libc_alpha_cache_shape;
> }
> --- sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S
> +++ sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S
> -/* Copyright (C) 1992, 1994, 1997, 2006, 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#include <sysdep.h>
> -#include <jmpbuf-offsets.h>
> -
> -
> - .section .rodata.str1.1,"aMS", at progbits,1
> - .type longjmp_msg, at object
> -longjmp_msg:
> - .string "longjmp causes uninitialized stack frame"
> - .size longjmp_msg, .-longjmp_msg
> -
> -
> -/* Jump to the position specified by ENV, causing the
> - setjmp call there to return VAL, or 1 if VAL is 0.
> - void __longjmp (__jmp_buf env, int val). */
> - .text
> - .align 4
> - .globl ____longjmp_chk
> - .type ____longjmp_chk, @function
> - .usepv ____longjmp_chk, std
> -
> - cfi_startproc
> -____longjmp_chk:
> - ldgp gp, 0(pv)
> -#ifdef PROF
> - .set noat
> - lda AT, _mcount
> - jsr AT, (AT), _mcount
> - .set at
> -#endif
> -
> - ldq s2, JB_PC*8(a0)
> - mov a0, s0
> - ldq fp, JB_FP*8(a0)
> - mov a1, s1
> - ldq s3, JB_SP*8(a0)
> - cmoveq s1, 1, s1
> -
> -#ifdef PTR_DEMANGLE
> - PTR_DEMANGLE(s2, t1)
> - PTR_DEMANGLE2(s3, t1)
> - PTR_DEMANGLE2(fp, t1)
> -#endif
> - cmpule t0, sp, t1
> - bne t1, .Lfail
> -
> - .align 4
> -.Lok:
> - mov s0, a0
> - mov s1, v0
> - mov s3, t0
> - mov s2, ra
> - cfi_remember_state
> - cfi_def_cfa(a0, 0)
> - cfi_register(sp, t0)
> - cfi_offset(s0, JB_S0*8)
> - cfi_offset(s1, JB_S1*8)
> - cfi_offset(s2, JB_S2*8)
> - cfi_offset(s3, JB_S3*8)
> - cfi_offset(s4, JB_S4*8)
> - cfi_offset(s5, JB_S5*8)
> - cfi_offset(s3, JB_S3*8)
> - cfi_offset($f2, JB_F2*8)
> - cfi_offset($f3, JB_F3*8)
> - cfi_offset($f4, JB_F4*8)
> - cfi_offset($f5, JB_F5*8)
> - cfi_offset($f6, JB_F6*8)
> - cfi_offset($f7, JB_F7*8)
> - cfi_offset($f8, JB_F8*8)
> - cfi_offset($f9, JB_F9*8)
> - ldq s0, JB_S0*8(a0)
> - ldq s1, JB_S1*8(a0)
> - ldq s2, JB_S2*8(a0)
> - ldq s3, JB_S3*8(a0)
> - ldq s4, JB_S4*8(a0)
> - ldq s5, JB_S5*8(a0)
> - ldt $f2, JB_F2*8(a0)
> - ldt $f3, JB_F3*8(a0)
> - ldt $f4, JB_F4*8(a0)
> - ldt $f5, JB_F5*8(a0)
> - ldt $f6, JB_F6*8(a0)
> - ldt $f7, JB_F7*8(a0)
> - ldt $f8, JB_F8*8(a0)
> - ldt $f9, JB_F9*8(a0)
> - mov t0, sp
> - ret
> -
> - .align 4
> -.Lfail:
> - cfi_restore_state
> - lda v0, __NR_sigaltstack
> - lda a0, 0
> - lda a1, -32(sp)
> - lda sp, -32(sp)
> - cfi_adjust_cfa_offset(32)
> - callsys
> - ldq t0, 0(sp) /* ss_sp */
> - ldl t1, 8(sp) /* ss_flags */
> - ldq t2, 16(sp) /* ss_size */
> - lda sp, 32(sp)
> - cfi_adjust_cfa_offset(-32)
> -
> - /* Without working sigaltstack we cannot perform the test. */
> - bne a3, .Lok
> -
> - addq t0, t2, t0 /* t0 = ss_sp + ss_size */
> - subq t0, s3, t0 /* t0 = (ss_sp + ss_size) - new_sp */
> - cmpule t2, t0, t0 /* t0 = (t0 >= ss_size) */
> - and t0, t1, t0 /* t0 = (t0 >= ss_size) & (ss_flags & SS_ONSTACK) */
> - bne t0, .Lok
> -
> - ldah a0, longjmp_msg(gp) !gprelhigh
> - lda a0, longjmp_msg(a0) !gprellow
> -#ifdef PIC
> - jsr ra, HIDDEN_JUMPTARGET(__fortify_fail)
> -#else
> - bsr ra, HIDDEN_JUMPTARGET(__fortify_fail) !samegp
> -#endif
> - bugchk
> -
> - cfi_endproc
> - .size ____longjmp_chk, .-____longjmp_chk
> --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
> +++ sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
> @@ -1,5 +1,5 @@
> /* O_*, F_*, FD_* bit values for Linux.
> - Copyright (C) 1995-2000,2004,2005,2006,2007,2010 Free Software Foundation, Inc.
> + Copyright (C) 1995-2000,2004,2005,2006,2007 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
> @@ -41,18 +41,16 @@
> #define O_NONBLOCK 00004
> #define O_APPEND 00010
> #define O_NDELAY O_NONBLOCK
> -#define O_SYNC 020040000
> +#define O_SYNC 040000
> #define O_FSYNC O_SYNC
> #define O_ASYNC 020000 /* fcntl, for BSD compatibility */
>
> -#ifdef __USE_XOPEN2K8
> +#ifdef __USE_GNU
> # define O_DIRECTORY 0100000 /* Must be a directory. */
> # define O_NOFOLLOW 0200000 /* Do not follow links. */
> -# define O_CLOEXEC 010000000 /* Set close_on_exec. */
> -#endif
> -#ifdef __USE_GNU
> # define O_DIRECT 02000000 /* Direct disk access. */
> # define O_NOATIME 04000000 /* Do not set atime. */
> +# define O_CLOEXEC 010000000 /* Set close_on_exec. */
> #endif
>
> #ifdef __USE_LARGEFILE64
> @@ -64,7 +62,7 @@
> We define the symbols here but let them do the same as O_SYNC since
> this is a superset. */
> #if defined __USE_POSIX199309 || defined __USE_UNIX98
> -# define O_DSYNC 040000 /* Synchronize data. */
> +# define O_DSYNC O_SYNC /* Synchronize data. */
> # define O_RSYNC O_SYNC /* Synchronize read operations. */
> #endif
>
> @@ -81,7 +79,7 @@
> #define F_SETLK64 F_SETLK /* Set record locking info (non-blocking). */
> #define F_SETLKW64 F_SETLKW /* Set record locking info (blocking). */
>
> -#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
> +#if defined __USE_BSD || defined __USE_UNIX98
> # define F_SETOWN 5 /* Get owner of socket (receiver of SIGIO). */
> # define F_GETOWN 6 /* Set owner of socket (receiver of SIGIO). */
> #endif
> @@ -89,16 +87,12 @@
> #ifdef __USE_GNU
> # define F_SETSIG 10 /* Set number of signal to be sent. */
> # define F_GETSIG 11 /* Get number of signal to be sent. */
> -# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
> -# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
> #endif
>
> #ifdef __USE_GNU
> # define F_SETLEASE 1024 /* Set a lease. */
> # define F_GETLEASE 1025 /* Enquire what lease is active. */
> # define F_NOTIFY 1026 /* Request notfications on a directory. */
> -#endif
> -#ifdef __USE_XOPEN2K8
> # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
> close-on-exit set. */
> #endif
> @@ -163,23 +157,6 @@
> };
> #endif
>
> -#ifdef __USE_GNU
> -/* Owner types. */
> -enum __pid_type
> - {
> - F_OWNER_TID = 0, /* Kernel thread. */
> - F_OWNER_PID, /* Process. */
> - F_OWNER_PGRP, /* Process group. */
> - F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
> - };
> -
> -/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
> -struct f_owner_ex
> - {
> - enum __pid_type type; /* Owner type of ID. */
> - __pid_t pid; /* ID of owner. */
> - };
> -#endif
>
> /* Define some more compatibility macros to be backward compatible with
> BSD systems which did not managed to hide these kernel macros. */
> @@ -233,7 +210,7 @@
>
>
> /* Selective file content synch'ing. */
> -extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
> +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
> unsigned int __flags);
>
>
> --- sysdeps/unix/sysv/linux/alpha/bits/mman.h
> +++ sysdeps/unix/sysv/linux/alpha/bits/mman.h
> @@ -1,6 +1,5 @@
> /* Definitions for POSIX memory map interface. Linux/Alpha version.
> - Copyright (C) 1997, 1998, 2000, 2003, 2006, 2009
> - Free Software Foundation, Inc.
> + Copyright (C) 1997, 1998, 2000, 2003, 2006 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
> @@ -92,17 +91,14 @@
>
> /* Advice to `madvise'. */
> #ifdef __USE_BSD
> -# define MADV_NORMAL 0 /* No further special treatment. */
> -# define MADV_RANDOM 1 /* Expect random page references. */
> -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
> -# define MADV_WILLNEED 3 /* Will need these pages. */
> -# define MADV_DONTNEED 6 /* Don't need these pages. */
> -# define MADV_REMOVE 9 /* Remove these pages and resources. */
> -# define MADV_DONTFORK 10 /* Do not inherit across fork. */
> -# define MADV_DOFORK 11 /* Do inherit across fork. */
> -# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
> -# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
> -# define MADV_HWPOISON 100 /* Poison a page for testing. */
> +# define MADV_NORMAL 0 /* No further special treatment. */
> +# define MADV_RANDOM 1 /* Expect random page references. */
> +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
> +# define MADV_WILLNEED 3 /* Will need these pages. */
> +# define MADV_DONTNEED 6 /* Don't need these pages. */
> +# define MADV_REMOVE 9 /* Remove these pages and resources. */
> +# define MADV_DONTFORK 10 /* Do not inherit across fork. */
> +# define MADV_DOFORK 11 /* Do inherit across fork. */
> #endif
>
> /* The POSIX people had to invent similar names for the same things. */
> --- sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
> +++ sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
> @@ -1,5 +1,5 @@
> /* The proper definitions for Linux/Alpha sigaction.
> - Copyright (C) 1996, 1997, 1999, 2000, 2010 Free Software Foundation, Inc.
> + Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> The GNU C Library is free software; you can redistribute it and/or
> @@ -54,8 +54,6 @@
> three arguments instead of one. */
> #if defined __USE_UNIX98 || defined __USE_MISC
> # define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
> -#endif
> -#if defined __USE_UNIX98 || defined __USE_MISC || defined __USE_XOPEN2K8
> # define SA_RESTART 0x00000002 /* Restart syscall on signal return. */
> # define SA_NODEFER 0x00000008 /* Don't automatically block the signal
> when its handler is being executed. */
> --- sysdeps/unix/sysv/linux/alpha/bits/socket.h
> +++ sysdeps/unix/sysv/linux/alpha/bits/socket.h
> -/* System-specific socket constants and types. Linux version.
> - Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009, 2010
> - Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#ifndef __BITS_SOCKET_H
> -#define __BITS_SOCKET_H
> -
> -#ifndef _SYS_SOCKET_H
> -# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
> -#endif
> -
> -#define __need_size_t
> -#include <stddef.h>
> -
> -#include <sys/types.h>
> -
> -/* Type for length arguments in socket calls. */
> -#ifndef __socklen_t_defined
> -typedef __socklen_t socklen_t;
> -# define __socklen_t_defined
> -#endif
> -
> -/* Types of sockets. */
> -enum __socket_type
> -{
> - SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
> - byte streams. */
> -#define SOCK_STREAM SOCK_STREAM
> - SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
> - of fixed maximum length. */
> -#define SOCK_DGRAM SOCK_DGRAM
> - SOCK_RAW = 3, /* Raw protocol interface. */
> -#define SOCK_RAW SOCK_RAW
> - SOCK_RDM = 4, /* Reliably-delivered messages. */
> -#define SOCK_RDM SOCK_RDM
> - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
> - datagrams of fixed maximum length. */
> -#define SOCK_SEQPACKET SOCK_SEQPACKET
> - SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */
> -#define SOCK_DCCP SOCK_DCCP
> - SOCK_PACKET = 10, /* Linux specific way of getting packets
> - at the dev level. For writing rarp and
> - other similar things on the user level. */
> -#define SOCK_PACKET SOCK_PACKET
> -
> - /* Flags to be ORed into the type parameter of socket and socketpair and
> - used for the flags parameter of paccept. */
> -
> - SOCK_CLOEXEC = 010000000, /* Atomically set close-on-exec flag for the
> - new descriptor(s). */
> -#define SOCK_CLOEXEC SOCK_CLOEXEC
> - SOCK_NONBLOCK = 0x40000000 /* Atomically mark descriptor(s) as
> - non-blocking. */
> -#define SOCK_NONBLOCK SOCK_NONBLOCK
> -};
> -
> -/* Protocol families. */
> -#define PF_UNSPEC 0 /* Unspecified. */
> -#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */
> -#define PF_UNIX PF_LOCAL /* POSIX name for PF_LOCAL. */
> -#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */
> -#define PF_INET 2 /* IP protocol family. */
> -#define PF_AX25 3 /* Amateur Radio AX.25. */
> -#define PF_IPX 4 /* Novell Internet Protocol. */
> -#define PF_APPLETALK 5 /* Appletalk DDP. */
> -#define PF_NETROM 6 /* Amateur radio NetROM. */
> -#define PF_BRIDGE 7 /* Multiprotocol bridge. */
> -#define PF_ATMPVC 8 /* ATM PVCs. */
> -#define PF_X25 9 /* Reserved for X.25 project. */
> -#define PF_INET6 10 /* IP version 6. */
> -#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */
> -#define PF_DECnet 12 /* Reserved for DECnet project. */
> -#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */
> -#define PF_SECURITY 14 /* Security callback pseudo AF. */
> -#define PF_KEY 15 /* PF_KEY key management API. */
> -#define PF_NETLINK 16
> -#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */
> -#define PF_PACKET 17 /* Packet family. */
> -#define PF_ASH 18 /* Ash. */
> -#define PF_ECONET 19 /* Acorn Econet. */
> -#define PF_ATMSVC 20 /* ATM SVCs. */
> -#define PF_RDS 21 /* RDS sockets. */
> -#define PF_SNA 22 /* Linux SNA Project */
> -#define PF_IRDA 23 /* IRDA sockets. */
> -#define PF_PPPOX 24 /* PPPoX sockets. */
> -#define PF_WANPIPE 25 /* Wanpipe API sockets. */
> -#define PF_LLC 26 /* Linux LLC. */
> -#define PF_CAN 29 /* Controller Area Network. */
> -#define PF_TIPC 30 /* TIPC sockets. */
> -#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
> -#define PF_IUCV 32 /* IUCV sockets. */
> -#define PF_RXRPC 33 /* RxRPC sockets. */
> -#define PF_ISDN 34 /* mISDN sockets. */
> -#define PF_PHONET 35 /* Phonet sockets. */
> -#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */
> -#define PF_MAX 37 /* For now.. */
> -
> -/* Address families. */
> -#define AF_UNSPEC PF_UNSPEC
> -#define AF_LOCAL PF_LOCAL
> -#define AF_UNIX PF_UNIX
> -#define AF_FILE PF_FILE
> -#define AF_INET PF_INET
> -#define AF_AX25 PF_AX25
> -#define AF_IPX PF_IPX
> -#define AF_APPLETALK PF_APPLETALK
> -#define AF_NETROM PF_NETROM
> -#define AF_BRIDGE PF_BRIDGE
> -#define AF_ATMPVC PF_ATMPVC
> -#define AF_X25 PF_X25
> -#define AF_INET6 PF_INET6
> -#define AF_ROSE PF_ROSE
> -#define AF_DECnet PF_DECnet
> -#define AF_NETBEUI PF_NETBEUI
> -#define AF_SECURITY PF_SECURITY
> -#define AF_KEY PF_KEY
> -#define AF_NETLINK PF_NETLINK
> -#define AF_ROUTE PF_ROUTE
> -#define AF_PACKET PF_PACKET
> -#define AF_ASH PF_ASH
> -#define AF_ECONET PF_ECONET
> -#define AF_ATMSVC PF_ATMSVC
> -#define AF_RDS PF_RDS
> -#define AF_SNA PF_SNA
> -#define AF_IRDA PF_IRDA
> -#define AF_PPPOX PF_PPPOX
> -#define AF_WANPIPE PF_WANPIPE
> -#define AF_LLC PF_LLC
> -#define AF_CAN PF_CAN
> -#define AF_TIPC PF_TIPC
> -#define AF_BLUETOOTH PF_BLUETOOTH
> -#define AF_IUCV PF_IUCV
> -#define AF_RXRPC PF_RXRPC
> -#define AF_ISDN PF_ISDN
> -#define AF_PHONET PF_PHONET
> -#define AF_IEEE802154 PF_IEEE802154
> -#define AF_MAX PF_MAX
> -
> -/* Socket level values. Others are defined in the appropriate headers.
> -
> - XXX These definitions also should go into the appropriate headers as
> - far as they are available. */
> -#define SOL_RAW 255
> -#define SOL_DECNET 261
> -#define SOL_X25 262
> -#define SOL_PACKET 263
> -#define SOL_ATM 264 /* ATM layer (cell level). */
> -#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */
> -#define SOL_IRDA 266
> -
> -/* Maximum queue length specifiable by listen. */
> -#define SOMAXCONN 128
> -
> -/* Get the definition of the macro to define the common sockaddr members. */
> -#include <bits/sockaddr.h>
> -
> -/* Structure describing a generic socket address. */
> -struct sockaddr
> - {
> - __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */
> - char sa_data[14]; /* Address data. */
> - };
> -
> -
> -/* Structure large enough to hold any socket address (with the historical
> - exception of AF_UNIX). We reserve 128 bytes. */
> -#define __ss_aligntype unsigned long int
> -#define _SS_SIZE 128
> -#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype)))
> -
> -struct sockaddr_storage
> - {
> - __SOCKADDR_COMMON (ss_); /* Address family, etc. */
> - __ss_aligntype __ss_align; /* Force desired alignment. */
> - char __ss_padding[_SS_PADSIZE];
> - };
> -
> -
> -/* Bits in the FLAGS argument to `send', `recv', et al. */
> -enum
> - {
> - MSG_OOB = 0x01, /* Process out-of-band data. */
> -#define MSG_OOB MSG_OOB
> - MSG_PEEK = 0x02, /* Peek at incoming messages. */
> -#define MSG_PEEK MSG_PEEK
> - MSG_DONTROUTE = 0x04, /* Don't use local routing. */
> -#define MSG_DONTROUTE MSG_DONTROUTE
> -#ifdef __USE_GNU
> - /* DECnet uses a different name. */
> - MSG_TRYHARD = MSG_DONTROUTE,
> -# define MSG_TRYHARD MSG_DONTROUTE
> -#endif
> - MSG_CTRUNC = 0x08, /* Control data lost before delivery. */
> -#define MSG_CTRUNC MSG_CTRUNC
> - MSG_PROXY = 0x10, /* Supply or ask second address. */
> -#define MSG_PROXY MSG_PROXY
> - MSG_TRUNC = 0x20,
> -#define MSG_TRUNC MSG_TRUNC
> - MSG_DONTWAIT = 0x40, /* Nonblocking IO. */
> -#define MSG_DONTWAIT MSG_DONTWAIT
> - MSG_EOR = 0x80, /* End of record. */
> -#define MSG_EOR MSG_EOR
> - MSG_WAITALL = 0x100, /* Wait for a full request. */
> -#define MSG_WAITALL MSG_WAITALL
> - MSG_FIN = 0x200,
> -#define MSG_FIN MSG_FIN
> - MSG_SYN = 0x400,
> -#define MSG_SYN MSG_SYN
> - MSG_CONFIRM = 0x800, /* Confirm path validity. */
> -#define MSG_CONFIRM MSG_CONFIRM
> - MSG_RST = 0x1000,
> -#define MSG_RST MSG_RST
> - MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */
> -#define MSG_ERRQUEUE MSG_ERRQUEUE
> - MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */
> -#define MSG_NOSIGNAL MSG_NOSIGNAL
> - MSG_MORE = 0x8000, /* Sender will send more. */
> -#define MSG_MORE MSG_MORE
> - MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/
> -#define MSG_WAITFORONE MSG_WAITFORONE
> -
> - MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file
> - descriptor received through
> - SCM_RIGHTS. */
> -#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC
> - };
> -
> -
> -/* Structure describing messages sent by
> - `sendmsg' and received by `recvmsg'. */
> -struct msghdr
> - {
> - void *msg_name; /* Address to send to/receive from. */
> - socklen_t msg_namelen; /* Length of address data. */
> -
> - struct iovec *msg_iov; /* Vector of data to send/receive into. */
> - size_t msg_iovlen; /* Number of elements in the vector. */
> -
> - void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
> - size_t msg_controllen; /* Ancillary data buffer length.
> - !! The type should be socklen_t but the
> - definition of the kernel is incompatible
> - with this. */
> -
> - int msg_flags; /* Flags on received message. */
> - };
> -
> -#ifdef __USE_GNU
> -/* For `recvmmsg'. */
> -struct mmsghdr
> - {
> - struct msghdr msg_hdr; /* Actual message header. */
> - unsigned int msg_len; /* Number of received bytes for the entry. */
> - };
> -#endif
> -
> -/* Structure used for storage of ancillary data object information. */
> -struct cmsghdr
> - {
> - size_t cmsg_len; /* Length of data in cmsg_data plus length
> - of cmsghdr structure.
> - !! The type should be socklen_t but the
> - definition of the kernel is incompatible
> - with this. */
> - int cmsg_level; /* Originating protocol. */
> - int cmsg_type; /* Protocol specific type. */
> -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
> - __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */
> -#endif
> - };
> -
> -/* Ancillary data object manipulation macros. */
> -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
> -# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
> -#else
> -# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
> -#endif
> -#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
> -#define CMSG_FIRSTHDR(mhdr) \
> - ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
> - ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
> -#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
> - & (size_t) ~(sizeof (size_t) - 1))
> -#define CMSG_SPACE(len) (CMSG_ALIGN (len) \
> - + CMSG_ALIGN (sizeof (struct cmsghdr)))
> -#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
> -
> -extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
> - struct cmsghdr *__cmsg) __THROW;
> -#ifdef __USE_EXTERN_INLINES
> -# ifndef _EXTERN_INLINE
> -# define _EXTERN_INLINE __extern_inline
> -# endif
> -_EXTERN_INLINE struct cmsghdr *
> -__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
> -{
> - if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
> - /* The kernel header does this so there may be a reason. */
> - return 0;
> -
> - __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
> - + CMSG_ALIGN (__cmsg->cmsg_len));
> - if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
> - + __mhdr->msg_controllen)
> - || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
> - > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
> - /* No more entries. */
> - return 0;
> - return __cmsg;
> -}
> -#endif /* Use `extern inline'. */
> -
> -/* Socket level message types. This must match the definitions in
> - <linux/socket.h>. */
> -enum
> - {
> - SCM_RIGHTS = 0x01 /* Transfer file descriptors. */
> -#define SCM_RIGHTS SCM_RIGHTS
> -#ifdef __USE_GNU
> - , SCM_CREDENTIALS = 0x02 /* Credentials passing. */
> -# define SCM_CREDENTIALS SCM_CREDENTIALS
> -#endif
> - };
> -
> -#ifdef __USE_GNU
> -/* User visible structure for SCM_CREDENTIALS message */
> -struct ucred
> -{
> - pid_t pid; /* PID of sending process. */
> - uid_t uid; /* UID of sending process. */
> - gid_t gid; /* GID of sending process. */
> -};
> -#endif
> -
> -/* Ugly workaround for unclean kernel headers. */
> -#if !defined __USE_MISC && !defined __USE_GNU
> -# ifndef FIOGETOWN
> -# define __SYS_SOCKET_H_undef_FIOGETOWN
> -# endif
> -# ifndef FIOSETOWN
> -# define __SYS_SOCKET_H_undef_FIOSETOWN
> -# endif
> -# ifndef SIOCATMARK
> -# define __SYS_SOCKET_H_undef_SIOCATMARK
> -# endif
> -# ifndef SIOCGPGRP
> -# define __SYS_SOCKET_H_undef_SIOCGPGRP
> -# endif
> -# ifndef SIOCGSTAMP
> -# define __SYS_SOCKET_H_undef_SIOCGSTAMP
> -# endif
> -# ifndef SIOCGSTAMPNS
> -# define __SYS_SOCKET_H_undef_SIOCGSTAMPNS
> -# endif
> -# ifndef SIOCSPGRP
> -# define __SYS_SOCKET_H_undef_SIOCSPGRP
> -# endif
> -#endif
> -
> -/* Get socket manipulation related informations from kernel headers. */
> -#include <asm/socket.h>
> -
> -#if !defined __USE_MISC && !defined __USE_GNU
> -# ifdef __SYS_SOCKET_H_undef_FIOGETOWN
> -# undef __SYS_SOCKET_H_undef_FIOGETOWN
> -# undef FIOGETOWN
> -# endif
> -# ifdef __SYS_SOCKET_H_undef_FIOSETOWN
> -# undef __SYS_SOCKET_H_undef_FIOSETOWN
> -# undef FIOSETOWN
> -# endif
> -# ifdef __SYS_SOCKET_H_undef_SIOCATMARK
> -# undef __SYS_SOCKET_H_undef_SIOCATMARK
> -# undef SIOCATMARK
> -# endif
> -# ifdef __SYS_SOCKET_H_undef_SIOCGPGRP
> -# undef __SYS_SOCKET_H_undef_SIOCGPGRP
> -# undef SIOCGPGRP
> -# endif
> -# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMP
> -# undef __SYS_SOCKET_H_undef_SIOCGSTAMP
> -# undef SIOCGSTAMP
> -# endif
> -# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
> -# undef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
> -# undef SIOCGSTAMPNS
> -# endif
> -# ifdef __SYS_SOCKET_H_undef_SIOCSPGRP
> -# undef __SYS_SOCKET_H_undef_SIOCSPGRP
> -# undef SIOCSPGRP
> -# endif
> -#endif
> -
> -/* Structure used to manipulate the SO_LINGER option. */
> -struct linger
> - {
> - int l_onoff; /* Nonzero to linger on close. */
> - int l_linger; /* Time to linger. */
> - };
> -
> -
> -__BEGIN_DECLS
> -
> -/* Receive a message as described by MESSAGE from socket FD.
> - Returns the number of bytes read or -1 for errors.
> -
> - This function is a cancellation point and therefore not marked with
> - __THROW. */
> -extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
> - unsigned int __vlen, int __flags,
> - __const struct timespec *__tmo);
> -
> -__END_DECLS
> -
> -#endif /* bits/socket.h */
> --- sysdeps/unix/sysv/linux/alpha/bits/stat.h
> +++ sysdeps/unix/sysv/linux/alpha/bits/stat.h
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2010
> +/* Copyright (C) 1996,1997,1998,1999,2000,2001,2004
> Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> @@ -17,13 +17,10 @@
> Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA. */
>
> -#if !defined _SYS_STAT_H && !defined _FCNTL_H
> +#ifndef _SYS_STAT_H
> # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
> #endif
>
> -#ifndef _BITS_STAT_H
> -#define _BITS_STAT_H 1
> -
> /* Versions of the `struct stat' data structure. */
> #define _STAT_VER_KERNEL 0
> #define _STAT_VER_GLIBC2 1
> @@ -44,7 +41,7 @@
>
> Use neat tidy anonymous unions and structures when possible. */
>
> -#if defined __USE_MISC || defined __USE_XOPEN2K8
> +#ifdef __USE_MISC
> # if __GNUC_PREREQ(3,3)
> # define __ST_TIME(X) \
> __extension__ union { \
> @@ -158,5 +155,3 @@
> # define UTIME_NOW ((1l << 30) - 1l)
> # define UTIME_OMIT ((1l << 30) - 2l)
> #endif
> -
> -#endif /* bits/stat.h */
> --- sysdeps/unix/sysv/linux/alpha/creat.c
> +++ sysdeps/unix/sysv/linux/alpha/creat.c
> -/* sysdeps/unix/sysv/linux/wordsize-64/syscalls.list defines creat and
> - creat64 for most linux targets, but on alpha creat is not a syscall.
> - If we do nothing, we'll wind up with creat64 being undefined, because
> - the syscalls.list assumes the creat->creat64 alias was created. We
> - could have overridden that with a create64.c, but we might as well do
> - the right thing and set up creat64 as an alias. */
> -#include <io/creat.c>
> -weak_alias(__libc_creat, creat64)
> --- sysdeps/unix/sysv/linux/alpha/dl-auxv.h
> +++ sysdeps/unix/sysv/linux/alpha/dl-auxv.h
> @@ -19,7 +19,7 @@
>
> /* Scan the Aux Vector for the cache shape entries. */
>
> -extern long __libc_alpha_cache_shape[4];
> +long __libc_alpha_cache_shape[4] = { -2, -2, -2, -2 };
>
> #define DL_PLATFORM_AUXV \
> case AT_L1I_CACHESHAPE: \
> --- sysdeps/unix/sysv/linux/alpha/dl-sysdep.c
> +++ sysdeps/unix/sysv/linux/alpha/dl-sysdep.c
> @@ -1,5 +1,2 @@
> #include "dl-auxv.h"
> -
> -long __libc_alpha_cache_shape[4] = { -2, -2, -2, -2 };
> -
> #include <sysdeps/unix/sysv/linux/dl-sysdep.c>
> --- sysdeps/unix/sysv/linux/alpha/fxstat.c
> +++ sysdeps/unix/sysv/linux/alpha/fxstat.c
> @@ -35,39 +35,27 @@
> __fxstat (int vers, int fd, struct stat *buf)
> {
> INTERNAL_SYSCALL_DECL (err);
> - int result;
> + int result, errno_out;
> struct kernel_stat kbuf;
>
> -#if __ASSUME_STAT64_SYSCALL > 0
> - if (vers == _STAT_VER_KERNEL64)
> - {
> - result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf);
> - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
> - return result;
> - __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
> - return -1;
> - }
> -#elif defined __NR_fstat64
> if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
> {
> - int errno_out;
> result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf);
> if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
> return result;
> errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
> if (errno_out != ENOSYS)
> - {
> - __set_errno (errno_out);
> - return -1;
> - }
> + goto fail;
> __libc_missing_axp_stat64 = 1;
> }
> -#endif
>
> result = INTERNAL_SYSCALL (fstat, err, 2, fd, &kbuf);
> if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
> return __xstat_conv (vers, &kbuf, buf);
> - __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
> + errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
> +
> + fail:
> + __set_errno (errno_out);
> return -1;
> }
> hidden_def (__fxstat)
> --- sysdeps/unix/sysv/linux/alpha/fxstatat.c
> +++ sysdeps/unix/sysv/linux/alpha/fxstatat.c
> @@ -71,20 +71,6 @@
> int result, errno_out;
> struct kernel_stat kst;
>
> -#if __ASSUME_STAT64_SYSCALL > 0
> - if (vers == _STAT_VER_KERNEL64)
> - {
> - if (flag & AT_SYMLINK_NOFOLLOW)
> - result = INTERNAL_SYSCALL (lstat64, err, 2, file, st);
> - else
> - result = INTERNAL_SYSCALL (stat64, err, 2, file, st);
> -
> - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
> - return result;
> - errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
> - goto fail;
> - }
> -#elif defined __NR_stat64
> if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
> {
> if (flag & AT_SYMLINK_NOFOLLOW)
> @@ -99,7 +85,6 @@
> goto fail;
> __libc_missing_axp_stat64 = 1;
> }
> -#endif
>
> if (flag & AT_SYMLINK_NOFOLLOW)
> result = INTERNAL_SYSCALL (lstat, err, 2, file, &kst);
> --- sysdeps/unix/sysv/linux/alpha/kernel-features.h
> +++ sysdeps/unix/sysv/linux/alpha/kernel-features.h
> -/* Set flags signalling availability of kernel features based on given
> - kernel version number.
> - Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -/* alpha switched to a 64-bit timeval sometime before 2.2.0. */
> -#if __LINUX_KERNEL_VERSION >= 131584
> -# define __ASSUME_TIMEVAL64 1
> -#endif
> -
> -/* The tgkill syscall was introduced for alpha 2.6.0-test1 which unfortunately
> - cannot be distinguished from 2.6.0. */
> -#if __LINUX_KERNEL_VERSION >= 132609
> -# define __ASSUME_TGKILL 1
> -#endif
> -
> -/* Starting with version 2.6.4, the stat64 syscalls are available. */
> -#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__
> -# define __ASSUME_STAT64_SYSCALL 1
> -#endif
> -
> -#define __ASSUME_UTIMES 1
> -
> -/* Starting with version 2.6.9, SSI_IEEE_RAISE_EXCEPTION exists. */
> -#if __LINUX_KERNEL_VERSION >= 0x020609
> -# define __ASSUME_IEEE_RAISE_EXCEPTION 1
> -#endif
> -
> -/* Support for the O_CLOEXEC flag was added for alpha in 2.6.23. */
> -#if __LINUX_KERNEL_VERSION >= 0x020617
> -# define __ASSUME_O_CLOEXEC 1
> -#endif
> -
> -/* Support for various CLOEXEC and NONBLOCK flags was added for alpha after
> - 2.6.33-rc1. */
> -#if __LINUX_KERNEL_VERSION >= 0x020621
> -# define __ASSUME_SOCK_CLOEXEC 1
> -# define __ASSUME_IN_NONBLOCK 1
> -#endif
> -
> -/* Support for the pipe2, eventfd2, signalfd4 syscalls was added for alpha
> - after 2.6.33-rc1. */
> -#if __LINUX_KERNEL_VERSION >= 0x020621
> -# define __ASSUME_PIPE2 1
> -# define __ASSUME_EVENTFD2 1
> -# define __ASSUME_SIGNALFD4 1
> -#endif
> -
> -/* Support for accept4 was added for alpha after 2.6.33-rc1. */
> -#if __LINUX_KERNEL_VERSION >= 0x020621
> -# define __ASSUME_ACCEPT4 1
> -#endif
> -
> -#include_next <kernel-features.h>
> -
> -#undef __ASSUME_ST_INO_64_BIT
> -
> -/* pselect/ppoll were introduced on alpha just after 2.6.22-rc1. */
> -#if __LINUX_KERNEL_VERSION < 0x020617
> -# undef __ASSUME_PSELECT
> -# undef __ASSUME_PPOLL
> -#endif
> -
> -/* The *at syscalls were introduced on alpha just after 2.6.22-rc1. */
> -#if __LINUX_KERNEL_VERSION < 0x020617
> -# undef __ASSUME_ATFCTS
> -#endif
> -
> -/* Support for inter-process robust mutexes was added on alpha just
> - after 2.6.22-rc1. */
> -#if __LINUX_KERNEL_VERSION < 0x020617
> -# undef __ASSUME_SET_ROBUST_LIST
> -#endif
> -
> -/* Support for utimensat was added on alpha after 2.6.22-rc1. */
> -#if __LINUX_KERNEL_VERSION < 0x020617
> -# undef __ASSUME_UTIMENSAT
> -#endif
> -
> -/* Support for fallocate was added for alpha after 2.6.33-rc1. */
> -#if __LINUX_KERNEL_VERSION < 0x020621
> -# undef __ASSUME_FALLOCATE
> -#endif
> --- sysdeps/unix/sysv/linux/alpha/lxstat.c
> +++ sysdeps/unix/sysv/linux/alpha/lxstat.c
> @@ -35,39 +35,27 @@
> __lxstat (int vers, const char *name, struct stat *buf)
> {
> INTERNAL_SYSCALL_DECL (err);
> - int result;
> + int result, errno_out;
> struct kernel_stat kbuf;
>
> -#if __ASSUME_STAT64_SYSCALL > 0
> - if (vers == _STAT_VER_KERNEL64)
> - {
> - result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf);
> - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
> - return result;
> - __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
> - return -1;
> - }
> -#elif defined __NR_lstat64
> if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
> {
> - int errno_out;
> result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf);
> if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
> return result;
> errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
> if (errno_out != ENOSYS)
> - {
> - __set_errno (errno_out);
> - return -1;
> - }
> + goto fail;
> __libc_missing_axp_stat64 = 1;
> }
> -#endif
>
> result = INTERNAL_SYSCALL (lstat, err, 2, name, &kbuf);
> if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
> return __xstat_conv (vers, &kbuf, buf);
> - __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
> + errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
> +
> + fail:
> + __set_errno (errno_out);
> return -1;
> }
> hidden_def (__lxstat)
> --- sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c
> +++ sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c
> @@ -1 +1 @@
> -#include <nptl/sysdeps/unix/sysv/linux/x86_64/timer_settime.c>
> +#include <nptl/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c>
> --- sysdeps/unix/sysv/linux/alpha/sys/user.h
> +++ sysdeps/unix/sysv/linux/alpha/sys/user.h
> @@ -23,6 +23,7 @@
> only. Don't read too much into it. Don't use it for anything other
> than gdb/strace unless you know what you are doing. */
>
> +#include <asm/page.h>
> #include <asm/reg.h>
>
> struct user
> @@ -40,9 +41,6 @@
> char u_comm[32]; /* user command name */
> };
>
> -#define PAGE_SHIFT 13
> -#define PAGE_SIZE (1UL << PAGE_SHIFT)
> -#define PAGE_MASK (~(PAGE_SIZE-1))
> #define NBPG PAGE_SIZE
> #define UPAGES 1
> #define HOST_TEXT_START_ADDR (u.start_code)
> --- sysdeps/unix/sysv/linux/alpha/xstat.c
> +++ sysdeps/unix/sysv/linux/alpha/xstat.c
> @@ -35,39 +35,27 @@
> __xstat (int vers, const char *name, struct stat *buf)
> {
> INTERNAL_SYSCALL_DECL (err);
> - int result;
> + int result, errno_out;
> struct kernel_stat kbuf;
>
> -#if __ASSUME_STAT64_SYSCALL > 0
> - if (vers == _STAT_VER_KERNEL64)
> - {
> - result = INTERNAL_SYSCALL (stat64, err, 2, name, buf);
> - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
> - return result;
> - __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
> - return -1;
> - }
> -#elif defined __NR_stat64
> if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
> {
> - int errno_out;
> result = INTERNAL_SYSCALL (stat64, err, 2, name, buf);
> if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
> return result;
> errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
> if (errno_out != ENOSYS)
> - {
> - __set_errno (errno_out);
> - return -1;
> - }
> + goto fail;
> __libc_missing_axp_stat64 = 1;
> }
> -#endif
>
> result = INTERNAL_SYSCALL (stat, err, 2, name, &kbuf);
> if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
> return __xstat_conv (vers, &kbuf, buf);
> - __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
> + errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
> +
> + fail:
> + __set_errno (errno_out);
> return -1;
> }
> hidden_def (__xstat)
> --- sysdeps/unix/sysv/linux/alpha/xstatconv.c
> +++ sysdeps/unix/sysv/linux/alpha/xstatconv.c
> @@ -22,14 +22,9 @@
> #include <sys/stat.h>
> #include <kernel_stat.h>
> #include <xstatconv.h>
> -#include <sys/syscall.h>
>
>
> -#ifdef __NR_stat64
> -# if __ASSUME_STAT64_SYSCALL == 0
> int __libc_missing_axp_stat64;
> -# endif
> -#endif
>
> int
> __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
> --- sysdeps/unix/sysv/linux/alpha/xstatconv.h
> +++ sysdeps/unix/sysv/linux/alpha/xstatconv.h
> @@ -18,12 +18,7 @@
> 02111-1307 USA. */
>
> #include <kernel-features.h>
> -#include <sys/syscall.h>
>
> -#ifdef __NR_stat64
> -# if __ASSUME_STAT64_SYSCALL == 0
> extern int __libc_missing_axp_stat64 attribute_hidden;
> -# endif
> -#endif
> extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
> attribute_hidden;
> --- sysdeps/unix/sysv/linux/arm/bits/fcntl.h
> +++ sysdeps/unix/sysv/linux/arm/bits/fcntl.h
> @@ -1,5 +1,5 @@
> /* O_*, F_*, FD_* bit values for Linux.
> - Copyright (C) 1995-1998, 2000, 2004, 2006, 2007, 2009, 2010
> + Copyright (C) 1995-1998, 2000, 2004, 2006, 2007, 2009
> Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> @@ -41,25 +41,23 @@
> #define O_APPEND 02000
> #define O_NONBLOCK 04000
> #define O_NDELAY O_NONBLOCK
> -#define O_SYNC 04010000
> +#define O_SYNC 010000
> #define O_FSYNC O_SYNC
> #define O_ASYNC 020000
>
> -#ifdef __USE_XOPEN2K8
> +#ifdef __USE_GNU
> # define O_DIRECTORY 040000 /* Must be a directory. */
> # define O_NOFOLLOW 0100000 /* Do not follow links. */
> -# define O_CLOEXEC 02000000 /* Set close_on_exec. */
> -#endif
> -#ifdef __USE_GNU
> # define O_DIRECT 0200000 /* Direct disk access. */
> # define O_NOATIME 01000000 /* Do not set atime. */
> +# define O_CLOEXEC 02000000 /* Set close_on_exec. */
> #endif
>
> /* For now Linux has synchronisity options for data and read operations.
> We define the symbols here but let them do the same as O_SYNC since
> this is a superset. */
> #if defined __USE_POSIX199309 || defined __USE_UNIX98
> -# define O_DSYNC 010000 /* Synchronize data. */
> +# define O_DSYNC O_SYNC /* Synchronize data. */
> # define O_RSYNC O_SYNC /* Synchronize read operations. */
> #endif
>
> @@ -86,7 +84,7 @@
> #define F_SETLK64 13 /* Set record locking info (non-blocking). */
> #define F_SETLKW64 14 /* Set record locking info (blocking). */
>
> -#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
> +#if defined __USE_BSD || defined __USE_UNIX98
> # define F_SETOWN 8 /* Get owner (process receiving SIGIO). */
> # define F_GETOWN 9 /* Set owner (process receiving SIGIO). */
> #endif
> @@ -102,8 +100,6 @@
> # define F_SETLEASE 1024 /* Set a lease. */
> # define F_GETLEASE 1025 /* Enquire what lease is active. */
> # define F_NOTIFY 1026 /* Request notfications on a directory. */
> -#endif
> -#ifdef __USE_XOPEN2K8
> # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
> close-on-exit set. */
> #endif
> @@ -176,10 +172,9 @@
> /* Owner types. */
> enum __pid_type
> {
> - F_OWNER_TID = 0, /* Kernel thread. */
> - F_OWNER_PID, /* Process. */
> - F_OWNER_PGRP, /* Process group. */
> - F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
> + F_OWNER_TID = 0, /* Kernel thread. */
> + F_OWNER_PID, /* Process. */
> + F_OWNER_GID /* Process group. */
> };
>
> /* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
> @@ -242,7 +237,7 @@
>
>
> /* Selective file content synch'ing. */
> -extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
> +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
> unsigned int __flags);
>
>
> --- sysdeps/unix/sysv/linux/arm/bits/mman.h
> +++ sysdeps/unix/sysv/linux/arm/bits/mman.h
> @@ -1,6 +1,5 @@
> /* Definitions for POSIX memory map interface. Linux/ARM version.
> - Copyright (C) 1997, 2000, 2003, 2005, 2006, 2009
> - Free Software Foundation, Inc.
> + Copyright (C) 1997, 2000, 2003, 2005, 2006 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
> @@ -84,17 +83,14 @@
>
> /* Advice to `madvise'. */
> #ifdef __USE_BSD
> -# define MADV_NORMAL 0 /* No further special treatment. */
> -# define MADV_RANDOM 1 /* Expect random page references. */
> -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
> -# define MADV_WILLNEED 3 /* Will need these pages. */
> -# define MADV_DONTNEED 4 /* Don't need these pages. */
> -# define MADV_REMOVE 9 /* Remove these pages and resources. */
> -# define MADV_DONTFORK 10 /* Do not inherit across fork. */
> -# define MADV_DOFORK 11 /* Do inherit across fork. */
> -# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
> -# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
> -# define MADV_HWPOISON 100 /* Poison a page for testing. */
> +# define MADV_NORMAL 0 /* No further special treatment. */
> +# define MADV_RANDOM 1 /* Expect random page references. */
> +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
> +# define MADV_WILLNEED 3 /* Will need these pages. */
> +# define MADV_DONTNEED 4 /* Don't need these pages. */
> +# define MADV_REMOVE 9 /* Remove these pages and resources. */
> +# define MADV_DONTFORK 10 /* Do not inherit across fork. */
> +# define MADV_DOFORK 11 /* Do inherit across fork. */
> #endif
>
> /* The POSIX people had to invent similar names for the same things. */
> --- sysdeps/unix/sysv/linux/arm/clone.S
> +++ sysdeps/unix/sysv/linux/arm/clone.S
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005, 2008, 2009, 2010
> +/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005, 2008, 2009
> Free Software Foundation, Inc.
> This file is part of the GNU C Library.
> Contributed by Pat Beirne <patb at corelcomputer.com>
> @@ -52,13 +52,8 @@
> @ new sp is already in r1
> #ifdef __ARM_EABI__
> stmfd sp!, {r4, r7}
> - cfi_adjust_cfa_offset (8)
> - cfi_rel_offset (r4, 0)
> - cfi_rel_offset (r7, 4)
> #else
> str r4, [sp, #-8]!
> - cfi_adjust_cfa_offset (8)
> - cfi_rel_offset (r4, 0)
> #endif
> ldr r2, [sp, #8]
> ldr r3, [sp, #12]
> @@ -69,7 +64,6 @@
> #else
> swi SYS_ify(clone)
> #endif
> - cfi_endproc
> cmp r0, #0
> beq 1f
> #ifdef __ARM_EABI__
> @@ -80,8 +74,6 @@
> blt PLTJMP(C_SYMBOL_NAME(__syscall_error))
> RETINSTR(, lr)
>
> - cfi_startproc
> - cfi_undefined (lr)
> 1:
> #ifdef RESET_PID
> tst ip, #CLONE_THREAD
> --- sysdeps/unix/sysv/linux/arm/eabi/Makefile
> +++ sysdeps/unix/sysv/linux/arm/eabi/Makefile
> @@ -7,34 +7,3 @@
> # unwind tables for __libc_start_main.
> CFLAGS-libc-start.c += -fexceptions
> endif
> -
> -# Add a syscall function to each library that needs one.
> -
> -ifeq ($(subdir),rt)
> -librt-sysdep_routines += libc-do-syscall
> -librt-shared-only-routines += libc-do-syscall
> -endif
> -
> -ifeq ($(subdir),nptl)
> -libpthread-sysdep_routines += libc-do-syscall
> -libpthread-shared-only-routines += libc-do-syscall
> -endif
> -
> -ifeq ($(subdir),resolv)
> -libanl-sysdep_routines += libc-do-syscall
> -libanl-shared-only-routines += libc-do-syscall
> -endif
> -
> -ifeq ($(subdir),csu)
> -sysdep_routines += libc-do-syscall
> -endif
> -
> -ifeq ($(subdir),nscd)
> -nscd-modules += libc-do-syscall
> -endif
> -
> -ifeq ($(subdir),posix)
> -LDFLAGS-tst-rfc3484 += $(common-objpfx)csu/libc-do-syscall.o
> -LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o
> -LDFLAGS-tst-rfc3484-3 += $(common-objpfx)csu/libc-do-syscall.o
> -endif
> --- sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S
> +++ sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S
> @@ -30,7 +30,6 @@
> #ifdef PIC
> # define CALL_FAIL \
> ldr sl, .L_GOT; \
> - cfi_undefined (sl); \
> .L_GOT_OFF: \
> add sl, pc, sl; \
> ldr r0, .Lstr; \
> @@ -49,17 +48,12 @@
> #endif
>
> #define CHECK_SP(reg) \
> - cfi_remember_state; \
> cmp sp, reg; \
> bls .Lok; \
> mov r5, r0; \
> - cfi_undefined (r5); \
> mov r7, #SYS_ify(sigaltstack); \
> - cfi_undefined (r7); \
> mov r0, #0; \
> - sub sp, sp, #16; /* >= sizeof (stack_t) */ \
> - cfi_adjust_cfa_offset (16); \
> - cfi_remember_state; \
> + sub sp, sp, #16; \
> mov r1, sp; \
> swi #0; \
> cmp r0, #0; \
> @@ -75,10 +69,8 @@
> bhi .Lok2; \
> .Lfail: \
> CALL_FAIL \
> - cfi_restore_state; \
> .Lok2: \
> mov r0, r5; \
> - cfi_restore_state; \
> .Lok:
>
> #include <__longjmp.S>
> --- sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S
> +++ sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S
> -/* Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#include <sysdep.h>
> -
> -/* Out-of-line syscall stub. We expect the system call number in ip
> - and return the raw result in r0. No registers are clobbered.
> - We could avoid using the stack for this, but the goal is accurate
> - unwind information - and while there is a reserved prefix in the
> - ARM unwind tables for register to register moves, the actual opcodes
> - are not defined. */
> -
> - .thumb
> - .syntax unified
> - .hidden __libc_do_syscall
> -
> -ENTRY (__libc_do_syscall)
> - .fnstart
> - push {r7, lr}
> - .save {r7, lr}
> - cfi_adjust_cfa_offset (8)
> - cfi_rel_offset (r7, 0)
> - cfi_rel_offset (lr, 4)
> - mov r7, ip
> - swi 0x0
> - pop {r7, pc}
> - .fnend
> -END (__libc_do_syscall)
> --- sysdeps/unix/sysv/linux/arm/eabi/mmap64.S
> +++ sysdeps/unix/sysv/linux/arm/eabi/mmap64.S
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 2000, 2003, 2005, 2009 Free Software Foundation, Inc.
> +/* Copyright (C) 2000, 2003, 2005 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
> @@ -34,13 +34,8 @@
> ENTRY (__mmap64)
> ldr ip, [sp, $LOW_OFFSET]
> str r5, [sp, #-4]!
> - cfi_adjust_cfa_offset (4)
> - cfi_rel_offset (r5, 0)
> ldr r5, [sp, $HIGH_OFFSET]
> str r4, [sp, #-4]!
> - cfi_adjust_cfa_offset (4)
> - cfi_rel_offset (r4, 0)
> - cfi_remember_state
> movs r4, ip, lsl $20 @ check that offset is page-aligned
> mov ip, ip, lsr $12
> moveqs r4, r5, lsr $12 @ check for overflow
> @@ -50,19 +45,11 @@
> DO_CALL (mmap2, 0)
> cmn r0, $4096
> ldmfd sp!, {r4, r5}
> - cfi_adjust_cfa_offset (-8)
> - cfi_restore (r4)
> - cfi_restore (r5)
> RETINSTR(cc, lr)
> b PLTJMP(syscall_error)
> -
> - cfi_restore_state
> .Linval:
> mov r0, $-EINVAL
> ldmfd sp!, {r4, r5}
> - cfi_adjust_cfa_offset (-8)
> - cfi_restore (r4)
> - cfi_restore (r5)
> b PLTJMP(syscall_error)
> PSEUDO_END (__mmap64)
>
> --- sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h
> +++ sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h
> +/* Copyright (C) 2008 Free Software Foundation, Inc.
> + This file is part of the GNU C Library.
> +
> + The GNU C Library is free software; you can redistribute it and/or
> + modify it under the terms of the GNU Lesser General Public
> + License as published by the Free Software Foundation; either
> + version 2.1 of the License, or (at your option) any later version.
> +
> + The GNU C Library is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + Lesser General Public License for more details.
> +
> + You should have received a copy of the GNU Lesser General Public
> + License along with the GNU C Library; if not, write to the Free
> + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> + 02111-1307 USA. */
> +
> +#include_next <aio_misc.h>
> +
> +#ifdef __thumb2__
> +
> +#include <errno.h>
> +
> +/* The Thumb-2 definition of INTERNAL_SYSCALL_RAW has to hide the use
> + of r7 from the compiler because it cannot handle asm clobbering the
> + hard frame pointer. In aio_suspend, GCC does not eliminate the
> + hard frame pointer because the function uses variable-length
> + arrays, so it generates unwind information using r7 as virtual
> + stack pointer. During system calls, when r7 has been saved on the
> + stack, this means the unwind information is invalid. Without extra
> + unwind directives, which would need to cause unwind information for
> + the asm to be generated separately from that for the parts of the
> + function before and after the asm (with three index table entries),
> + it is not possible to represent any temporary change to the virtual
> + stack pointer. Instead, we move the problematic system calls out
> + of line into a function that does not require a frame pointer. */
> +
> +static __attribute_noinline__ void
> +aio_misc_wait (int *resultp,
> + volatile int *futexp,
> + const struct timespec *timeout,
> + int cancel)
> +{
> + AIO_MISC_WAIT (*resultp, *futexp, timeout, cancel);
> +}
> +
> +#undef AIO_MISC_WAIT
> +#define AIO_MISC_WAIT(result, futex, timeout, cancel) \
> + aio_misc_wait (&result, &futex, timeout, cancel)
> +
> +#endif
> --- sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
> +++ sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 2003, 2004, 2005, 2009 Free Software Foundation, Inc.
> +/* Copyright (C) 2003, 2004, 2005 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
> @@ -36,22 +36,17 @@
> .type __##syscall_name##_nocancel,%function; \
> .globl __##syscall_name##_nocancel; \
> __##syscall_name##_nocancel: \
> - .cfi_sections .debug_frame; \
> - cfi_startproc; \
> DO_CALL (syscall_name, args); \
> PSEUDO_RET; \
> - cfi_endproc; \
> .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \
> ENTRY (name); \
> SINGLE_THREAD_P; \
> DOARGS_##args; \
> bne .Lpseudo_cancel; \
> - cfi_remember_state; \
> DO_CALL (syscall_name, 0); \
> UNDOARGS_##args; \
> cmn r0, $4096; \
> PSEUDO_RET; \
> - cfi_restore_state; \
> .Lpseudo_cancel: \
> .fnstart; \
> DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \
> @@ -67,127 +62,41 @@
> mov r0, r7; /* retrieve return value. */ \
> RESTORE_LR_##args; \
> UNDOARGS_##args; \
> - cmn r0, $4096
> + cmn r0, $4096;
>
> /* DOARGS pushes four bytes on the stack for five arguments, eight bytes for
> six arguments, and nothing for fewer. In order to preserve doubleword
> alignment, sometimes we must save an extra register. */
>
> -# define RESTART_UNWIND \
> - .fnend; \
> - .fnstart; \
> - .save {r7, lr}
> -
> -# define DOCARGS_0 \
> - stmfd sp!, {r7, lr}; \
> - cfi_adjust_cfa_offset (8); \
> - cfi_rel_offset (r7, 0); \
> - cfi_rel_offset (lr, 4); \
> - .save {r7, lr}
> +# define RESTART_UNWIND .fnend; .fnstart; .save {r7, lr}
> +
> +# define DOCARGS_0 stmfd sp!, {r7, lr}; .save {r7, lr}
> # define UNDOCARGS_0
> -# define RESTORE_LR_0 \
> - ldmfd sp!, {r7, lr}; \
> - cfi_adjust_cfa_offset (-8); \
> - cfi_restore (r7); \
> - cfi_restore (lr)
> -
> -# define DOCARGS_1 \
> - stmfd sp!, {r0, r1, r7, lr}; \
> - cfi_adjust_cfa_offset (16); \
> - cfi_rel_offset (r7, 8); \
> - cfi_rel_offset (lr, 12); \
> - .save {r7, lr}; \
> - .pad #8
> -# define UNDOCARGS_1 \
> - ldr r0, [sp], #8; \
> - cfi_adjust_cfa_offset (-8); \
> - RESTART_UNWIND
> -# define RESTORE_LR_1 \
> - RESTORE_LR_0
> -
> -# define DOCARGS_2 \
> - stmfd sp!, {r0, r1, r7, lr}; \
> - cfi_adjust_cfa_offset (16); \
> - cfi_rel_offset (r7, 8); \
> - cfi_rel_offset (lr, 12); \
> - .save {r7, lr}; \
> - .pad #8
> -# define UNDOCARGS_2 \
> - ldmfd sp!, {r0, r1}; \
> - cfi_adjust_cfa_offset (-8); \
> - RESTART_UNWIND
> -# define RESTORE_LR_2 \
> - RESTORE_LR_0
> -
> -# define DOCARGS_3 \
> - stmfd sp!, {r0, r1, r2, r3, r7, lr}; \
> - cfi_adjust_cfa_offset (24); \
> - cfi_rel_offset (r7, 16); \
> - cfi_rel_offset (lr, 20); \
> - .save {r7, lr}; \
> - .pad #16
> -# define UNDOCARGS_3 \
> - ldmfd sp!, {r0, r1, r2, r3}; \
> - cfi_adjust_cfa_offset (-16); \
> - RESTART_UNWIND
> -# define RESTORE_LR_3 \
> - RESTORE_LR_0
> -
> -# define DOCARGS_4 \
> - stmfd sp!, {r0, r1, r2, r3, r7, lr}; \
> - cfi_adjust_cfa_offset (24); \
> - cfi_rel_offset (r7, 16); \
> - cfi_rel_offset (lr, 20); \
> - .save {r7, lr}; \
> - .pad #16
> -# define UNDOCARGS_4 \
> - ldmfd sp!, {r0, r1, r2, r3}; \
> - cfi_adjust_cfa_offset (-16); \
> - RESTART_UNWIND
> -# define RESTORE_LR_4 \
> - RESTORE_LR_0
> -
> -/* r4 is only stmfd'ed for correct stack alignment. */
> -# define DOCARGS_5 \
> - .save {r4}; \
> - stmfd sp!, {r0, r1, r2, r3, r4, r7, lr}; \
> - cfi_adjust_cfa_offset (28); \
> - cfi_rel_offset (r7, 20); \
> - cfi_rel_offset (lr, 24); \
> - .save {r7, lr}; \
> - .pad #20
> -# define UNDOCARGS_5 \
> - ldmfd sp!, {r0, r1, r2, r3}; \
> - cfi_adjust_cfa_offset (-16); \
> - .fnend; \
> - .fnstart; \
> - .save {r4}; \
> - .save {r7, lr}; \
> - .pad #4
> -# define RESTORE_LR_5 \
> - ldmfd sp!, {r4, r7, lr}; \
> - cfi_adjust_cfa_offset (-12); \
> - /* r4 will be marked as restored later. */ \
> - cfi_restore (r7); \
> - cfi_restore (lr)
> -
> -# define DOCARGS_6 \
> - .save {r4, r5}; \
> - stmfd sp!, {r0, r1, r2, r3, r7, lr}; \
> - cfi_adjust_cfa_offset (24); \
> - cfi_rel_offset (r7, 16); \
> - cfi_rel_offset (lr, 20); \
> - .save {r7, lr}; \
> - .pad #16
> -# define UNDOCARGS_6 \
> - ldmfd sp!, {r0, r1, r2, r3}; \
> - cfi_adjust_cfa_offset (-16); \
> - .fnend; \
> - .fnstart; \
> - .save {r4, r5}; \
> - .save {r7, lr}
> -# define RESTORE_LR_6 \
> - RESTORE_LR_0
> +# define RESTORE_LR_0 ldmfd sp!, {r7, lr};
> +
> +# define DOCARGS_1 stmfd sp!, {r0, r1, r7, lr}; .save {r7, lr}; .pad #8
> +# define UNDOCARGS_1 ldr r0, [sp], #8; RESTART_UNWIND
> +# define RESTORE_LR_1 RESTORE_LR_0
> +
> +# define DOCARGS_2 stmfd sp!, {r0, r1, r7, lr}; .save {r7, lr}; .pad #8
> +# define UNDOCARGS_2 ldmfd sp!, {r0, r1}; RESTART_UNWIND
> +# define RESTORE_LR_2 RESTORE_LR_0
> +
> +# define DOCARGS_3 stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #16
> +# define UNDOCARGS_3 ldmfd sp!, {r0, r1, r2, r3}; RESTART_UNWIND
> +# define RESTORE_LR_3 RESTORE_LR_0
> +
> +# define DOCARGS_4 stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #16
> +# define UNDOCARGS_4 ldmfd sp!, {r0, r1, r2, r3}; RESTART_UNWIND
> +# define RESTORE_LR_4 RESTORE_LR_0
> +
> +# define DOCARGS_5 .save {r4}; stmfd sp!, {r0, r1, r2, r3, r4, r7, lr}; .save {r7, lr}; .pad #20
> +# define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4}; .save {r7, lr}; .pad #4
> +# define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr}
> +
> +# define DOCARGS_6 .save {r4, r5}; stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #16
> +# define UNDOCARGS_6 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4, r5}; .save {r7, lr}
> +# define RESTORE_LR_6 RESTORE_LR_0
>
> # ifdef IS_IN_libpthread
> # define CENABLE bl PLTJMP(__pthread_enable_asynccancel)
> @@ -227,13 +136,9 @@
> # define PSEUDO_PROLOGUE
> # define SINGLE_THREAD_P \
> stmfd sp!, {r0, lr}; \
> - cfi_adjust_cfa_offset (8); \
> - cfi_rel_offset (lr, 4); \
> bl __aeabi_read_tp; \
> ldr ip, [r0, #MULTIPLE_THREADS_OFFSET]; \
> ldmfd sp!, {r0, lr}; \
> - cfi_adjust_cfa_offset (-8); \
> - cfi_restore (lr); \
> teq ip, #0
> # define SINGLE_THREAD_P_PIC(x) SINGLE_THREAD_P
> # endif
> --- sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
> +++ sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 2003, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
> +/* Copyright (C) 2003, 2005, 2007, 2009 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
> Contributed by Jakub Jelinek <jakub at redhat.com>.
>
> @@ -89,15 +89,7 @@
> " .globl _Unwind_Resume\n"
> " .type _Unwind_Resume, %function\n"
> "_Unwind_Resume:\n"
> -" .cfi_sections .debug_frame\n"
> -" " CFI_STARTPROC "\n"
> " stmfd sp!, {r4, r5, r6, lr}\n"
> -" " CFI_ADJUST_CFA_OFFSET (16)" \n"
> -" " CFI_REL_OFFSET (r4, 0) "\n"
> -" " CFI_REL_OFFSET (r5, 4) "\n"
> -" " CFI_REL_OFFSET (r6, 8) "\n"
> -" " CFI_REL_OFFSET (lr, 12) "\n"
> -" " CFI_REMEMBER_STATE "\n"
> " ldr r4, 1f\n"
> " ldr r5, 2f\n"
> "3: add r4, pc, r4\n"
> @@ -107,17 +99,10 @@
> " beq 4f\n"
> "5: mov r0, r6\n"
> " ldmfd sp!, {r4, r5, r6, lr}\n"
> -" " CFI_ADJUST_CFA_OFFSET (-16) "\n"
> -" " CFI_RESTORE (r4) "\n"
> -" " CFI_RESTORE (r5) "\n"
> -" " CFI_RESTORE (r6) "\n"
> -" " CFI_RESTORE (lr) "\n"
> " bx r3\n"
> -" " CFI_RESTORE_STATE "\n"
> "4: bl pthread_cancel_init\n"
> " ldr r3, [r4, r5]\n"
> " b 5b\n"
> -" " CFI_ENDPROC "\n"
> " .align 2\n"
> #ifdef __thumb2__
> "1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 4\n"
> --- sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
> +++ sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 2003, 2005, 2010 Free Software Foundation, Inc.
> +/* Copyright (C) 2003, 2005 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
> Contributed by Jakub Jelinek <jakub at redhat.com>.
>
> @@ -52,15 +52,7 @@
> " .globl _Unwind_Resume\n"
> " .type _Unwind_Resume, %function\n"
> "_Unwind_Resume:\n"
> -" .cfi_sections .debug_frame\n"
> -" " CFI_STARTPROC "\n"
> " stmfd sp!, {r4, r5, r6, lr}\n"
> -" " CFI_ADJUST_CFA_OFFSET (16)" \n"
> -" " CFI_REL_OFFSET (r4, 0) "\n"
> -" " CFI_REL_OFFSET (r5, 4) "\n"
> -" " CFI_REL_OFFSET (r6, 8) "\n"
> -" " CFI_REL_OFFSET (lr, 12) "\n"
> -" " CFI_REMEMBER_STATE "\n"
> " ldr r4, 1f\n"
> " ldr r5, 2f\n"
> "3: add r4, pc, r4\n"
> @@ -70,17 +62,10 @@
> " beq 4f\n"
> "5: mov r0, r6\n"
> " ldmfd sp!, {r4, r5, r6, lr}\n"
> -" " CFI_ADJUST_CFA_OFFSET (-16) "\n"
> -" " CFI_RESTORE (r4) "\n"
> -" " CFI_RESTORE (r5) "\n"
> -" " CFI_RESTORE (r6) "\n"
> -" " CFI_RESTORE (lr) "\n"
> " bx r3\n"
> -" " CFI_RESTORE_STATE "\n"
> "4: bl init\n"
> " ldr r3, [r4, r5]\n"
> " b 5b\n"
> -" " CFI_ENDPROC "\n"
> " .align 2\n"
> #ifdef __thumb2__
> "1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 4\n"
> --- sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
> +++ sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 1999, 2005, 2009, 2010 Free Software Foundation, Inc.
> +/* Copyright (C) 1999, 2005 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
> @@ -34,89 +34,46 @@
> Because the signal frame layout changed in 2.6.18, we provide two
> copies of these functions with different unwind information. */
>
> -/* Used in ENTRY. */
> -#undef cfi_startproc
> -#define cfi_startproc \
> - .cfi_startproc simple; \
> - .cfi_signal_frame
> -
> -/* The CFA is not computed / used correctly here; this is neither trivial to
> - do, nor is it needed. */
> -#define CFI \
> - cfi_def_cfa (sp, 0); \
> - cfi_offset (r0, OFFSET + 0 * 4); \
> - cfi_offset (r1, OFFSET + 1 * 4); \
> - cfi_offset (r2, OFFSET + 2 * 4); \
> - cfi_offset (r3, OFFSET + 3 * 4); \
> - cfi_offset (r4, OFFSET + 4 * 4); \
> - cfi_offset (r5, OFFSET + 5 * 4); \
> - cfi_offset (r6, OFFSET + 6 * 4); \
> - cfi_offset (r7, OFFSET + 7 * 4); \
> - cfi_offset (r8, OFFSET + 8 * 4); \
> - cfi_offset (r9, OFFSET + 9 * 4); \
> - cfi_offset (r10, OFFSET + 10 * 4); \
> - cfi_offset (r11, OFFSET + 11 * 4); \
> - cfi_offset (r12, OFFSET + 12 * 4); \
> - cfi_offset (r13, OFFSET + 13 * 4); \
> - cfi_offset (r14, OFFSET + 14 * 4); \
> - cfi_offset (r15, OFFSET + 15 * 4)
> -
> #ifndef __ASSUME_SIGFRAME_V2
> -#define OFFSET 12
> .fnstart
> .save {r0-r15}
> - .pad #OFFSET
> + .pad #12
> nop
> ENTRY(__default_sa_restorer_v1)
> - CFI
> mov r7, $SYS_ify(sigreturn)
> swi 0x0
> .fnend
> -END(__default_sa_restorer_v1)
> -#undef OFFSET
> -#endif /* __ASSUME_SIGFRAME_V2 */
> +#endif
>
> -#define OFFSET 32
> .fnstart
> .save {r0-r15}
> - .pad #OFFSET
> + .pad #32
> nop
> ENTRY(__default_sa_restorer_v2)
> - CFI
> mov r7, $SYS_ify(sigreturn)
> swi 0x0
> .fnend
> -END(__default_sa_restorer_v2)
> -#undef OFFSET
>
> #ifdef __NR_rt_sigreturn
>
> #ifndef __ASSUME_SIGFRAME_V2
> -#define OFFSET 168
> .fnstart
> .save {r0-r15}
> - .pad #OFFSET
> + .pad #168
> nop
> ENTRY(__default_rt_sa_restorer_v1)
> - CFI
> mov r7, $SYS_ify(rt_sigreturn)
> swi 0x0
> .fnend
> -END(__default_rt_sa_restorer_v1)
> -#undef OFFSET
> -#endif /* __ASSUME_SIGFRAME_V2 */
> +#endif
>
> -#define OFFSET 160
> .fnstart
> .save {r0-r15}
> - .pad #OFFSET
> + .pad #160
> nop
> ENTRY(__default_rt_sa_restorer_v2)
> - CFI
> mov r7, $SYS_ify(rt_sigreturn)
> swi 0x0
> .fnend
> -END(__default_rt_sa_restorer_v2)
> -#undef OFFSET
>
> -#endif /* __NR_rt_sigreturn */
> +#endif
> --- sysdeps/unix/sysv/linux/arm/eabi/syscall.S
> +++ sysdeps/unix/sysv/linux/arm/eabi/syscall.S
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 2005, 2009 Free Software Foundation, Inc.
> +/* Copyright (C) 2005 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
> @@ -25,11 +25,6 @@
> ENTRY (syscall)
> mov ip, sp
> stmfd sp!, {r4, r5, r6, r7}
> - cfi_adjust_cfa_offset (16)
> - cfi_rel_offset (r4, 0)
> - cfi_rel_offset (r5, 4)
> - cfi_rel_offset (r6, 8)
> - cfi_rel_offset (r7, 12)
> mov r7, r0
> mov r0, r1
> mov r1, r2
> @@ -37,11 +32,6 @@
> ldmfd ip, {r3, r4, r5, r6}
> swi 0x0
> ldmfd sp!, {r4, r5, r6, r7}
> - cfi_adjust_cfa_offset (-16)
> - cfi_restore (r4)
> - cfi_restore (r5)
> - cfi_restore (r6)
> - cfi_restore (r7)
> cmn r0, #4096
> RETINSTR(cc, lr)
> b PLTJMP(syscall_error)
> --- sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
> +++ sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 2005, 2006, 2007, 2009
> +/* Copyright (C) 2005, 2006, 2007
> Free Software Foundation, Inc.
>
> This file is part of the GNU C Library.
> @@ -44,34 +44,29 @@
> argument; otherwise the (optional) compatibility code for APCS binaries
> may be invoked. */
>
> -#if defined(__thumb__)
> -/* We can not expose the use of r7 to the compiler. GCC (as
> - of 4.5) uses r7 as the hard frame pointer for Thumb - although
> - for Thumb-2 it isn't obviously a better choice than r11.
> - And GCC does not support asms that conflict with the frame
> - pointer.
> -
> - This would be easier if syscall numbers never exceeded 255,
> - but they do. For the moment the LOAD_ARGS_7 is sacrificed.
> +#ifdef __thumb__
> +/* Hide the use of r7 from the compiler, this would be a lot
> + easier but for the fact that the syscalls can exceed 255.
> + For the moment the LOAD_ARGS_7 is sacrificed.
> We can't use push/pop inside the asm because that breaks
> - unwinding (i.e. thread cancellation) for this frame. We can't
> - locally save and restore r7, because we do not know if this
> - function uses r7 or if it is our caller's r7; if it is our caller's,
> - then unwinding will fail higher up the stack. So we move the
> - syscall out of line and provide its own unwind information. */
> + unwinding (ie. thread cancellation). */
> #undef LOAD_ARGS_7
> #undef INTERNAL_SYSCALL_RAW
> #define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \
> ({ \
> + int _sys_buf[2]; \
> register int _a1 asm ("a1"); \
> - int _nametmp = name; \
> + register int *_r6 asm ("r6") = _sys_buf; \
> + *_r6 = name; \
> LOAD_ARGS_##nr (args) \
> - register int _name asm ("ip") = _nametmp; \
> - asm volatile ("bl __libc_do_syscall" \
> - : "=r" (_a1) \
> - : "r" (_name) ASM_ARGS_##nr \
> - : "memory", "lr"); \
> - _a1; })
> + asm volatile ("str r7, [r6, #4]\n\t" \
> + "ldr r7, [r6]\n\t" \
> + "swi 0 @ syscall " #name "\n\t" \
> + "ldr r7, [r6, #4]" \
> + : "=r" (_a1) \
> + : "r" (_r6) ASM_ARGS_##nr \
> + : "memory"); \
> + _a1; })
> #else /* ARM */
> #undef INTERNAL_SYSCALL_RAW
> #define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \
> @@ -105,13 +100,11 @@
>
> #undef DO_CALL
> #define DO_CALL(syscall_name, args) \
> - DOARGS_##args; \
> + DOARGS_##args \
> mov ip, r7; \
> - cfi_register (r7, ip); \
> ldr r7, =SYS_ify (syscall_name); \
> swi 0x0; \
> mov r7, ip; \
> - cfi_restore (r7); \
> UNDOARGS_##args
>
> #endif /* _LINUX_ARM_EABI_SYSDEP_H */
> --- sysdeps/unix/sysv/linux/arm/kernel-features.h
> +++ sysdeps/unix/sysv/linux/arm/kernel-features.h
> @@ -59,8 +59,6 @@
>
> #include_next <kernel-features.h>
>
> -/* Support for pselect6, ppoll and epoll_pwait was added in 2.6.32. */
> -#if __LINUX_KERNEL_VERSION < 0x020620
> -# undef __ASSUME_PSELECT
> -# undef __ASSUME_PPOLL
> -#endif
> +/* These syscalls are not implemented yet for ARM. */
> +#undef __ASSUME_PSELECT
> +#undef __ASSUME_PPOLL
> --- sysdeps/unix/sysv/linux/arm/ldsodefs.h
> +++ sysdeps/unix/sysv/linux/arm/ldsodefs.h
> -/* Run-time dynamic linker data structures for loaded ELF shared objects.
> - Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#ifndef _ARM_LINUX_LDSODEFS_H
> -#define _ARM_LINUX_LDSODEFS_H 1
> -
> -#include_next <ldsodefs.h>
> -
> -#undef VALID_ELF_HEADER
> -#undef VALID_ELF_OSABI
> -
> -#ifdef __ARM_EABI__
> -#define EXTRA_OSABI ELFOSABI_ARM_AEABI
> -#else
> -#define EXTRA_OSABI ELFOSABI_ARM
> -#endif
> -
> -#define VALID_ELF_HEADER(hdr,exp,size) \
> - (memcmp (hdr, exp, size) == 0 \
> - || memcmp (hdr, expected2, size) == 0 \
> - || memcmp (hdr, expected3, size) == 0)
> -#define VALID_ELF_OSABI(osabi) (osabi == ELFOSABI_SYSV \
> - || osabi == EXTRA_OSABI \
> - || osabi == ELFOSABI_LINUX)
> -#define MORE_ELF_HEADER_DATA \
> - static const unsigned char expected2[EI_PAD] = \
> - { \
> - [EI_MAG0] = ELFMAG0, \
> - [EI_MAG1] = ELFMAG1, \
> - [EI_MAG2] = ELFMAG2, \
> - [EI_MAG3] = ELFMAG3, \
> - [EI_CLASS] = ELFW(CLASS), \
> - [EI_DATA] = byteorder, \
> - [EI_VERSION] = EV_CURRENT, \
> - [EI_OSABI] = ELFOSABI_LINUX \
> - }; \
> - static const unsigned char expected3[EI_PAD] = \
> - { \
> - [EI_MAG0] = ELFMAG0, \
> - [EI_MAG1] = ELFMAG1, \
> - [EI_MAG2] = ELFMAG2, \
> - [EI_MAG3] = ELFMAG3, \
> - [EI_CLASS] = ELFW(CLASS), \
> - [EI_DATA] = byteorder, \
> - [EI_VERSION] = EV_CURRENT, \
> - [EI_OSABI] = EXTRA_OSABI \
> - }
> -
> -#endif
> --- sysdeps/unix/sysv/linux/arm/mmap.S
> +++ sysdeps/unix/sysv/linux/arm/mmap.S
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 1998, 2000, 2003, 2005, 2009 Free Software Foundation, Inc.
> +/* Copyright (C) 1998, 2000, 2003, 2005 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
> @@ -33,13 +33,8 @@
>
> /* shuffle args */
> str r5, [sp, #-4]!
> - cfi_adjust_cfa_offset (4)
> - cfi_rel_offset (r5, 0)
> ldr r5, [sp, #8]
> str r4, [sp, #-4]!
> - cfi_adjust_cfa_offset (4)
> - cfi_rel_offset (r4, 0)
> - cfi_remember_state
> ldr r4, [sp, #8]
>
> /* convert offset to pages */
> @@ -53,17 +48,12 @@
> /* restore registers */
> 2:
> ldr r4, [sp], #4
> - cfi_adjust_cfa_offset (-4)
> - cfi_restore (r4)
> ldr r5, [sp], #4
> - cfi_adjust_cfa_offset (-4)
> - cfi_restore (r5)
>
> cmn r0, $4096
> RETINSTR(cc, lr)
> b PLTJMP(syscall_error)
>
> - cfi_restore_state
> .Linval:
> mov r0, #-EINVAL
> b 2b
> @@ -84,7 +74,6 @@
>
> /* store args on the stack */
> stmdb sp!, {a1-a4}
> - cfi_adjust_cfa_offset (16)
>
> /* do the syscall */
> mov a1, sp
> @@ -92,7 +81,6 @@
>
> /* pop args off the stack. */
> add sp, sp, #16
> - cfi_adjust_cfa_offset (-16)
>
> cmn r0, $4096
> RETINSTR(cc, lr)
> --- sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S
> +++ sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 2005, 2010 Free Software Foundation, Inc.
> +/* Copyright (C) 2005 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
> @@ -21,14 +21,10 @@
> /* Save the PID value. */
> #define SAVE_PID \
> str lr, [sp, #-4]!; /* Save LR. */ \
> - cfi_adjust_cfa_offset (4); \
> - cfi_rel_offset (lr, 0); \
> mov r0, #0xffff0fff; /* Point to the high page. */ \
> mov lr, pc; /* Save our return address. */ \
> sub pc, r0, #31; /* Jump to the TLS entry. */ \
> ldr lr, [sp], #4; /* Restore LR. */ \
> - cfi_adjust_cfa_offset (-4); \
> - cfi_restore (lr); \
> mov r2, r0; /* Save the TLS addr in r2. */ \
> ldr r3, [r2, #PID_OFFSET]; /* Load the saved PID. */ \
> rsb r0, r3, #0; /* Negate it. */ \
> --- sysdeps/unix/sysv/linux/arm/nptl/vfork.S
> +++ sysdeps/unix/sysv/linux/arm/nptl/vfork.S
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 2005, 2010 Free Software Foundation, Inc.
> +/* Copyright (C) 2005 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
> @@ -21,14 +21,10 @@
> /* Save the PID value. */
> #define SAVE_PID \
> str lr, [sp, #-4]!; /* Save LR. */ \
> - cfi_adjust_cfa_offset (4); \
> - cfi_rel_offset (lr, 0); \
> mov r0, #0xffff0fff; /* Point to the high page. */ \
> mov lr, pc; /* Save our return address. */ \
> sub pc, r0, #31; /* Jump to the TLS entry. */ \
> ldr lr, [sp], #4; /* Restore LR. */ \
> - cfi_adjust_cfa_offset (-4); \
> - cfi_restore (lr); \
> mov r2, r0; /* Save the TLS addr in r2. */ \
> ldr r3, [r2, #PID_OFFSET]; /* Load the saved PID. */ \
> rsbs r0, r3, #0; /* Negate it. */ \
> --- sysdeps/unix/sysv/linux/arm/sysdep.h
> +++ sysdeps/unix/sysv/linux/arm/sysdep.h
> @@ -84,7 +84,7 @@
>
> #undef PSEUDO_END
> #define PSEUDO_END(name) \
> - SYSCALL_ERROR_HANDLER; \
> + SYSCALL_ERROR_HANDLER \
> END (name)
>
> #undef PSEUDO_NOERRNO
> @@ -129,26 +129,17 @@
> DO_RET(lr); \
> 1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8;
> # else
> -# if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
> -# define POP_PC \
> - ldr lr, [sp], #4; \
> - cfi_adjust_cfa_offset (-4); \
> - cfi_restore (lr); \
> - bx lr
> -# else
> -# define POP_PC \
> - ldr pc, [sp], #4
> -# endif
> +#if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
> +#define POP_PC ldr lr, [sp], #4; bx lr
> +#else
> +#define POP_PC ldr pc, [sp], #4
> +#endif
> # define SYSCALL_ERROR_HANDLER \
> __local_syscall_error: \
> str lr, [sp, #-4]!; \
> - cfi_adjust_cfa_offset (4); \
> - cfi_rel_offset (lr, 0); \
> str r0, [sp, #-4]!; \
> - cfi_adjust_cfa_offset (4); \
> bl PLTJMP(C_SYMBOL_NAME(__errno_location)); \
> ldr r1, [sp], #4; \
> - cfi_adjust_cfa_offset (-4); \
> rsb r1, r1, #0; \
> str r1, [r0]; \
> mvn r0, #0; \
> @@ -188,7 +179,7 @@
>
> #undef DO_CALL
> #define DO_CALL(syscall_name, args) \
> - DOARGS_##args; \
> + DOARGS_##args \
> swi SYS_ify (syscall_name); \
> UNDOARGS_##args
>
> @@ -197,47 +188,18 @@
> #define DOARGS_2 /* nothing */
> #define DOARGS_3 /* nothing */
> #define DOARGS_4 /* nothing */
> -#define DOARGS_5 \
> - str r4, [sp, $-4]!; \
> - cfi_adjust_cfa_offset (4); \
> - cfi_rel_offset (r4, 0); \
> - ldr r4, [sp, $4]
> -#define DOARGS_6 \
> - mov ip, sp; \
> - stmfd sp!, {r4, r5}; \
> - cfi_adjust_cfa_offset (8); \
> - cfi_rel_offset (r4, 0); \
> - cfi_rel_offset (r5, 4); \
> - ldmia ip, {r4, r5}
> -#define DOARGS_7 \
> - mov ip, sp; \
> - stmfd sp!, {r4, r5, r6}; \
> - cfi_adjust_cfa_offset (12); \
> - cfi_rel_offset (r4, 0); \
> - cfi_rel_offset (r5, 4); \
> - cfi_rel_offset (r6, 8); \
> - ldmia ip, {r4, r5, r6}
> +#define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $4];
> +#define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmia ip, {r4, r5};
> +#define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmia ip, {r4, r5, r6};
>
> #define UNDOARGS_0 /* nothing */
> #define UNDOARGS_1 /* nothing */
> #define UNDOARGS_2 /* nothing */
> #define UNDOARGS_3 /* nothing */
> #define UNDOARGS_4 /* nothing */
> -#define UNDOARGS_5 \
> - ldr r4, [sp], $4; \
> - cfi_adjust_cfa_offset (-4); \
> - cfi_restore (r4)
> -#define UNDOARGS_6 \
> - ldmfd sp!, {r4, r5}; \
> - cfi_adjust_cfa_offset (-8); \
> - cfi_restore (r4); \
> - cfi_restore (r5)
> -#define UNDOARGS_7 \
> - ldmfd sp!, {r4, r5, r6}; \
> - cfi_adjust_cfa_offset (-12); \
> - cfi_restore (r4); \
> - cfi_restore (r5); \
> - cfi_restore (r6)
> +#define UNDOARGS_5 ldr r4, [sp], $4;
> +#define UNDOARGS_6 ldmfd sp!, {r4, r5};
> +#define UNDOARGS_7 ldmfd sp!, {r4, r5, r6};
>
> #else /* not __ASSEMBLER__ */
>
> --- sysdeps/unix/sysv/linux/hppa/Versions
> +++ sysdeps/unix/sysv/linux/hppa/Versions
> @@ -23,10 +23,6 @@
> GLIBC_2.11 {
> fallocate64;
> }
> - GLIBC_2.12 {
> - #errlist-compat 257
> - _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
> - }
> }
> librt {
> GLIBC_2.3 {
> --- sysdeps/unix/sysv/linux/hppa/bits/atomic.h
> +++ sysdeps/unix/sysv/linux/hppa/bits/atomic.h
> @@ -98,7 +98,7 @@
> int ret; \
> ret = atomic_compare_and_exchange_val_acq(mem, newval, oldval); \
> /* Return 1 if it was already acquired. */ \
> - (ret != (int)oldval); \
> + (ret != oldval); \
> })
> #else
> # error __ASSUME_LWS_CAS is required to build glibc.
> --- sysdeps/unix/sysv/linux/hppa/bits/errno.h
> +++ sysdeps/unix/sysv/linux/hppa/bits/errno.h
> @@ -30,18 +30,6 @@
> # define ECANCELED ECANCELLED
> # endif
>
> -# ifndef EOWNERDEAD
> -# define EOWNERDEAD 254
> -# endif
> -
> -# ifndef ENOTRECOVERABLE
> -# define ENOTRECOVERABLE 255
> -# endif
> -
> -# ifndef ERFKILL
> -# define ERFKILL 256
> -# endif
> -
> # ifndef __ASSEMBLER__
> /* Function to get address of global `errno' variable. */
> extern int *__errno_location (void) __THROW __attribute__ ((__const__));
> --- sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
> +++ sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
> @@ -1,6 +1,6 @@
> /* O_*, F_*, FD_* bit values for Linux/HPPA.
> Copyright (C) 1995,1996,1997,1998,1999,2000,2002,2004
> - Free Software Foundation, Inc.
> + 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,7 +18,7 @@
> Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA. */
>
> -#ifndef _FCNTL_H
> +#ifndef _FCNTL_H
> # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
> #endif
>
> @@ -27,24 +27,23 @@
> # include <bits/uio.h>
> #endif
>
> -
> /* open/fcntl - O_SYNC is only implemented on blocks devices and on files
> located on an ext2 file system */
> -#define O_ACCMODE 0003
> -#define O_RDONLY 00
> -#define O_WRONLY 01
> -#define O_RDWR 02
> +#define O_RDONLY 00000000
> +#define O_WRONLY 00000001
> +#define O_RDWR 00000002
> +#define O_ACCMODE 00000003
> +#define O_APPEND 00000010
> +#define O_BLKSEEK 00000100 /* HPUX only */
> #define O_CREAT 00000400 /* not fcntl */
> -#define O_EXCL 00002000 /* not fcntl */
> -#define O_NOCTTY 00400000 /* not fcntl */
> #define O_TRUNC 00001000 /* not fcntl */
> -#define O_APPEND 00000010
> +#define O_EXCL 00002000 /* not fcntl */
> +#define O_ASYNC 00020000
> +#define O_SYNC 00100000
> #define O_NONBLOCK 00200004 /* HPUX has separate NDELAY & NONBLOCK */
> #define O_NDELAY O_NONBLOCK
> -#define O_SYNC 00100000
> -#define O_FSYNC O_SYNC
> -#define O_ASYNC 020000
> -#define O_BLKSEEK 00000100 /* HPUX only */
> +#define O_NOCTTY 00400000 /* not fcntl */
> +
>
> #ifdef __USE_GNU
> # define O_DIRECT 000040000 /* Direct disk access. */
> @@ -54,18 +53,15 @@
> # define O_CLOEXEC 010000000 /* Set close_on_exec. */
> #endif
>
> -/* For now Linux has synchronisity options for data and read operations.
> - We define the symbols here but let them do the same as O_SYNC since
> - this is a superset. */
> +#ifdef __USE_LARGEFILE64
> +# define O_LARGEFILE 00004000
> +#endif
> +
> #if defined __USE_POSIX199309 || defined __USE_UNIX98
> # define O_DSYNC 01000000 /* HPUX only */
> # define O_RSYNC 02000000 /* HPUX only */
> #endif
>
> -#ifdef __USE_LARGEFILE64
> -# define O_LARGEFILE 00004000
> -#endif
> -
> /* Values for the second argument to `fcntl'. */
> #define F_DUPFD 0 /* Duplicate file descriptor. */
> #define F_GETFD 1 /* Get file descriptor flags. */
> @@ -74,11 +70,11 @@
> #define F_SETFL 4 /* Set file status flags. */
> #ifndef __USE_FILE_OFFSET64
> # define F_GETLK 5 /* Get record locking info. */
> -# define F_SETLK 6 /* Set record locking info (non-blocking). */
> -# define F_SETLKW 7 /* Set record locking info (blocking). */
> +# define F_SETLK 6 /* Set record locking info (non-blocking). */
> +# define F_SETLKW 7 /* Set record locking info (blocking). */
> #else
> -# define F_GETLK F_GETLK64 /* Get record locking info. */
> -# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
> +# define F_GETLK F_GETLK64 /* Get record locking info. */
> +# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking). */
> # define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
> #endif
> #define F_GETLK64 8 /* Get record locking info. */
> @@ -93,19 +89,19 @@
> #ifdef __USE_GNU
> # define F_SETSIG 13 /* Set number of signal to be sent. */
> # define F_GETSIG 14 /* Get number of signal to be sent. */
> -# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
> -# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
> +# define F_GETOWN_EX 15
> +# define F_SETOWN_EX 16
> #endif
>
> #ifdef __USE_GNU
> -# define F_SETLEASE 1024 /* Set a lease. */
> -# define F_GETLEASE 1025 /* Enquire what lease is active. */
> -# define F_NOTIFY 1026 /* Request notfications on a directory. */
> +# define F_SETLEASE 1024 /* Set a lease. */
> +# define F_GETLEASE 1025 /* Enquire what lease is active. */
> +# define F_NOTIFY 1026 /* Request notfications on a directory. */
> # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
> close-on-exit set. */
> #endif
>
> -/* For F_[GET|SET]FD. */
> +/* for F_[GET|SET]FL */
> #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
>
> /* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
> @@ -113,12 +109,12 @@
> #define F_WRLCK 2 /* Write lock. */
> #define F_UNLCK 3 /* Remove lock. */
>
> -/* For old implementation of bsd flock(). */
> +/* for old implementation of bsd flock () */
> #define F_EXLCK 4 /* or 3 */
> #define F_SHLCK 8 /* or 4 */
>
> #ifdef __USE_BSD
> -/* Operations for bsd flock(), also used by the kernel implementation. */
> +/* operations for bsd flock(), also used by the kernel implementation */
> # define LOCK_SH 1 /* shared lock */
> # define LOCK_EX 2 /* exclusive lock */
> # define LOCK_NB 4 /* or'd with one of the above to prevent
> @@ -127,26 +123,19 @@
> #endif
>
> #ifdef __USE_GNU
> -# define LOCK_MAND 32 /* This is a mandatory flock: */
> -# define LOCK_READ 64 /* ... which allows concurrent read operations. */
> -# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
> -# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
> -#endif
> -
> -#ifdef __USE_GNU
> /* Types of directory notifications that may be requested with F_NOTIFY. */
> -# define DN_ACCESS 0x00000001 /* File accessed. */
> -# define DN_MODIFY 0x00000002 /* File modified. */
> -# define DN_CREATE 0x00000004 /* File created. */
> -# define DN_DELETE 0x00000008 /* File removed. */
> -# define DN_RENAME 0x00000010 /* File renamed. */
> -# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
> -# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
> +# define DN_ACCESS 0x00000001 /* File accessed. */
> +# define DN_MODIFY 0x00000002 /* File modified. */
> +# define DN_CREATE 0x00000004 /* File created. */
> +# define DN_DELETE 0x00000008 /* File removed. */
> +# define DN_RENAME 0x00000010 /* File renamed. */
> +# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
> +# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
> #endif
>
> struct flock
> {
> - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
> + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
> short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
> #ifndef __USE_FILE_OFFSET64
> __off_t l_start; /* Offset where the lock begins. */
> @@ -161,7 +150,7 @@
> #ifdef __USE_LARGEFILE64
> struct flock64
> {
> - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
> + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
> short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
> __off64_t l_start; /* Offset where the lock begins. */
> __off64_t l_len; /* Size of the locked area; zero means until EOF. */
> @@ -169,24 +158,6 @@
> };
> #endif
>
> -#ifdef __USE_GNU
> -/* Owner types. */
> -enum __pid_type
> - {
> - F_OWNER_TID = 0, /* Kernel thread. */
> - F_OWNER_PID, /* Process. */
> - F_OWNER_PGRP, /* Process group. */
> - F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
> - };
> -
> -/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
> -struct f_owner_ex
> - {
> - enum __pid_type type; /* Owner type of ID. */
> - __pid_t pid; /* ID of owner. */
> - };
> -#endif
> -
> /* Define some more compatibility macros to be backward compatible with
> BSD systems which did not managed to hide these kernel macros. */
> #ifdef __USE_BSD
> @@ -201,15 +172,13 @@
> #ifdef __USE_XOPEN2K
> # define POSIX_FADV_NORMAL 0 /* No further special treatment. */
> # define POSIX_FADV_RANDOM 1 /* Expect random page references. */
> -# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
> +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
> # define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
> # define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
> # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
> #endif
>
> -
> #ifdef __USE_GNU
> -/* Flags for SYNC_FILE_RANGE. */
> # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
> in the range before performing the
> write. */
> @@ -237,18 +206,16 @@
> extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
> __THROW;
>
> -
> /* Selective file content synch'ing. */
> -extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
> +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
> unsigned int __flags);
>
> -
> /* Splice address range into a pipe. */
> -extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
> +extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
> size_t __count, unsigned int __flags);
>
> /* Splice two files together. */
> -extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
> +extern ssize_t splice (int __fdin, __off64_t *offin, int __fdout,
> __off64_t *__offout, size_t __len,
> unsigned int __flags);
>
> @@ -274,5 +241,5 @@
> # endif
>
> #endif
> -
> +
> __END_DECLS
> --- sysdeps/unix/sysv/linux/hppa/bits/mman.h
> +++ sysdeps/unix/sysv/linux/hppa/bits/mman.h
> @@ -86,8 +86,6 @@
> # define MADV_REMOVE 9 /* Remove these pages and resources. */
> # define MADV_DONTFORK 10 /* Do not inherit across fork. */
> # define MADV_DOFORK 11 /* Do inherit across fork. */
> -# define MADV_MERGEABLE 65 /* KSM may merge identical pages */
> -# define MADV_UNMERGEABLE 66 /* KSM may not merge identical pages */
> #endif
>
> /* The range 12-64 is reserved for page size specification. */
> --- sysdeps/unix/sysv/linux/hppa/bits/socket.h
> +++ sysdeps/unix/sysv/linux/hppa/bits/socket.h
> @@ -1,6 +1,6 @@
> /* System-specific socket constants and types. Linux version.
> - Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009,
> - 2010 Free Software Foundation, Inc.
> + Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009
> + Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> The GNU C Library is free software; you can redistribute it and/or
> @@ -62,7 +62,7 @@
> /* Flags to be ORed into the type parameter of socket and socketpair and
> used for the flags parameter of paccept. */
>
> - SOCK_CLOEXEC = 010000000, /* Atomically set close-on-exec flag for the
> + SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the
> new descriptor(s). */
> #define SOCK_CLOEXEC SOCK_CLOEXEC
> #undef SOCK_NONBLOCK
> @@ -233,8 +233,6 @@
> #define MSG_NOSIGNAL MSG_NOSIGNAL
> MSG_MORE = 0x8000, /* Sender will send more. */
> #define MSG_MORE MSG_MORE
> - MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/
> -#define MSG_WAITFORONE MSG_WAITFORONE
>
> MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file
> descriptor received through
> --- sysdeps/unix/sysv/linux/hppa/makecontext.c
> +++ sysdeps/unix/sysv/linux/hppa/makecontext.c
> @@ -1,5 +1,5 @@
> /* Create new context.
> - Copyright (C) 2008, 2010 Free Software Foundation, Inc.
> + Copyright (C) 2008 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
> Contributed by Helge Deller <deller at gmx.de>, 2008.
>
> @@ -25,21 +25,24 @@
> #include <sysdep.h>
> #include <ucontext.h>
>
> -/* POSIX only supports integer arguments. */
> -#define STACK_ALIGN 64
> -#define FRAME_SIZE 8
> +/* XXX: This implementation only handles integer arguments. */
>
> void
> __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
> {
> - unsigned long *sp;
> + unsigned int *sp;
> va_list ap;
> int i;
>
> - /* Get stack pointer (64-byte aligned). */
> - sp = (unsigned long *)((((unsigned long) ucp->uc_stack.ss_sp)
> - + FRAME_SIZE + argc + STACK_ALIGN)
> - & ~(STACK_ALIGN - 1));
> + if (argc > 8)
> + {
> + fprintf (stderr, _("\
> +makecontext: does not know how to handle more than 8 arguments\n"));
> + exit (-1);
> + }
> +
> + /* Get stack pointer. */
> + sp = (unsigned int *) ucp->uc_stack.ss_sp;
>
> /* Store address to jump to. */
> ucp->uc_mcontext.sc_gr[2] = (unsigned long) func;
> @@ -47,27 +50,29 @@
> va_start (ap, argc);
> /* Handle arguments. */
> for (i = 0; i < argc; ++i)
> - {
> - if (i < 4)
> - {
> - ucp->uc_mcontext.sc_gr[26-i] = va_arg (ap, int);
> - continue;
> + switch (i)
> + {
> + case 0:
> + case 1:
> + case 2:
> + case 3:
> + ucp->uc_mcontext.sc_gr[26-i] = va_arg (ap, int);
> + break;
> + case 4:
> + case 5:
> + case 6:
> + case 7:
> + if (sizeof(unsigned long) == 4) {
> + /* 32bit: put arg7-arg4 on stack. */
> + sp[7-i] = va_arg (ap, int);
> + } else {
> + /* 64bit: r19-r22 are arg7-arg4. */
> + ucp->uc_mcontext.sc_gr[22+4-i] = va_arg (ap, int);
> }
> + break;
> + }
> + va_end (ap);
>
> - if ((i < 8) && (sizeof(unsigned long) == 8))
> - {
> - /* 64bit: r19-r22 are arg7-arg4. */
> - ucp->uc_mcontext.sc_gr[22+4-i] = va_arg (ap, int);
> - continue;
> - }
> -
> - /* All other arguments go on the stack. */
> - sp[-1 * (FRAME_SIZE + 1 + i)] = va_arg (ap, int);
> - }
> - va_end (ap);
> -
> - /* Adjust the stack pointer to last used argument. */
> - ucp->uc_mcontext.sc_gr[30] = (unsigned long) sp;
> }
>
>
> --- sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
> +++ sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
> @@ -64,7 +64,7 @@
> {
> struct __pthread_mutex_s
> {
> - int __lock __attribute__ ((aligned(16)));
> + int __lock;
> unsigned int __count;
> int __owner;
> /* KIND must stay at this position in the structure to maintain
> @@ -113,7 +113,7 @@
> start of the 4-word lock structure, the next four words
> are set all to 1 by the Linuxthreads
> PTHREAD_COND_INITIALIZER. */
> - int __lock __attribute__ ((aligned(16)));
> + int __lock;
> /* Tracks the initialization of this structure:
> 0 initialized with NPTL PTHREAD_COND_INITIALIZER.
> 1 initialized with Linuxthreads PTHREAD_COND_INITIALIZER.
> @@ -161,7 +161,7 @@
> start of the 4-word 16-byte aligned lock structure. The
> next four words are all set to 1 by the Linuxthreads
> PTHREAD_RWLOCK_INITIALIZER. We ignore them in NPTL. */
> - int __compat_padding[4] __attribute__ ((aligned(16)));
> + int __compat_padding[4];
> int __lock;
> unsigned int __nr_readers;
> unsigned int __readers_wakeup;
> --- sysdeps/unix/sysv/linux/m68k/Makefile
> +++ sysdeps/unix/sysv/linux/m68k/Makefile
> @@ -2,18 +2,12 @@
>
> m68k-syntax-flag = -DMOTOROLA_SYNTAX
>
> -ifeq ($(subdir),csu)
> -sysdep_routines += m68k-helpers
> -endif
> -
> ifeq ($(subdir),misc)
> sysdep_routines += mremap
> sysdep_headers += sys/reg.h
> endif
>
> ifeq ($(subdir),elf)
> -sysdep_routines += dl-vdso libc-m68k-vdso
> -sysdep-rtld-routines += m68k-vdso
> sysdep-others += lddlibc4
> install-bin += lddlibc4
> endif
> --- sysdeps/unix/sysv/linux/m68k/Versions
> +++ sysdeps/unix/sysv/linux/m68k/Versions
> @@ -32,18 +32,4 @@
> GLIBC_2.11 {
> fallocate64;
> }
> - GLIBC_2.12 {
> - __m68k_read_tp;
> - }
> - GLIBC_PRIVATE {
> - __vdso_atomic_cmpxchg_32; __vdso_atomic_barrier;
> - }
> -}
> -
> -ld {
> - GLIBC_PRIVATE {
> - __rtld___vdso_read_tp;
> - __rtld___vdso_atomic_cmpxchg_32;
> - __rtld___vdso_atomic_barrier;
> - }
> }
> --- sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
> +++ sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
> @@ -1,5 +1,5 @@
> /* O_*, F_*, FD_* bit values for Linux.
> - Copyright (C) 2000, 2004, 2008, 2009, 2010 Free Software Foundation, Inc.
> + Copyright (C) 2000, 2004, 2008, 2009 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> The GNU C Library is free software; you can redistribute it and/or
> @@ -40,25 +40,23 @@
> #define O_APPEND 02000
> #define O_NONBLOCK 04000
> #define O_NDELAY O_NONBLOCK
> -#define O_SYNC 04010000
> +#define O_SYNC 010000
> #define O_FSYNC O_SYNC
> #define O_ASYNC 020000
>
> -#ifdef __USE_XOPEN2K8
> +#ifdef __USE_GNU
> # define O_DIRECTORY 040000 /* Must be a directory. */
> # define O_NOFOLLOW 0100000 /* Do not follow links. */
> -# define O_CLOEXEC 02000000 /* Set close_on_exec. */
> -#endif
> -#ifdef __USE_GNU
> # define O_DIRECT 0200000 /* Direct disk access. */
> # define O_NOATIME 01000000 /* Do not set atime. */
> +# define O_CLOEXEC 02000000 /* Set close_on_exec. */
> #endif
>
> /* For now Linux has synchronisity options for data and read operations.
> We define the symbols here but let them do the same as O_SYNC since
> this is a superset. */
> #if defined __USE_POSIX199309 || defined __USE_UNIX98
> -# define O_DSYNC 010000 /* Synchronize data. */
> +# define O_DSYNC O_SYNC /* Synchronize data. */
> # define O_RSYNC O_SYNC /* Synchronize read operations. */
> #endif
>
> @@ -85,7 +83,7 @@
> #define F_SETLK64 13 /* Set record locking info (non-blocking). */
> #define F_SETLKW64 14 /* Set record locking info (blocking). */
>
> -#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
> +#if defined __USE_BSD || defined __USE_UNIX98
> # define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
> # define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
> #endif
> @@ -101,8 +99,6 @@
> # define F_SETLEASE 1024 /* Set a lease. */
> # define F_GETLEASE 1025 /* Enquire what lease is active. */
> # define F_NOTIFY 1026 /* Request notfications on a directory. */
> -#endif
> -#ifdef __USE_XOPEN2K8
> # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
> close-on-exit set. */
> #endif
> @@ -175,10 +171,9 @@
> /* Owner types. */
> enum __pid_type
> {
> - F_OWNER_TID = 0, /* Kernel thread. */
> - F_OWNER_PID, /* Process. */
> - F_OWNER_PGRP, /* Process group. */
> - F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
> + F_OWNER_TID = 0, /* Kernel thread. */
> + F_OWNER_PID, /* Process. */
> + F_OWNER_GID /* Process group. */
> };
>
> /* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
> @@ -241,7 +236,7 @@
>
>
> /* Selective file content synch'ing. */
> -extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
> +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
> unsigned int __flags);
>
>
> --- sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h
> +++ sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h
> -/* Resolve function pointers to VDSO functions.
> - Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -
> -#ifndef _M68K_VDSO_H
> -#define _M68K_VDSO_H
> -
> -#ifdef SHARED
> -
> -# ifdef IS_IN_rtld
> -# define M68K_VDSO_SYMBOL(name) __rtld_##name
> -# define STR_M68K_VDSO_SYMBOL(name) "__rtld_" #name
> -# else
> -# define M68K_VDSO_SYMBOL(name) name
> -# define STR_M68K_VDSO_SYMBOL(name) #name
> -# endif
> -
> -# ifndef __ASSEMBLER__
> -
> -/* We define __rtld_* copies for rtld.
> - We need them visible in libc to initialize. */
> -# if defined IS_IN_rtld || !defined NOT_IN_libc
> -extern void *__rtld___vdso_read_tp;
> -extern void *__rtld___vdso_atomic_cmpxchg_32;
> -extern void *__rtld___vdso_atomic_barrier;
> -
> -/* These stubs are meant to be invoked only from the assembly. */
> -extern void __vdso_read_tp_stub (void);
> -extern void __vdso_atomic_cmpxchg_32_stub (void);
> -extern void __vdso_atomic_barrier_stub (void);
> -# endif /* IS_IN_rtld || !NOT_IN_libc */
> -
> -/* RTLD should only use its own copies. */
> -# ifndef IS_IN_rtld
> -extern void *__vdso_read_tp;
> -extern void *__vdso_atomic_cmpxchg_32;
> -extern void *__vdso_atomic_barrier;
> -# endif /* !IS_IN_rtld */
> -
> -# endif /* !__ASSEMBLER__ */
> -
> -#endif /* SHARED */
> -
> -#endif /* _M68K_VDSO_H */
> --- sysdeps/unix/sysv/linux/m68k/bits/mman.h
> +++ sysdeps/unix/sysv/linux/m68k/bits/mman.h
> @@ -1,6 +1,5 @@
> /* Definitions for POSIX memory map interface. Linux/m68k version.
> - Copyright (C) 1997, 2000, 2003, 2005, 2008, 2009
> - Free Software Foundation, Inc.
> + Copyright (C) 1997, 2000, 2003, 2005, 2008 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> The GNU C Library is free software; you can redistribute it and/or
> @@ -84,17 +83,14 @@
>
> /* Advice to `madvise'. */
> #ifdef __USE_BSD
> -# define MADV_NORMAL 0 /* No further special treatment. */
> -# define MADV_RANDOM 1 /* Expect random page references. */
> -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
> -# define MADV_WILLNEED 3 /* Will need these pages. */
> -# define MADV_DONTNEED 4 /* Don't need these pages. */
> -# define MADV_REMOVE 9 /* Remove these pages and resources. */
> -# define MADV_DONTFORK 10 /* Do not inherit across fork. */
> -# define MADV_DOFORK 11 /* Do inherit across fork. */
> -# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
> -# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
> -# define MADV_HWPOISON 100 /* Poison a page for testing. */
> +# define MADV_NORMAL 0 /* No further special treatment. */
> +# define MADV_RANDOM 1 /* Expect random page references. */
> +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
> +# define MADV_WILLNEED 3 /* Will need these pages. */
> +# define MADV_DONTNEED 4 /* Don't need these pages. */
> +# define MADV_REMOVE 9 /* Remove these pages and resources. */
> +# define MADV_DONTFORK 10 /* Do not inherit across fork. */
> +# define MADV_DOFORK 11 /* Do inherit across fork. */
> #endif
>
> /* The POSIX people had to invent similar names for the same things. */
> --- sysdeps/unix/sysv/linux/m68k/bits/poll.h
> +++ sysdeps/unix/sysv/linux/m68k/bits/poll.h
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 1997, 2001, 2008, 2009 Free Software Foundation, Inc.
> +/* Copyright (C) 1997, 2001, 2008 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> The GNU C Library is free software; you can redistribute it and/or
> @@ -27,7 +27,7 @@
> #define POLLPRI 0x002 /* There is urgent data to read. */
> #define POLLOUT 0x004 /* Writing now will not block. */
>
> -#if defined __USE_XOPEN || defined __USE_XOPEN2K8
> +#ifdef __USE_XOPEN
> /* These values are defined in XPG4.2. */
> # define POLLRDNORM 0x040 /* Normal data may be read. */
> # define POLLRDBAND 0x080 /* Priority data may be read. */
> --- sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h
> +++ sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h
> +/* Copyright (C) 2006 Free Software Foundation, Inc.
> + This file is part of the GNU C Library.
> +
> + The GNU C Library is free software; you can redistribute it and/or
> + modify it under the terms of the GNU Lesser General Public
> + License as published by the Free Software Foundation; either
> + version 2.1 of the License, or (at your option) any later version.
> +
> + The GNU C Library is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + Lesser General Public License for more details.
> +
> + You should have received a copy of the GNU Lesser General Public
> + License along with the GNU C Library; if not, write to the Free
> + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> + 02111-1307 USA. */
> +
> +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
> +# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
> +#endif
> +
> +#ifndef _BITS_SIGCONTEXT_H
> +#define _BITS_SIGCONTEXT_H 1
> +
> +struct sigcontext {
> + unsigned long sc_mask;
> + unsigned long sc_usp;
> + unsigned long sc_d0;
> + unsigned long sc_d1;
> +#ifdef __mcoldfire__
> + unsigned long sc_d2;
> + unsigned long sc_d3;
> + unsigned long sc_d4;
> + unsigned long sc_d5;
> + unsigned long sc_d6;
> + unsigned long sc_d7;
> +#endif
> + unsigned long sc_a0;
> + unsigned long sc_a1;
> +#ifdef __mcoldfire__
> + unsigned long sc_a2;
> + unsigned long sc_a3;
> + unsigned long sc_a4;
> + unsigned long sc_a5;
> + unsigned long sc_a6;
> +#endif
> + unsigned short sc_sr;
> + unsigned long sc_pc;
> + unsigned short sc_formatvec;
> +#ifdef __mcoldfire__
> + unsigned long sc_fpregs[8][2];
> + unsigned long sc_fpcntl[3];
> + unsigned char sc_fpstate[16];
> +#else
> + unsigned long sc_fpregs[2*3];
> + unsigned long sc_fpcntl[3];
> + unsigned char sc_fpstate[216];
> +#endif
> +};
> +
> +#endif
> --- sysdeps/unix/sysv/linux/m68k/bits/siginfo.h
> +++ sysdeps/unix/sysv/linux/m68k/bits/siginfo.h
> +/* siginfo_t, sigevent and constants. m68k linux version.
> + Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc.
> + This file is part of the GNU C Library.
> +
> + The GNU C Library is free software; you can redistribute it and/or
> + modify it under the terms of the GNU Lesser General Public
> + License as published by the Free Software Foundation; either
> + version 2.1 of the License, or (at your option) any later version.
> +
> + The GNU C Library is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + Lesser General Public License for more details.
> +
> + You should have received a copy of the GNU Lesser General Public
> + License along with the GNU C Library; if not, write to the Free
> + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> + 02111-1307 USA. */
> +
> +#if !defined _SIGNAL_H && !defined __need_siginfo_t \
> + && !defined __need_sigevent_t
> +# error "Never include this file directly. Use <signal.h> instead"
> +#endif
> +
> +#include <bits/wordsize.h>
> +
> +#if (!defined __have_sigval_t \
> + && (defined _SIGNAL_H || defined __need_siginfo_t \
> + || defined __need_sigevent_t))
> +# define __have_sigval_t 1
> +
> +/* Type for data associated with a signal. */
> +typedef union sigval
> + {
> + int sival_int;
> + void *sival_ptr;
> + } sigval_t;
> +#endif
> +
> +#if (!defined __have_siginfo_t \
> + && (defined _SIGNAL_H || defined __need_siginfo_t))
> +# define __have_siginfo_t 1
> +
> +# define __SI_MAX_SIZE 128
> +# if __WORDSIZE == 64
> +# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4)
> +# else
> +# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
> +# endif
> +
> +typedef struct siginfo
> + {
> + int si_signo; /* Signal number. */
> + int si_errno; /* If non-zero, an errno value associated with
> + this signal, as defined in <errno.h>. */
> + int si_code; /* Signal code. */
> +
> + union
> + {
> + int _pad[__SI_PAD_SIZE];
> +
> + /* kill(). */
> + struct
> + {
> + __pid_t si_pid; /* Sending process ID. */
> + unsigned short __pad; /* 16-bit version of si_uid. */
> + __uid_t si_uid; /* Real user ID of sending process. */
> + } _kill;
> +
> + /* POSIX.1b timers. */
> + struct
> + {
> + int si_tid; /* Timer ID. */
> + int si_overrun; /* Overrun count. */
> + sigval_t si_sigval; /* Signal value. */
> + } _timer;
> +
> + /* POSIX.1b signals. */
> + struct
> + {
> + __pid_t si_pid; /* Sending process ID. */
> + unsigned short __pad; /* 16-bit version of si_uid. */
> + sigval_t si_sigval; /* Signal value. */
> + __uid_t si_uid; /* Real user ID of sending process. */
> + } _rt;
> +
> + /* SIGCHLD. */
> + struct
> + {
> + __pid_t si_pid; /* Which child. */
> + unsigned short __pad; /* 16-bit version of si_uid. */
> + int si_status; /* Exit value or signal. */
> + __clock_t si_utime;
> + __clock_t si_stime;
> + __uid_t si_uid; /* Real user ID of sending process. */
> + } _sigchld;
> +
> + /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */
> + struct
> + {
> + void *si_addr; /* Faulting insn/memory ref. */
> + } _sigfault;
> +
> + /* SIGPOLL. */
> + struct
> + {
> + long int si_band; /* Band event for SIGPOLL. */
> + int si_fd;
> + } _sigpoll;
> + } _sifields;
> + } siginfo_t;
> +
> +
> +/* X/Open requires some more fields with fixed names. */
> +# define si_pid _sifields._kill.si_pid
> +# define si_uid _sifields._kill.si_uid
> +# define si_timerid _sifields._timer.si_tid
> +# define si_overrun _sifields._timer.si_overrun
> +# define si_status _sifields._sigchld.si_status
> +# define si_utime _sifields._sigchld.si_utime
> +# define si_stime _sifields._sigchld.si_stime
> +# define si_value _sifields._rt.si_sigval
> +# define si_int _sifields._rt.si_sigval.sival_int
> +# define si_ptr _sifields._rt.si_sigval.sival_ptr
> +# define si_addr _sifields._sigfault.si_addr
> +# define si_band _sifields._sigpoll.si_band
> +# define si_fd _sifields._sigpoll.si_fd
> +
> +
> +/* Values for `si_code'. Positive values are reserved for kernel-generated
> + signals. */
> +enum
> +{
> + SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */
> +# define SI_ASYNCNL SI_ASYNCNL
> + SI_TKILL = -6, /* Sent by tkill. */
> +# define SI_TKILL SI_TKILL
> + SI_SIGIO, /* Sent by queued SIGIO. */
> +# define SI_SIGIO SI_SIGIO
> + SI_ASYNCIO, /* Sent by AIO completion. */
> +# define SI_ASYNCIO SI_ASYNCIO
> + SI_MESGQ, /* Sent by real time mesq state change. */
> +# define SI_MESGQ SI_MESGQ
> + SI_TIMER, /* Sent by timer expiration. */
> +# define SI_TIMER SI_TIMER
> + SI_QUEUE, /* Sent by sigqueue. */
> +# define SI_QUEUE SI_QUEUE
> + SI_USER, /* Sent by kill, sigsend, raise. */
> +# define SI_USER SI_USER
> + SI_KERNEL = 0x80 /* Send by kernel. */
> +#define SI_KERNEL SI_KERNEL
> +};
> +
> +
> +/* `si_code' values for SIGILL signal. */
> +enum
> +{
> + ILL_ILLOPC = 1, /* Illegal opcode. */
> +# define ILL_ILLOPC ILL_ILLOPC
> + ILL_ILLOPN, /* Illegal operand. */
> +# define ILL_ILLOPN ILL_ILLOPN
> + ILL_ILLADR, /* Illegal addressing mode. */
> +# define ILL_ILLADR ILL_ILLADR
> + ILL_ILLTRP, /* Illegal trap. */
> +# define ILL_ILLTRP ILL_ILLTRP
> + ILL_PRVOPC, /* Privileged opcode. */
> +# define ILL_PRVOPC ILL_PRVOPC
> + ILL_PRVREG, /* Privileged register. */
> +# define ILL_PRVREG ILL_PRVREG
> + ILL_COPROC, /* Coprocessor error. */
> +# define ILL_COPROC ILL_COPROC
> + ILL_BADSTK /* Internal stack error. */
> +# define ILL_BADSTK ILL_BADSTK
> +};
> +
> +/* `si_code' values for SIGFPE signal. */
> +enum
> +{
> + FPE_INTDIV = 1, /* Integer divide by zero. */
> +# define FPE_INTDIV FPE_INTDIV
> + FPE_INTOVF, /* Integer overflow. */
> +# define FPE_INTOVF FPE_INTOVF
> + FPE_FLTDIV, /* Floating point divide by zero. */
> +# define FPE_FLTDIV FPE_FLTDIV
> + FPE_FLTOVF, /* Floating point overflow. */
> +# define FPE_FLTOVF FPE_FLTOVF
> + FPE_FLTUND, /* Floating point underflow. */
> +# define FPE_FLTUND FPE_FLTUND
> + FPE_FLTRES, /* Floating point inexact result. */
> +# define FPE_FLTRES FPE_FLTRES
> + FPE_FLTINV, /* Floating point invalid operation. */
> +# define FPE_FLTINV FPE_FLTINV
> + FPE_FLTSUB /* Subscript out of range. */
> +# define FPE_FLTSUB FPE_FLTSUB
> +};
> +
> +/* `si_code' values for SIGSEGV signal. */
> +enum
> +{
> + SEGV_MAPERR = 1, /* Address not mapped to object. */
> +# define SEGV_MAPERR SEGV_MAPERR
> + SEGV_ACCERR /* Invalid permissions for mapped object. */
> +# define SEGV_ACCERR SEGV_ACCERR
> +};
> +
> +/* `si_code' values for SIGBUS signal. */
> +enum
> +{
> + BUS_ADRALN = 1, /* Invalid address alignment. */
> +# define BUS_ADRALN BUS_ADRALN
> + BUS_ADRERR, /* Non-existant physical address. */
> +# define BUS_ADRERR BUS_ADRERR
> + BUS_OBJERR /* Object specific hardware error. */
> +# define BUS_OBJERR BUS_OBJERR
> +};
> +
> +/* `si_code' values for SIGTRAP signal. */
> +enum
> +{
> + TRAP_BRKPT = 1, /* Process breakpoint. */
> +# define TRAP_BRKPT TRAP_BRKPT
> + TRAP_TRACE /* Process trace trap. */
> +# define TRAP_TRACE TRAP_TRACE
> +};
> +
> +/* `si_code' values for SIGCHLD signal. */
> +enum
> +{
> + CLD_EXITED = 1, /* Child has exited. */
> +# define CLD_EXITED CLD_EXITED
> + CLD_KILLED, /* Child was killed. */
> +# define CLD_KILLED CLD_KILLED
> + CLD_DUMPED, /* Child terminated abnormally. */
> +# define CLD_DUMPED CLD_DUMPED
> + CLD_TRAPPED, /* Traced child has trapped. */
> +# define CLD_TRAPPED CLD_TRAPPED
> + CLD_STOPPED, /* Child has stopped. */
> +# define CLD_STOPPED CLD_STOPPED
> + CLD_CONTINUED /* Stopped child has continued. */
> +# define CLD_CONTINUED CLD_CONTINUED
> +};
> +
> +/* `si_code' values for SIGPOLL signal. */
> +enum
> +{
> + POLL_IN = 1, /* Data input available. */
> +# define POLL_IN POLL_IN
> + POLL_OUT, /* Output buffers available. */
> +# define POLL_OUT POLL_OUT
> + POLL_MSG, /* Input message available. */
> +# define POLL_MSG POLL_MSG
> + POLL_ERR, /* I/O error. */
> +# define POLL_ERR POLL_ERR
> + POLL_PRI, /* High priority input available. */
> +# define POLL_PRI POLL_PRI
> + POLL_HUP /* Device disconnected. */
> +# define POLL_HUP POLL_HUP
> +};
> +
> +# undef __need_siginfo_t
> +#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */
> +
> +
> +#if (defined _SIGNAL_H || defined __need_sigevent_t) \
> + && !defined __have_sigevent_t
> +# define __have_sigevent_t 1
> +
> +/* Structure to transport application-defined values with signals. */
> +# define __SIGEV_MAX_SIZE 64
> +# if __WORDSIZE == 64
> +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
> +# else
> +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
> +# endif
> +
> +typedef struct sigevent
> + {
> + sigval_t sigev_value;
> + int sigev_signo;
> + int sigev_notify;
> +
> + union
> + {
> + int _pad[__SIGEV_PAD_SIZE];
> +
> + /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the
> + thread to receive the signal. */
> + __pid_t _tid;
> +
> + struct
> + {
> + void (*_function) (sigval_t); /* Function to start. */
> + void *_attribute; /* Really pthread_attr_t. */
> + } _sigev_thread;
> + } _sigev_un;
> + } sigevent_t;
> +
> +/* POSIX names to access some of the members. */
> +# define sigev_notify_function _sigev_un._sigev_thread._function
> +# define sigev_notify_attributes _sigev_un._sigev_thread._attribute
> +
> +/* `sigev_notify' values. */
> +enum
> +{
> + SIGEV_SIGNAL = 0, /* Notify via signal. */
> +# define SIGEV_SIGNAL SIGEV_SIGNAL
> + SIGEV_NONE, /* Other notification: meaningless. */
> +# define SIGEV_NONE SIGEV_NONE
> + SIGEV_THREAD, /* Deliver via thread creation. */
> +# define SIGEV_THREAD SIGEV_THREAD
> +
> + SIGEV_THREAD_ID = 4 /* Send signal to specific thread. */
> +#define SIGEV_THREAD_ID SIGEV_THREAD_ID
> +};
> +
> +#endif /* have _SIGNAL_H. */
> --- sysdeps/unix/sysv/linux/m68k/bits/stat.h
> +++ sysdeps/unix/sysv/linux/m68k/bits/stat.h
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 1992,95,96,97,98,99,2000,2001,2002,2008,2009,2010
> +/* Copyright (C) 1992,95,96,97,98,99,2000,2001,2002,2008,2009
> Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> @@ -17,13 +17,10 @@
> Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA. */
>
> -#if !defined _SYS_STAT_H && !defined _FCNTL_H
> +#ifndef _SYS_STAT_H
> # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
> #endif
>
> -#ifndef _BITS_STAT_H
> -#define _BITS_STAT_H 1
> -
> /* Versions of the `struct stat' data structure. */
> #define _STAT_VER_LINUX_OLD 1
> #define _STAT_VER_KERNEL 1
> @@ -64,7 +61,7 @@
> #else
> __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
> #endif
> -#if defined __USE_MISC || defined __USE_XOPEN2K8
> +#ifdef __USE_MISC
> /* Nanosecond resolution timestamps are stored in a format
> equivalent to 'struct timespec'. This is the type used
> whenever possible but the Unix namespace rules do not allow the
> @@ -110,7 +107,7 @@
> __blksize_t st_blksize; /* Optimal block size for I/O. */
>
> __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
> -# if defined __USE_MISC || defined __USE_XOPEN2K8
> +#ifdef __USE_MISC
> /* Nanosecond resolution timestamps are stored in a format
> equivalent to 'struct timespec'. This is the type used
> whenever possible but the Unix namespace rules do not allow the
> @@ -120,14 +117,14 @@
> struct timespec st_atim; /* Time of last access. */
> struct timespec st_mtim; /* Time of last modification. */
> struct timespec st_ctim; /* Time of last status change. */
> -# else
> +#else
> __time_t st_atime; /* Time of last access. */
> unsigned long int st_atimensec; /* Nscecs of last access. */
> __time_t st_mtime; /* Time of last modification. */
> unsigned long int st_mtimensec; /* Nsecs of last modification. */
> __time_t st_ctime; /* Time of last status change. */
> unsigned long int st_ctimensec; /* Nsecs of last status change. */
> -# endif
> +#endif
> __ino64_t st_ino; /* File serial number. */
> };
> #endif
> @@ -170,5 +167,3 @@
> # define UTIME_NOW ((1l << 30) - 1l)
> # define UTIME_OMIT ((1l << 30) - 2l)
> #endif
> -
> -#endif /* bits/stat.h */
> --- sysdeps/unix/sysv/linux/m68k/clone.S
> +++ sysdeps/unix/sysv/linux/m68k/clone.S
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 1996,97,98,2002,2010 Free Software Foundation, Inc.
> +/* Copyright (C) 1996,97,98,2002 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
> Contributed by Andreas Schwab (schwab at issan.informatik.uni-dortmund.de)
>
> @@ -17,21 +17,14 @@
> Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA. */
>
> -/* clone() is even more special than fork() as it mucks with stacks
> +/* clone is even more special than fork as it mucks with stacks
> and invokes a function in the right context after its all over. */
>
> #include <sysdep.h>
> #define _ERRNO_H 1
> #include <bits/errno.h>
> -#ifdef RESET_PID
> -#include <tls.h>
> -#endif
> -
> -#define CLONE_VM 0x00000100
> -#define CLONE_THREAD 0x00010000
>
> -/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
> - void *parent_tidptr, void *tls, void *child_tidptr) */
> +/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */
>
> .text
> ENTRY (__clone)
> @@ -49,17 +42,7 @@
> movel 16(%sp), -(%a1)
>
> /* Do the system call */
> - movel 12+0(%sp), %d1 /* get flags */
> - movel %d3, -(%a1) /* save %d3 and get parent_tidptr */
> - movel %d3, -(%sp)
> - movel 20+4(%sp), %d3
> - movel %d4, -(%a1) /* save %d4 and get child_tidptr */
> - movel %d4, -(%sp)
> - movel 28+8(%sp), %d4
> - movel %d5, -(%a1) /* save %d5 and get tls */
> - movel %d5, -(%sp)
> - movel 24+12(%sp), %d5
> - /* save %d2 and get stack pointer */
> + movel 12(%sp), %d1 /* get flags */
> #ifdef __mcoldfire__
> movel %d2, -(%a1)
> movel %d2, -(%sp)
> @@ -74,9 +57,6 @@
> #else
> exg %d2, %a1 /* restore %d2 */
> #endif
> - movel (%sp)+, %d5 /* restore %d5, %d4 and %d3 */
> - movel (%sp)+, %d4
> - movel (%sp)+, %d3
>
> tstl %d0
> jmi SYSCALL_ERROR_LABEL
> @@ -85,35 +65,11 @@
> rts
>
> thread_start:
> - cfi_startproc
> - cfi_undefined (pc) /* Mark end of stack */
> subl %fp, %fp /* terminate the stack frame */
> -#ifdef RESET_PID
> - /* Check and see if we need to reset the PID. */
> - movel %d1, %a1
> - andl #CLONE_THREAD, %d1
> - jne donepid
> - movel %a1, %d1
> - movel #-1, %d0
> - andl #CLONE_VM, %d1
> - jne gotpid
> - movel #SYS_ify (getpid), %d0
> - trap #0
> -gotpid:
> - movel %a0, -(%sp)
> - movel %d0, -(%sp)
> - bsrl __m68k_read_tp at PLTPC
> - movel (%sp)+, %d0
> - movel %d0, PID_OFFSET(%a0)
> - movel %d0, TID_OFFSET(%a0)
> - movel (%sp)+, %a0
> -donepid:
> -#endif
> jsr (%a0)
> movel %d0, %d1
> movel #SYS_ify (exit), %d0
> trap #0
> - cfi_endproc
>
> PSEUDO_END (__clone)
>
> --- sysdeps/unix/sysv/linux/m68k/coldfire
> +++ sysdeps/unix/sysv/linux/m68k/coldfire
> -(directory)
> --- sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S
> +++ sysdeps/unix/sysv/linux/m68k/coldfire/m68k-helpers.S
> -/* Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - In addition to the permissions in the GNU Lesser General Public
> - License, the Free Software Foundation gives you unlimited
> - permission to link the compiled version of this file with other
> - programs, and to distribute those programs without any restriction
> - coming from the use of this file. (The GNU Lesser General Public
> - License restrictions do apply in other respects; for example, they
> - cover modification of the file, and distribution when not linked
> - into another program.)
> -
> - Note that people who make modified versions of this file are not
> - obligated to grant this special exception for their modified
> - versions; it is their choice whether to do so. The GNU Lesser
> - General Public License gives permission to release a modified
> - version without this exception; this exception also makes it
> - possible to release a modified version which carries forward this
> - exception.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#include <sysdep.h>
> -#include <bits/m68k-vdso.h>
> -
> - .text
> -
> - .hidden __vdso_read_tp_stub
> -ENTRY (__vdso_read_tp_stub)
> - cfi_startproc
> - move.l #__NR_get_thread_area, %d0
> - trap #0
> - move.l %d0, %a0
> - rts
> - cfi_endproc
> -END (__vdso_read_tp_stub)
> -
> -# ifdef SHARED
> -/* GCC will emit calls to this routine. Linux has an
> - equivalent helper function (which clobbers fewer registers than
> - a normal function call) in a vdso; tail call to the
> - helper. */
> -# ifdef IS_IN_rtld
> -/* rtld gets a hidden copy of __m68k_read_tp. */
> - .hidden __m68k_read_tp
> -# endif
> -ENTRY (__m68k_read_tp)
> - cfi_startproc
> - move.l #_GLOBAL_OFFSET_TABLE_ at GOTPC, %a0
> - lea (-6, %pc, %a0), %a0
> - move.l M68K_VDSO_SYMBOL (__vdso_read_tp)@GOT(%a0), %a0
> - move.l (%a0), %a0
> - jmp (%a0)
> - cfi_endproc
> -END (__m68k_read_tp)
> -
> -/* The following two stubs are for macros in atomic.h, they can't
> - clobber anything. */
> -
> - .hidden __vdso_atomic_cmpxchg_32_stub
> -ENTRY (__vdso_atomic_cmpxchg_32_stub)
> - cfi_startproc
> - move.l %d2, -(%sp)
> - cfi_adjust_cfa_offset (4)
> - cfi_rel_offset (%d2, 0)
> - move.l %d0, %d2
> - move.l #SYS_ify (atomic_cmpxchg_32), %d0
> - trap #0
> - move.l (%sp)+, %d2
> - cfi_adjust_cfa_offset (-4)
> - cfi_restore (%d2)
> - rts
> - cfi_endproc
> -END (__vdso_atomic_cmpxchg_32_stub)
> -
> - .hidden __vdso_atomic_barrier_stub
> -ENTRY (__vdso_atomic_barrier_stub)
> - cfi_startproc
> - move.l %d0, -(%sp)
> - cfi_adjust_cfa_offset (4)
> - move.l #SYS_ify (atomic_barrier), %d0
> - trap #0
> - move.l (%sp)+, %d0
> - cfi_adjust_cfa_offset (-4)
> - rts
> - cfi_endproc
> -END (__vdso_atomic_barrier_stub)
> -# else /* !SHARED */
> -/* If the vDSO is not available, use a syscall to get TP. */
> - strong_alias (__vdso_read_tp_stub, __m68k_read_tp)
> -# endif /* SHARED */
> --- sysdeps/unix/sysv/linux/m68k/coldfire/nptl
> +++ sysdeps/unix/sysv/linux/m68k/coldfire/nptl
> -(directory)
> --- sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits
> +++ sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits
> -(directory)
> --- sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h
> +++ sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h
> -/* Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#ifndef _BITS_ATOMIC_H
> -#define _BITS_ATOMIC_H 1
> -
> -#include <stdint.h>
> -#include <sysdep.h>
> -#include <bits/m68k-vdso.h>
> -
> -/* Coldfire has no atomic compare-and-exchange operation, but the
> - kernel provides userspace atomicity operations. Use them. */
> -
> -typedef int32_t atomic32_t;
> -typedef uint32_t uatomic32_t;
> -typedef int_fast32_t atomic_fast32_t;
> -typedef uint_fast32_t uatomic_fast32_t;
> -
> -typedef intptr_t atomicptr_t;
> -typedef uintptr_t uatomicptr_t;
> -typedef intmax_t atomic_max_t;
> -typedef uintmax_t uatomic_max_t;
> -
> -/* The only basic operation needed is compare and exchange. */
> -/* For ColdFire we'll have to trap into the kernel mode anyway,
> - so trap from the library rather then from the kernel wrapper. */
> -#ifdef SHARED
> -# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
> - ({ \
> - /* Use temporary variables to workaround call-clobberness of */ \
> - /* the registers. */ \
> - __typeof (mem) _mem = mem; \
> - __typeof (oldval) _oldval = oldval; \
> - __typeof (newval) _newval = newval; \
> - register __typeof (mem) _a0 asm ("a0") = _mem; \
> - register __typeof (oldval) _d0 asm ("d0") = _oldval; \
> - register __typeof (newval) _d1 asm ("d1") = _newval; \
> - void *tmp; \
> - \
> - asm ("movel #_GLOBAL_OFFSET_TABLE_ at GOTPC, %2\n\t" \
> - "lea (-6, %%pc, %2), %2\n\t" \
> - "movel " STR_M68K_VDSO_SYMBOL (__vdso_atomic_cmpxchg_32) \
> - "@GOT(%2), %2\n\t" \
> - "movel (%2), %2\n\t" \
> - "jsr (%2)\n\t" \
> - : "+d" (_d0), "+m" (*_a0), "=&a" (tmp) \
> - : "a" (_a0), "d" (_d1)); \
> - _d0; \
> - })
> -#else
> -# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
> - ({ \
> - /* Use temporary variables to workaround call-clobberness of */ \
> - /* the registers. */ \
> - __typeof (mem) _mem = mem; \
> - __typeof (oldval) _oldval = oldval; \
> - __typeof (newval) _newval = newval; \
> - register __typeof (oldval) _d0 asm ("d0") \
> - = SYS_ify (atomic_cmpxchg_32); \
> - register __typeof (mem) _a0 asm ("a0") = _mem; \
> - register __typeof (oldval) _d2 asm ("d2") = _oldval; \
> - register __typeof (newval) _d1 asm ("d1") = _newval; \
> - \
> - asm ("trap #0" \
> - : "+d" (_d0), "+m" (*_a0) \
> - : "a" (_a0), "d" (_d2), "d" (_d1)); \
> - _d0; \
> - })
> -#endif
> -
> -#ifdef SHARED
> -# define atomic_full_barrier() \
> - ({ \
> - void *tmp; \
> - \
> - asm ("movel #_GLOBAL_OFFSET_TABLE_ at GOTPC, %0\n\t" \
> - "lea (-6, %pc, %0), %0\n\t" \
> - "movel " STR_M68K_VDSO_SYMBOL (__vdso_atomic_barrier) \
> - "@GOT(%0), %0\n\t" \
> - "movel (%0), %0\n\t" \
> - "jsr (%0)\n\t" \
> - : "=&a" (tmp)); \
> - })
> -#else
> -# define atomic_full_barrier() \
> - (INTERNAL_SYSCALL (atomic_barrier, , 0), (void) 0)
> -#endif
> -
> -#endif
> --- sysdeps/unix/sysv/linux/m68k/init-first.c
> +++ sysdeps/unix/sysv/linux/m68k/init-first.c
> -/* Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -/* Note: linking in vDSO to a static binary requires changes to
> - the main GLIBC proper. Not yet implemented. */
> -#ifdef SHARED
> -
> -#include <dl-vdso.h>
> -#include <bits/m68k-vdso.h>
> -
> -static inline void
> -_libc_vdso_platform_setup (void)
> -{
> - void *p;
> -
> - PREPARE_VERSION (linux26, "LINUX_2.6", 61765110);
> -
> - /* It may happen that rtld didn't initialize the vDSO, so fallback
> - to the syscall implementations if _dl_vdso_vsym returns NULL.
> - This may happen when a static executable dlopen's a dynamic library.
> - This really is nothing more than a workaround for rtld/csu
> - deficiency. Ideally, init code would setup the vDSO for static
> - binaries too. */
> -
> - p = _dl_vdso_vsym ("__kernel_read_tp", &linux26);
> - if (p != NULL)
> - {
> - __vdso_read_tp = p;
> - __rtld___vdso_read_tp = p;
> - }
> - else
> - assert (__vdso_read_tp == (void *) __vdso_read_tp_stub);
> -
> - p = _dl_vdso_vsym ("__kernel_atomic_cmpxchg_32", &linux26);
> - if (p != NULL)
> - {
> - __vdso_atomic_cmpxchg_32 = p;
> - __rtld___vdso_atomic_cmpxchg_32 = p;
> - }
> - else
> - assert (__vdso_atomic_cmpxchg_32
> - == (void *) __vdso_atomic_cmpxchg_32_stub);
> -
> - p = _dl_vdso_vsym ("__kernel_atomic_barrier", &linux26);
> - if (p != NULL)
> - {
> - __vdso_atomic_barrier = p;
> - __rtld___vdso_atomic_barrier = p;
> - }
> - else
> - assert (__vdso_atomic_barrier == (void *) __vdso_atomic_barrier_stub);
> -}
> -
> -#define VDSO_SETUP _libc_vdso_platform_setup
> -
> -#endif /* SHARED */
> -
> -#include <sysdeps/unix/sysv/linux/init-first.c>
> --- sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c
> +++ sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c
> -#include "m68k-vdso.c"
> --- sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S
> +++ sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S
> -/* Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - In addition to the permissions in the GNU Lesser General Public
> - License, the Free Software Foundation gives you unlimited
> - permission to link the compiled version of this file with other
> - programs, and to distribute those programs without any restriction
> - coming from the use of this file. (The GNU Lesser General Public
> - License restrictions do apply in other respects; for example, they
> - cover modification of the file, and distribution when not linked
> - into another program.)
> -
> - Note that people who make modified versions of this file are not
> - obligated to grant this special exception for their modified
> - versions; it is their choice whether to do so. The GNU Lesser
> - General Public License gives permission to release a modified
> - version without this exception; this exception also makes it
> - possible to release a modified version which carries forward this
> - exception.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#include <sysdep.h>
> -#include <bits/m68k-vdso.h>
> -
> - .text
> -
> - .hidden __vdso_read_tp_stub
> -ENTRY (__vdso_read_tp_stub)
> - cfi_startproc
> - move.l #__NR_get_thread_area, %d0
> - trap #0
> - move.l %d0, %a0
> - rts
> - cfi_endproc
> -END (__vdso_read_tp_stub)
> -
> -# ifdef SHARED
> -/* GCC will emit calls to this routine. Linux has an
> - equivalent helper function (which clobbers fewer registers than
> - a normal function call) in a vdso; tail call to the
> - helper. */
> -# ifdef IS_IN_rtld
> -/* rtld gets a hidden copy of __m68k_read_tp. */
> - .hidden __m68k_read_tp
> -# endif
> -ENTRY (__m68k_read_tp)
> - cfi_startproc
> - lea _GLOBAL_OFFSET_TABLE_ at GOTPC(%pc), %a0
> - move.l M68K_VDSO_SYMBOL (__vdso_read_tp)@GOT(%a0), %a0
> - jmp ([%a0])
> - cfi_endproc
> -END (__m68k_read_tp)
> -
> -/* The following two stubs are for macros in atomic.h, they can't
> - clobber anything. */
> -
> - .hidden __vdso_atomic_cmpxchg_32_stub
> -ENTRY (__vdso_atomic_cmpxchg_32_stub)
> - cfi_startproc
> - move.l %d2, -(%sp)
> - cfi_adjust_cfa_offset (4)
> - cfi_rel_offset (%d2, 0)
> - move.l %d0, %d2
> - move.l #SYS_ify (atomic_cmpxchg_32), %d0
> - trap #0
> - move.l (%sp)+, %d2
> - cfi_adjust_cfa_offset (-4)
> - cfi_restore (%d2)
> - rts
> - cfi_endproc
> -END (__vdso_atomic_cmpxchg_32_stub)
> -
> - .hidden __vdso_atomic_barrier_stub
> -ENTRY (__vdso_atomic_barrier_stub)
> - cfi_startproc
> - move.l %d0, -(%sp)
> - cfi_adjust_cfa_offset (4)
> - move.l #SYS_ify (atomic_barrier), %d0
> - trap #0
> - move.l (%sp)+, %d0
> - cfi_adjust_cfa_offset (-4)
> - rts
> - cfi_endproc
> -END (__vdso_atomic_barrier_stub)
> -# else /* !SHARED */
> -/* If the vDSO is not available, use a syscall to get TP. */
> - strong_alias (__vdso_read_tp_stub, __m68k_read_tp)
> -# endif /* SHARED */
> --- sysdeps/unix/sysv/linux/m68k/m68k-vdso.c
> +++ sysdeps/unix/sysv/linux/m68k/m68k-vdso.c
> -/* Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#ifdef SHARED
> -
> -#include <bits/m68k-vdso.h>
> -
> -/* Because these pointers are used from other libraries than libc,
> - they are exported at GLIBC_PRIVATE version.
> - We initialize them to syscall implementation so that they will be ready
> - to use from the very beginning. */
> -void * M68K_VDSO_SYMBOL (__vdso_read_tp)
> -= (void *) __vdso_read_tp_stub;
> -void * M68K_VDSO_SYMBOL (__vdso_atomic_cmpxchg_32)
> -= (void *) __vdso_atomic_cmpxchg_32_stub;
> -void * M68K_VDSO_SYMBOL (__vdso_atomic_barrier)
> -= (void *) __vdso_atomic_barrier_stub;
> -
> -#endif /* SHARED */
> --- sysdeps/unix/sysv/linux/m68k/nptl
> +++ sysdeps/unix/sysv/linux/m68k/nptl
> -(directory)
> --- sysdeps/unix/sysv/linux/m68k/nptl/bits
> +++ sysdeps/unix/sysv/linux/m68k/nptl/bits
> -(directory)
> --- sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h
> +++ sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h
> -/* Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#ifndef _BITS_PTHREADTYPES_H
> -#define _BITS_PTHREADTYPES_H 1
> -
> -#include <endian.h>
> -
> -#define __SIZEOF_PTHREAD_ATTR_T 36
> -#define __SIZEOF_PTHREAD_MUTEX_T 24
> -#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
> -#define __SIZEOF_PTHREAD_COND_T 48
> -#define __SIZEOF_PTHREAD_CONDATTR_T 4
> -#define __SIZEOF_PTHREAD_RWLOCK_T 32
> -#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
> -#define __SIZEOF_PTHREAD_BARRIER_T 20
> -#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
> -
> -
> -/* Thread identifiers. The structure of the attribute type is
> - deliberately not exposed. */
> -typedef unsigned long int pthread_t;
> -
> -
> -typedef union
> -{
> - char __size[__SIZEOF_PTHREAD_ATTR_T];
> - long int __align;
> -} pthread_attr_t;
> -
> -
> -typedef struct __pthread_internal_slist
> -{
> - struct __pthread_internal_slist *__next;
> -} __pthread_slist_t;
> -
> -
> -/* Data structures for mutex handling. The structure of the attribute
> - type is deliberately not exposed. */
> -typedef union
> -{
> - struct __pthread_mutex_s
> - {
> - int __lock;
> - unsigned int __count;
> - int __owner;
> - /* KIND must stay at this position in the structure to maintain
> - binary compatibility. */
> - int __kind;
> - unsigned int __nusers;
> - __extension__ union
> - {
> - int __spins;
> - __pthread_slist_t __list;
> - };
> - } __data;
> - char __size[__SIZEOF_PTHREAD_MUTEX_T];
> - long int __align;
> -} pthread_mutex_t;
> -
> -typedef union
> -{
> - char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
> - int __align;
> -} pthread_mutexattr_t;
> -
> -
> -/* Data structure for conditional variable handling. The structure of
> - the attribute type is deliberately not exposed. */
> -typedef union
> -{
> - struct
> - {
> - int __lock;
> - unsigned int __futex;
> - __extension__ unsigned long long int __total_seq;
> - __extension__ unsigned long long int __wakeup_seq;
> - __extension__ unsigned long long int __woken_seq;
> - void *__mutex;
> - unsigned int __nwaiters;
> - unsigned int __broadcast_seq;
> - } __data;
> - char __size[__SIZEOF_PTHREAD_COND_T];
> - __extension__ long long int __align;
> -} pthread_cond_t;
> -
> -typedef union
> -{
> - char __size[__SIZEOF_PTHREAD_CONDATTR_T];
> - int __align;
> -} pthread_condattr_t;
> -
> -
> -/* Keys for thread-specific data */
> -typedef unsigned int pthread_key_t;
> -
> -
> -/* Once-only execution */
> -typedef int pthread_once_t;
> -
> -
> -#if defined __USE_UNIX98 || defined __USE_XOPEN2K
> -/* Data structure for read-write lock variable handling. The
> - structure of the attribute type is deliberately not exposed. */
> -typedef union
> -{
> - struct
> - {
> - int __lock;
> - unsigned int __nr_readers;
> - unsigned int __readers_wakeup;
> - unsigned int __writer_wakeup;
> - unsigned int __nr_readers_queued;
> - unsigned int __nr_writers_queued;
> - unsigned char __pad1;
> - unsigned char __pad2;
> - unsigned char __shared;
> - /* FLAGS must stay at this position in the structure to maintain
> - binary compatibility. */
> - unsigned char __flags;
> - int __writer;
> - } __data;
> - char __size[__SIZEOF_PTHREAD_RWLOCK_T];
> - long int __align;
> -} pthread_rwlock_t;
> -
> -typedef union
> -{
> - char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
> - long int __align;
> -} pthread_rwlockattr_t;
> -#endif
> -
> -
> -#ifdef __USE_XOPEN2K
> -/* POSIX spinlock data type. */
> -typedef volatile int pthread_spinlock_t;
> -
> -
> -/* POSIX barriers data type. The structure of the type is
> - deliberately not exposed. */
> -typedef union
> -{
> - char __size[__SIZEOF_PTHREAD_BARRIER_T];
> - long int __align;
> -} pthread_barrier_t;
> -
> -typedef union
> -{
> - char __size[__SIZEOF_PTHREAD_BARRIERATTR_T];
> - int __align;
> -} pthread_barrierattr_t;
> -#endif
> -
> -
> -#endif /* bits/pthreadtypes.h */
> --- sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h
> +++ sysdeps/unix/sysv/linux/m68k/nptl/bits/semaphore.h
> -/* Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#ifndef _SEMAPHORE_H
> -# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
> -#endif
> -
> -
> -#define __SIZEOF_SEM_T 16
> -
> -
> -/* Value returned if `sem_open' failed. */
> -#define SEM_FAILED ((sem_t *) 0)
> -
> -
> -typedef union
> -{
> - char __size[__SIZEOF_SEM_T];
> - long int __align;
> -} sem_t;
> --- sysdeps/unix/sysv/linux/m68k/nptl/clone.S
> +++ sysdeps/unix/sysv/linux/m68k/nptl/clone.S
> -#define RESET_PID
> -#include "../clone.S"
> --- sysdeps/unix/sysv/linux/m68k/nptl/createthread.c
> +++ sysdeps/unix/sysv/linux/m68k/nptl/createthread.c
> -/* Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -/* Value passed to 'clone' for initialization of the thread register. */
> -#define TLS_VALUE ((void *) (pd) \
> - + TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE)
> -
> -/* Get the real implementation. */
> -#include <nptl/sysdeps/pthread/createthread.c>
> --- sysdeps/unix/sysv/linux/m68k/nptl/fork.c
> +++ sysdeps/unix/sysv/linux/m68k/nptl/fork.c
> -/* Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#include <sched.h>
> -#include <signal.h>
> -#include <sysdep.h>
> -#include <tls.h>
> -
> -#define ARCH_FORK() \
> - INLINE_SYSCALL (clone, 5, \
> - CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, 0, \
> - NULL, &THREAD_SELF->tid, NULL)
> -
> -#include <sysdeps/unix/sysv/linux/fork.c>
> --- sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h
> +++ sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h
> -/* Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -/* Borrowed from ARM's version. */
> -
> -#ifndef _LOWLEVELLOCK_H
> -#define _LOWLEVELLOCK_H 1
> -
> -#include <time.h>
> -#include <sys/param.h>
> -#include <bits/pthreadtypes.h>
> -#include <atomic.h>
> -#include <kernel-features.h>
> -
> -#define FUTEX_WAIT 0
> -#define FUTEX_WAKE 1
> -#define FUTEX_REQUEUE 3
> -#define FUTEX_CMP_REQUEUE 4
> -#define FUTEX_WAKE_OP 5
> -#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1)
> -#define FUTEX_LOCK_PI 6
> -#define FUTEX_UNLOCK_PI 7
> -#define FUTEX_TRYLOCK_PI 8
> -#define FUTEX_WAIT_BITSET 9
> -#define FUTEX_WAKE_BITSET 10
> -#define FUTEX_PRIVATE_FLAG 128
> -#define FUTEX_CLOCK_REALTIME 256
> -
> -#define FUTEX_BITSET_MATCH_ANY 0xffffffff
> -
> -/* Values for 'private' parameter of locking macros. Yes, the
> - definition seems to be backwards. But it is not. The bit will be
> - reversed before passing to the system call. */
> -#define LLL_PRIVATE 0
> -#define LLL_SHARED FUTEX_PRIVATE_FLAG
> -
> -
> -#if !defined NOT_IN_libc || defined IS_IN_rtld
> -/* In libc.so or ld.so all futexes are private. */
> -# ifdef __ASSUME_PRIVATE_FUTEX
> -# define __lll_private_flag(fl, private) \
> - ((fl) | FUTEX_PRIVATE_FLAG)
> -# else
> -# define __lll_private_flag(fl, private) \
> - ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex))
> -# endif
> -#else
> -# ifdef __ASSUME_PRIVATE_FUTEX
> -# define __lll_private_flag(fl, private) \
> - (((fl) | FUTEX_PRIVATE_FLAG) ^ (private))
> -# else
> -# define __lll_private_flag(fl, private) \
> - (__builtin_constant_p (private) \
> - ? ((private) == 0 \
> - ? ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) \
> - : (fl)) \
> - : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \
> - & THREAD_GETMEM (THREAD_SELF, header.private_futex))))
> -# endif
> -#endif
> -
> -
> -#define lll_futex_wait(futexp, val, private) \
> - lll_futex_timed_wait(futexp, val, NULL, private)
> -
> -#define lll_futex_timed_wait(futexp, val, timespec, private) \
> - ({ \
> - INTERNAL_SYSCALL_DECL (__err); \
> - long int __ret; \
> - __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \
> - __lll_private_flag (FUTEX_WAIT, private), \
> - (val), (timespec)); \
> - __ret; \
> - })
> -
> -#define lll_futex_wake(futexp, nr, private) \
> - ({ \
> - INTERNAL_SYSCALL_DECL (__err); \
> - long int __ret; \
> - __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \
> - __lll_private_flag (FUTEX_WAKE, private), \
> - (nr), 0); \
> - __ret; \
> - })
> -
> -#define lll_robust_dead(futexv, private) \
> - do \
> - { \
> - int *__futexp = &(futexv); \
> - atomic_or (__futexp, FUTEX_OWNER_DIED); \
> - lll_futex_wake (__futexp, 1, private); \
> - } \
> - while (0)
> -
> -/* Returns non-zero if error happened, zero if success. */
> -#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val, private) \
> - ({ \
> - INTERNAL_SYSCALL_DECL (__err); \
> - long int __ret; \
> - __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \
> - __lll_private_flag (FUTEX_CMP_REQUEUE, private),\
> - (nr_wake), (nr_move), (mutex), (val)); \
> - INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
> - })
> -
> -/* Returns non-zero if error happened, zero if success. */
> -#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2, private) \
> - ({ \
> - INTERNAL_SYSCALL_DECL (__err); \
> - long int __ret; \
> - __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \
> - __lll_private_flag (FUTEX_WAKE_OP, private), \
> - (nr_wake), (nr_wake2), (futexp2), \
> - FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \
> - INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
> - })
> -
> -#define lll_trylock(lock) \
> - atomic_compare_and_exchange_val_acq (&(lock), 1, 0)
> -
> -#define lll_cond_trylock(lock) \
> - atomic_compare_and_exchange_val_acq (&(lock), 2, 0)
> -
> -#define lll_robust_trylock(lock, id) \
> - atomic_compare_and_exchange_val_acq (&(lock), id, 0)
> -
> -extern void __lll_lock_wait_private (int *futex) attribute_hidden;
> -extern void __lll_lock_wait (int *futex, int private) attribute_hidden;
> -extern int __lll_robust_lock_wait (int *futex, int private) attribute_hidden;
> -
> -#define __lll_lock(futex, private) \
> - ((void) ({ \
> - int *__futex = (futex); \
> - if (__builtin_expect (atomic_compare_and_exchange_val_acq (__futex, \
> - 1, 0), 0)) \
> - { \
> - if (__builtin_constant_p (private) && (private) == LLL_PRIVATE) \
> - __lll_lock_wait_private (__futex); \
> - else \
> - __lll_lock_wait (__futex, private); \
> - } \
> - }))
> -#define lll_lock(futex, private) __lll_lock (&(futex), private)
> -
> -
> -#define __lll_robust_lock(futex, id, private) \
> - ({ \
> - int *__futex = (futex); \
> - int __val = 0; \
> - \
> - if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, id, \
> - 0), 0)) \
> - __val = __lll_robust_lock_wait (__futex, private); \
> - __val; \
> - })
> -#define lll_robust_lock(futex, id, private) \
> - __lll_robust_lock (&(futex), id, private)
> -
> -
> -#define __lll_cond_lock(futex, private) \
> - ((void) ({ \
> - int *__futex = (futex); \
> - if (__builtin_expect (atomic_exchange_acq (__futex, 2), 0)) \
> - __lll_lock_wait (__futex, private); \
> - }))
> -#define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
> -
> -
> -#define lll_robust_cond_lock(futex, id, private) \
> - __lll_robust_lock (&(futex), (id) | FUTEX_WAITERS, private)
> -
> -
> -extern int __lll_timedlock_wait (int *futex, const struct timespec *,
> - int private) attribute_hidden;
> -extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *,
> - int private) attribute_hidden;
> -
> -#define __lll_timedlock(futex, abstime, private) \
> - ({ \
> - int *__futex = (futex); \
> - int __val = 0; \
> - \
> - if (__builtin_expect (atomic_exchange_acq (__futex, 1), 0)) \
> - __val = __lll_timedlock_wait (__futex, abstime, private); \
> - __val; \
> - })
> -#define lll_timedlock(futex, abstime, private) \
> - __lll_timedlock (&(futex), abstime, private)
> -
> -
> -#define __lll_robust_timedlock(futex, abstime, id, private) \
> - ({ \
> - int *__futex = (futex); \
> - int __val = 0; \
> - \
> - if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, id, \
> - 0), 0)) \
> - __val = __lll_robust_timedlock_wait (__futex, abstime, private); \
> - __val; \
> - })
> -#define lll_robust_timedlock(futex, abstime, id, private) \
> - __lll_robust_timedlock (&(futex), abstime, id, private)
> -
> -
> -#define __lll_unlock(futex, private) \
> - (void) \
> - ({ int *__futex = (futex); \
> - int __oldval = atomic_exchange_rel (__futex, 0); \
> - if (__builtin_expect (__oldval > 1, 0)) \
> - lll_futex_wake (__futex, 1, private); \
> - })
> -#define lll_unlock(futex, private) __lll_unlock(&(futex), private)
> -
> -
> -#define __lll_robust_unlock(futex, private) \
> - (void) \
> - ({ int *__futex = (futex); \
> - int __oldval = atomic_exchange_rel (__futex, 0); \
> - if (__builtin_expect (__oldval & FUTEX_WAITERS, 0)) \
> - lll_futex_wake (__futex, 1, private); \
> - })
> -#define lll_robust_unlock(futex, private) \
> - __lll_robust_unlock(&(futex), private)
> -
> -
> -#define lll_islocked(futex) \
> - (futex != 0)
> -
> -
> -/* Our internal lock implementation is identical to the binary-compatible
> - mutex implementation. */
> -
> -/* Initializers for lock. */
> -#define LLL_LOCK_INITIALIZER (0)
> -#define LLL_LOCK_INITIALIZER_LOCKED (1)
> -
> -/* The states of a lock are:
> - 0 - untaken
> - 1 - taken by one user
> - >1 - taken by more users */
> -
> -/* The kernel notifies a process which uses CLONE_CLEARTID via futex
> - wakeup when the clone terminates. The memory location contains the
> - thread ID while the clone is running and is reset to zero
> - afterwards. */
> -#define lll_wait_tid(tid) \
> - do { \
> - __typeof (tid) __tid; \
> - while ((__tid = (tid)) != 0) \
> - lll_futex_wait (&(tid), __tid, LLL_SHARED); \
> - } while (0)
> -
> -extern int __lll_timedwait_tid (int *, const struct timespec *)
> - attribute_hidden;
> -
> -#define lll_timedwait_tid(tid, abstime) \
> - ({ \
> - int __res = 0; \
> - if ((tid) != 0) \
> - __res = __lll_timedwait_tid (&(tid), (abstime)); \
> - __res; \
> - })
> -
> -#endif /* lowlevellock.h */
> --- sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S
> +++ sysdeps/unix/sysv/linux/m68k/nptl/pt-vfork.S
> -/* Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#include <tcb-offsets.h>
> -
> -#define SAVE_PID \
> - bsrl __m68k_read_tp at PLTPC ; /* Get the thread pointer. */ \
> - movel %a0, %a1 ; /* Save TP for RESTORE_PID. */ \
> - movel PID_OFFSET(%a1), %d0 ; /* Get the PID. */ \
> - movel %d0, %d1 ; /* Save PID for RESTORE_PID. */ \
> - negl %d0 ; /* Negate the PID. */ \
> - movel %d0, PID_OFFSET(%a1) ; /* Store the temporary PID. */
> -
> -#define RESTORE_PID \
> - tstl %d0 ; \
> - beq 1f ; /* If we are the parent... */ \
> - movel %d1, PID_OFFSET(%a1) ; /* Restore the PID. */ \
> -1:
> -
> -#include <sysdeps/unix/sysv/linux/m68k/vfork.S>
> --- sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c
> +++ sysdeps/unix/sysv/linux/m68k/nptl/pthread_once.c
> -/* Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#include "pthreadP.h"
> -#include <lowlevellock.h>
> -
> -unsigned long int __fork_generation attribute_hidden;
> -
> -static void
> -clear_once_control (void *arg)
> -{
> - pthread_once_t *once_control = (pthread_once_t *) arg;
> -
> - *once_control = 0;
> - lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE);
> -}
> -
> -int
> -__pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
> -{
> - for (;;)
> - {
> - int oldval;
> - int newval;
> -
> - /* Pseudo code:
> - newval = __fork_generation | 1;
> - oldval = *once_control;
> - if ((oldval & 2) == 0)
> - *once_control = newval;
> - Do this atomically.
> - */
> - do
> - {
> - newval = __fork_generation | 1;
> - oldval = *once_control;
> - if (oldval & 2)
> - break;
> - } while (atomic_compare_and_exchange_val_acq (once_control, newval, oldval) != oldval);
> -
> - /* Check if the initializer has already been done. */
> - if ((oldval & 2) != 0)
> - return 0;
> -
> - /* Check if another thread already runs the initializer. */
> - if ((oldval & 1) == 0)
> - break;
> -
> - /* Check whether the initializer execution was interrupted by a fork. */
> - if (oldval != newval)
> - break;
> -
> - /* Same generation, some other thread was faster. Wait. */
> - lll_futex_wait (once_control, oldval, LLL_PRIVATE);
> - }
> -
> - /* This thread is the first here. Do the initialization.
> - Register a cleanup handler so that in case the thread gets
> - interrupted the initialization can be restarted. */
> - pthread_cleanup_push (clear_once_control, once_control);
> -
> - init_routine ();
> -
> - pthread_cleanup_pop (0);
> -
> - /* Say that the initialisation is done. */
> - *once_control = __fork_generation | 2;
> -
> - /* Wake up all other threads. */
> - lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE);
> -
> - return 0;
> -}
> -weak_alias (__pthread_once, pthread_once)
> -strong_alias (__pthread_once, __pthread_once_internal)
> --- sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h
> +++ sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h
> -/* Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#include <sysdep.h>
> -#include <tls.h>
> -#ifndef __ASSEMBLER__
> -# include <nptl/pthreadP.h>
> -#endif
> -
> -#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
> -
> -# undef PSEUDO
> -# define PSEUDO(name, syscall_name, args) \
> - .text; \
> - ENTRY (name) \
> - SINGLE_THREAD_P; \
> - jne .Lpseudo_cancel; \
> - .type __##syscall_name##_nocancel, at function; \
> - .globl __##syscall_name##_nocancel; \
> - __##syscall_name##_nocancel: \
> - DO_CALL (syscall_name, args); \
> - cmp.l &-4095, %d0; \
> - jcc SYSCALL_ERROR_LABEL; \
> - rts; \
> - .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \
> - .Lpseudo_cancel: \
> - cfi_startproc; \
> - CENABLE; \
> - DOCARGS_##args \
> - move.l %d0, -(%sp); /* Save result of CENABLE. */ \
> - cfi_adjust_cfa_offset (4); \
> - move.l &SYS_ify (syscall_name), %d0; \
> - trap &0; \
> - move.l %d0, %d2; \
> - CDISABLE; \
> - addq.l &4, %sp; /* Remove result of CENABLE from the stack. */ \
> - cfi_adjust_cfa_offset (-4); \
> - move.l %d2, %d0; \
> - UNDOCARGS_##args \
> - cmp.l &-4095, %d0; \
> - jcc SYSCALL_ERROR_LABEL; \
> - cfi_endproc
> -
> -/* Note: we use D2 to save syscall's return value as D0 will be clobbered in
> - CDISABLE. */
> -# define DOCARGS_0 move.l %d2, -(%sp); \
> - cfi_adjust_cfa_offset (4); cfi_rel_offset (%d2, 0);
> -# define UNDOCARGS_0 move.l (%sp)+, %d2; \
> - cfi_adjust_cfa_offset (-4); cfi_restore (%d2);
> -
> -# define DOCARGS_1 _DOCARGS_1 (4); DOCARGS_0
> -# define _DOCARGS_1(n) move.l n(%sp), %d1;
> -# define UNDOCARGS_1 UNDOCARGS_0
> -
> -# define DOCARGS_2 _DOCARGS_2 (8)
> -# define _DOCARGS_2(n) DOCARGS_0 move.l n+4(%sp), %d2; _DOCARGS_1 (n)
> -# define UNDOCARGS_2 UNDOCARGS_0
> -
> -/* TODO: We can optimize DOCARGS_{3, 4} by saving registers to a0 and a1
> - instead of pushing them on stack. */
> -# define DOCARGS_3 _DOCARGS_3 (12)
> -# define _DOCARGS_3(n) move.l %d3, -(%sp); \
> - cfi_adjust_cfa_offset (4); cfi_rel_offset (%d3, 0); \
> - move.l n+4(%sp), %d3; _DOCARGS_2 (n)
> -# define UNDOCARGS_3 UNDOCARGS_2 move.l (%sp)+, %d3; \
> - cfi_adjust_cfa_offset (-4); cfi_restore (%d3);
> -
> -# define DOCARGS_4 _DOCARGS_4 (16)
> -# define _DOCARGS_4(n) move.l %d4, -(%sp); \
> - cfi_adjust_cfa_offset (4); cfi_rel_offset (%d4, 0); \
> - move.l n+4(%sp), %d4; _DOCARGS_3 (n)
> -# define UNDOCARGS_4 UNDOCARGS_3 move.l (%sp)+, %d4; \
> - cfi_adjust_cfa_offset (-4); cfi_restore (%d4);
> -
> -# define DOCARGS_5 _DOCARGS_5 (20)
> -# define _DOCARGS_5(n) move.l %d5, %a1; cfi_register (%d5, a1); \
> - move.l n(%sp), %d5; _DOCARGS_4 (n-4)
> -# define UNDOCARGS_5 UNDOCARGS_4 move.l %a1, %d5; cfi_restore (%d5);
> -
> -# define DOCARGS_6 _DOCARGS_6 (24)
> -# define _DOCARGS_6(n) move.l n(%sp), %a0; _DOCARGS_5 (n-4)
> -# define UNDOCARGS_6 UNDOCARGS_5
> -
> -# ifdef PIC
> -# define PSEUDO_JMP(sym) jbsr sym ## @PLTPC
> -# else
> -# define PSEUDO_JMP(sym) jbsr sym
> -# endif
> -
> -# ifdef IS_IN_libpthread
> -# define CENABLE PSEUDO_JMP (__pthread_enable_asynccancel)
> -# define CDISABLE PSEUDO_JMP (__pthread_disable_asynccancel)
> -# elif !defined NOT_IN_libc
> -# define CENABLE PSEUDO_JMP (__libc_enable_asynccancel)
> -# define CDISABLE PSEUDO_JMP (__libc_disable_asynccancel)
> -# elif defined IS_IN_librt
> -# define CENABLE PSEUDO_JMP (__librt_enable_asynccancel)
> -# define CDISABLE PSEUDO_JMP (__librt_disable_asynccancel)
> -# else
> -# error Unsupported library
> -# endif
> -
> -# ifndef __ASSEMBLER__
> -# define SINGLE_THREAD_P \
> - __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
> - header.multiple_threads) == 0, 1)
> -# else
> -# define SINGLE_THREAD_P \
> - PSEUDO_JMP (__m68k_read_tp); \
> - tst.l MULTIPLE_THREADS_OFFSET(%a0)
> -# endif
> -
> -#elif !defined __ASSEMBLER__
> -
> -# define SINGLE_THREAD_P (1)
> -# define NO_CANCELLATION (1)
> -
> -#endif
> -
> -#ifndef __ASSEMBLER__
> -# define RTLD_SINGLE_THREAD_P \
> - __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
> - header.multiple_threads) == 0, \
> - 1)
> -#endif
> --- sysdeps/unix/sysv/linux/m68k/nptl/vfork.S
> +++ sysdeps/unix/sysv/linux/m68k/nptl/vfork.S
> -/* Copyright (C) 2010 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> - Contributed by Maxim Kuvyrkov <maxim at codesourcery.com>, 2010.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#include <tcb-offsets.h>
> -
> -#define SAVE_PID \
> - bsrl __m68k_read_tp at PLTPC ; /* Get the thread pointer. */ \
> - movel %a0, %a1 ; /* Save TP for RESTORE_PID. */ \
> - movel PID_OFFSET(%a1), %d0 ; /* Get the PID. */ \
> - movel %d0, %d1 ; /* Save PID for RESTORE_PID. */ \
> - negl %d0 ; /* Negate the PID. */ \
> - bne 1f ; /* If it was zero... */ \
> - movel #0x80000000, %d0 ; /* use 0x80000000 instead. */ \
> -1: movel %d0, PID_OFFSET(%a1) ; /* Store the temporary PID. */
> -
> -#define RESTORE_PID \
> - tstl %d0 ; \
> - beq 1f ; /* If we are the parent... */ \
> - movel %d1, PID_OFFSET(%a1) ; /* Restore the PID. */ \
> -1:
> -
> -#include <sysdeps/unix/sysv/linux/m68k/vfork.S>
> --- sysdeps/unix/sysv/linux/m68k/register-dump.h
> +++ sysdeps/unix/sysv/linux/m68k/register-dump.h
> @@ -40,6 +40,7 @@
>
> */
>
> +#ifndef __mcoldfire__
> /* Linux saves only the call-clobbered registers in the sigcontext. We
> need to use a trampoline that saves the rest so that the C code can
> access them. We use the sc_fpstate field, since the handler is not
> @@ -58,17 +59,14 @@
> /* Clear the first 4 bytes to make it a null fp state, just\n\
> in case the handler does return. */\n\
> clr.l (%%a0)+\n\
> - movem.l %%d2-%%d7/%%a2-%%a6,(%%a0)\n"
> -#ifndef __mcoldfire__
> - "fmovem.x %%fp2-%%fp7,11*4(%%a0)\n"
> -#elif defined __mcffpu__
> - "fmovem.d %%fp2-%%fp7,11*4(%%a0)\n"
> -#endif
> - "jra real_catch_segfault"
> + movem.l %%d2-%%d7/%%a2-%%a6,(%%a0)\n\
> + fmovem.x %%fp2-%%fp7,11*4(%%a0)\n\
> + jra real_catch_segfault"
> : : "n" (offsetof (struct sigcontext, sc_fpstate)));
> }
> #define catch_segfault(a,b) \
> __attribute_used__ real_catch_segfault(a,b)
> +#endif
>
> static void
> hexvalue (unsigned long int value, char *buf, size_t len)
> @@ -106,19 +104,36 @@
> /* Generate strings of register contents. */
> hexvalue (ctx->sc_d0, regs[0], 8);
> hexvalue (ctx->sc_d1, regs[1], 8);
> +#ifdef __mcoldfire__
> + hexvalue (ctx->sc_d2, regs[2], 8);
> + hexvalue (ctx->sc_d3, regs[3], 8);
> + hexvalue (ctx->sc_d4, regs[4], 8);
> + hexvalue (ctx->sc_d5, regs[5], 8);
> + hexvalue (ctx->sc_d6, regs[6], 8);
> + hexvalue (ctx->sc_d7, regs[7], 8);
> +#else
> hexvalue (*p++, regs[2], 8);
> hexvalue (*p++, regs[3], 8);
> hexvalue (*p++, regs[4], 8);
> hexvalue (*p++, regs[5], 8);
> hexvalue (*p++, regs[6], 8);
> hexvalue (*p++, regs[7], 8);
> +#endif
> hexvalue (ctx->sc_a0, regs[8], 8);
> hexvalue (ctx->sc_a1, regs[9], 8);
> +#ifdef __mcoldfire__
> + hexvalue (ctx->sc_a2, regs[10], 8);
> + hexvalue (ctx->sc_a3, regs[11], 8);
> + hexvalue (ctx->sc_a4, regs[12], 8);
> + hexvalue (ctx->sc_a5, regs[13], 8);
> + hexvalue (ctx->sc_a6, regs[14], 8);
> +#else
> hexvalue (*p++, regs[10], 8);
> hexvalue (*p++, regs[11], 8);
> hexvalue (*p++, regs[12], 8);
> hexvalue (*p++, regs[13], 8);
> hexvalue (*p++, regs[14], 8);
> +#endif
> hexvalue (ctx->sc_usp, regs[15], 8);
> hexvalue (ctx->sc_pc, regs[16], 8);
> hexvalue (ctx->sc_sr, regs[17], 4);
> @@ -127,6 +142,9 @@
> for (i = 0; i < 2; i++)
> for (j = 0; j < fpreg_size; j += 8)
> hexvalue (*pfp++, fpregs[i] + j, 8);
> +#ifdef __mcoldfire__
> + p = pfp;
> +#endif
> for (i = 2; i < 8; i++)
> for (j = 0; j < fpreg_size; j += 8)
> hexvalue (*p++, fpregs[i] + j, 8);
> --- sysdeps/unix/sysv/linux/m68k/socket.S
> +++ sysdeps/unix/sysv/linux/m68k/socket.S
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 1996, 1997, 1998, 2010 Free Software Foundation, Inc.
> +/* Copyright (C) 1996, 1997, 1998 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
> @@ -41,11 +41,8 @@
>
> .globl __socket
> ENTRY (__socket)
> -#ifdef NEED_CANCELLATION
> -# if !defined CENABLE || !defined CDISABLE
> -# error CENABLE and/or CDISABLE is not defined
> -# endif
> - SINGLE_THREAD_P
> +#if defined NEED_CANCELLATION && defined CENABLE
> + SINGLE_THREAD_P (%a0)
> jne 1f
> #endif
>
> @@ -72,26 +69,21 @@
> /* Successful; return the syscall's value. */
> rts
>
> -#ifdef NEED_CANCELLATION
> -1: cfi_startproc
> - /* Enable asynchronous cancellation. */
> +#if defined NEED_CANCELLATION && defined CENABLE
> +1: /* Enable asynchronous cancellation. */
> CENABLE
>
> - /* Save D2. */
> + /* Save registers. */
> move.l %d2, -(%sp)
> - cfi_adjust_cfa_offset (4)
> - cfi_rel_offset (%d2, 0)
> -
> - /* Save the result of CENABLE. */
> move.l %d0, -(%sp)
> - cfi_adjust_cfa_offset (4)
> +
> + move.l #SYS_ify (socketcall), %d0 /* System call number in %d0. */
>
> /* Use ## so `socket' is a separate token that might be #define'd. */
> move.l #P (SOCKOP_,socket), %d1 /* Subcode is first arg to syscall. */
> lea 4+8(%sp), %a1 /* Address of args is 2nd arg. */
> move.l %a1, %d2
>
> - move.l #SYS_ify (socketcall), %d0 /* System call number in %d0. */
> /* Do the system call trap. */
> trap #0
>
> @@ -99,18 +91,14 @@
> move.l %d0, %d2
> CDISABLE
> addq.l #4, %sp
> - cfi_adjust_cfa_offset (-4)
> move.l %d2, %d0
>
> /* Restore registers. */
> move.l (%sp)+, %d2
> - cfi_adjust_cfa_offset (-4)
> - cfi_restore (%d2)
>
> /* %d0 is < 0 if there was an error. */
> tst.l %d0
> jmi SYSCALL_ERROR_LABEL
> - cfi_endproc
>
> /* Successful; return the syscall's value. */
> rts
> --- sysdeps/unix/sysv/linux/m68k/sysdep.h
> +++ sysdeps/unix/sysv/linux/m68k/sysdep.h
> @@ -1,5 +1,4 @@
> -/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2004, 2006, 2010
> - Free Software Foundation, Inc.
> +/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2004, 2006 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
> Written by Andreas Schwab, <schwab at issan.informatik.uni-dortmund.de>,
> December 1995.
> @@ -24,7 +23,6 @@
>
> #include <sysdeps/unix/sysdep.h>
> #include <sysdeps/m68k/sysdep.h>
> -#include <tls.h>
>
> /* Defines RTLD_PRIVATE_ERRNO. */
> #include <dl-sysdep.h>
> @@ -111,27 +109,10 @@
> a pointer (e.g., mmap). */ \
> move.l %d0, %a0; \
> rts;
> -# elif USE___THREAD
> -# ifndef NOT_IN_libc
> -# define SYSCALL_ERROR_ERRNO __libc_errno
> -# else
> -# define SYSCALL_ERROR_ERRNO errno
> -# endif
> -# define SYSCALL_ERROR_HANDLER \
> -SYSCALL_ERROR_LABEL: \
> - neg.l %d0; \
> - move.l %d0, -(%sp); \
> - jbsr __m68k_read_tp at PLTPC; \
> - lea (_GLOBAL_OFFSET_TABLE_ at GOTPC, %pc), %a1; \
> - add.l (SYSCALL_ERROR_ERRNO at TLSIE, %a1), %a0; \
> - move.l (%sp)+, (%a0); \
> - move.l &-1, %d0; \
> - /* Copy return value to %a0 for syscalls that are declared to return \
> - a pointer (e.g., mmap). */ \
> - move.l %d0, %a0; \
> - rts;
> -# elif defined _LIBC_REENTRANT
> -# define SYSCALL_ERROR_HANDLER \
> +# else /* !RTLD_PRIVATE_ERRNO */
> +/* Store (- %d0) into errno through the GOT. */
> +# if defined _LIBC_REENTRANT
> +# define SYSCALL_ERROR_HANDLER \
> SYSCALL_ERROR_LABEL: \
> neg.l %d0; \
> move.l %d0, -(%sp); \
> @@ -142,9 +123,8 @@
> a pointer (e.g., mmap). */ \
> move.l %d0, %a0; \
> rts;
> -# else /* !_LIBC_REENTRANT */
> -/* Store (- %d0) into errno through the GOT. */
> -# define SYSCALL_ERROR_HANDLER \
> +# else /* !_LIBC_REENTRANT */
> +# define SYSCALL_ERROR_HANDLER \
> SYSCALL_ERROR_LABEL: \
> move.l (errno at GOTPC, %pc), %a0; \
> neg.l %d0; \
> @@ -154,7 +134,8 @@
> a pointer (e.g., mmap). */ \
> move.l %d0, %a0; \
> rts;
> -# endif /* _LIBC_REENTRANT */
> +# endif /* _LIBC_REENTRANT */
> +# endif /* RTLD_PRIVATE_ERRNO */
> #else
> # define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
> #endif /* PIC */
> @@ -167,11 +148,9 @@
> arg 3 %d3 call-saved
> arg 4 %d4 call-saved
> arg 5 %d5 call-saved
> - arg 6 %a0 call-clobbered
>
> The stack layout upon entering the function is:
>
> - 24(%sp) Arg# 6
> 20(%sp) Arg# 5
> 16(%sp) Arg# 4
> 12(%sp) Arg# 3
> @@ -250,7 +229,7 @@
> normally. It will never touch errno. This returns just what the kernel
> gave back. */
> #undef INTERNAL_SYSCALL
> -#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
> +#define INTERNAL_SYSCALL(name, err, nr, args...) \
> ({ unsigned int _sys_result; \
> { \
> /* Load argument values in temporary variables
> @@ -258,7 +237,7 @@
> before the call used registers are set. */ \
> LOAD_ARGS_##nr (args) \
> LOAD_REGS_##nr \
> - register int _d0 asm ("%d0") = name; \
> + register int _d0 asm ("%d0") = __NR_##name; \
> asm volatile ("trap #0" \
> : "=d" (_d0) \
> : "0" (_d0) ASM_ARGS_##nr \
> @@ -266,8 +245,6 @@
> _sys_result = _d0; \
> } \
> (int) _sys_result; })
> -#define INTERNAL_SYSCALL(name, err, nr, args...) \
> - INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
>
> #undef INTERNAL_SYSCALL_ERROR_P
> #define INTERNAL_SYSCALL_ERROR_P(val, err) \
> @@ -323,15 +300,4 @@
> #define ASM_ARGS_6 ASM_ARGS_5, "a" (_a0)
>
> #endif /* not __ASSEMBLER__ */
> -
> -/* Pointer mangling is not yet supported for M68K. */
> -#define PTR_MANGLE(var) (void) (var)
> -#define PTR_DEMANGLE(var) (void) (var)
> -
> -#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
> -/* M68K needs system-supplied DSO to access TLS helpers
> - even when statically linked. */
> -# define NEED_STATIC_SYSINFO_DSO 1
> -#endif
> -
> #endif
> --- sysdeps/unix/sysv/linux/m68k/vfork.S
> +++ sysdeps/unix/sysv/linux/m68k/vfork.S
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 1999, 2002, 2003, 2010 Free Software Foundation, Inc.
> +/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
> Contributed by Andreas Schwab <schwab at gnu.org>.
>
> @@ -22,14 +22,6 @@
> #include <bits/errno.h>
> #include <kernel-features.h>
>
> -#ifndef SAVE_PID
> -#define SAVE_PID
> -#endif
> -
> -#ifndef RESTORE_PID
> -#define RESTORE_PID
> -#endif
> -
> /* Clone the calling process, but without copying the whole address space.
> The calling process is suspended until the new process exits or is
> replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
> @@ -39,20 +31,12 @@
>
> #ifdef __NR_vfork
>
> - /* SAVE_PID clobbers call-clobbered registers and
> - saves data in D1 and A1. */
> -
> - SAVE_PID
> -
> /* Pop the return PC value into A0. */
> movel %sp at +, %a0
>
> /* Stuff the syscall number in D0 and trap into the kernel. */
> movel #SYS_ify (vfork), %d0
> trap #0
> -
> - RESTORE_PID
> -
> tstl %d0
> jmi .Lerror /* Branch forward if it failed. */
>
> --- sysdeps/unix/sysv/linux/mips/bits/errno.h
> +++ sysdeps/unix/sysv/linux/mips/bits/errno.h
> @@ -38,10 +38,6 @@
> # define ENOTRECOVERABLE 166
> # endif
>
> -# ifndef ERFKILL
> -# define ERFKILL 167
> -# endif
> -
> # ifndef __ASSEMBLER__
> /* Function to get address of global `errno' variable. */
> extern int *__errno_location (void) __THROW __attribute__ ((__const__));
> --- sysdeps/unix/sysv/linux/mips/bits/fcntl.h
> +++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h
> @@ -1,6 +1,6 @@
> /* O_*, F_*, FD_* bit values for Linux.
> Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2006,
> - 2007, 2009, 2010 Free Software Foundation, Inc.
> + 2007, 2009 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> The GNU C Library is free software; you can redistribute it and/or
> @@ -36,7 +36,7 @@
> #define O_WRONLY 01
> #define O_RDWR 02
> #define O_APPEND 0x0008
> -#define O_SYNC 0x4010
> +#define O_SYNC 0x0010
> #define O_NONBLOCK 0x0080
> #define O_NDELAY O_NONBLOCK
> #define O_CREAT 0x0100 /* not fcntl */
> @@ -46,21 +46,19 @@
> #define O_FSYNC O_SYNC
> #define O_ASYNC 0x1000
>
> -#ifdef __USE_XOPEN2K8
> -# define O_NOFOLLOW 0x20000 /* Do not follow links. */
> -# define O_DIRECTORY 0x10000 /* Must be a directory. */
> -# define O_CLOEXEC 02000000 /* Set close_on_exec. */
> -#endif
> #ifdef __USE_GNU
> +# define O_NOFOLLOW 0x20000 /* Do not follow links. */
> # define O_DIRECT 0x8000 /* Direct disk access hint. */
> +# define O_DIRECTORY 0x10000 /* Must be a directory. */
> # define O_NOATIME 0x40000 /* Do not set atime. */
> +# define O_CLOEXEC 02000000 /* Set close_on_exec. */
> #endif
>
> /* For now Linux has no synchronisity options for data and read operations.
> We define the symbols here but let them do the same as O_SYNC since
> this is a superset. */
> #if defined __USE_POSIX199309 || defined __USE_UNIX98
> -# define O_DSYNC 0x0010 /* Synchronize data. */
> +# define O_DSYNC O_SYNC /* Synchronize data. */
> # define O_RSYNC O_SYNC /* Synchronize read operations. */
> #endif
>
> @@ -88,7 +86,7 @@
> #define F_SETLK64 34 /* Set record locking info (non-blocking). */
> #define F_SETLKW64 35 /* Set record locking info (blocking). */
>
> -#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
> +#if defined __USE_BSD || defined __USE_UNIX98
> # define F_SETOWN 24 /* Get owner (process receiving SIGIO). */
> # define F_GETOWN 23 /* Set owner (process receiving SIGIO). */
> #endif
> @@ -104,8 +102,6 @@
> # define F_SETLEASE 1024 /* Set a lease. */
> # define F_GETLEASE 1025 /* Enquire what lease is active. */
> # define F_NOTIFY 1026 /* Request notfications on a directory. */
> -#endif
> -#ifdef __USE_XOPEN2K8
> # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
> close-on-exit set. */
> #endif
> @@ -189,10 +185,9 @@
> /* Owner types. */
> enum __pid_type
> {
> - F_OWNER_TID = 0, /* Kernel thread. */
> - F_OWNER_PID, /* Process. */
> - F_OWNER_PGRP, /* Process group. */
> - F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
> + F_OWNER_TID = 0, /* Kernel thread. */
> + F_OWNER_PID, /* Process. */
> + F_OWNER_GID /* Process group. */
> };
>
> /* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
> @@ -255,7 +250,7 @@
>
>
> /* Selective file content synch'ing. */
> -extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
> +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
> unsigned int __flags);
>
>
> --- sysdeps/unix/sysv/linux/mips/bits/mman.h
> +++ sysdeps/unix/sysv/linux/mips/bits/mman.h
> @@ -1,5 +1,5 @@
> /* Definitions for POSIX memory map interface. Linux/MIPS version.
> - Copyright (C) 1997, 2000, 2003, 2004, 2005, 2006, 2009
> + Copyright (C) 1997, 2000, 2003, 2004, 2005, 2006
> Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> @@ -86,17 +86,14 @@
>
> /* Advice to `madvise'. */
> #ifdef __USE_BSD
> -# define MADV_NORMAL 0 /* No further special treatment. */
> -# define MADV_RANDOM 1 /* Expect random page references. */
> -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
> -# define MADV_WILLNEED 3 /* Will need these pages. */
> -# define MADV_DONTNEED 4 /* Don't need these pages. */
> -# define MADV_REMOVE 9 /* Remove these pages and resources. */
> -# define MADV_DONTFORK 10 /* Do not inherit across fork. */
> -# define MADV_DOFORK 11 /* Do inherit across fork. */
> -# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
> -# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
> -# define MADV_HWPOISON 100 /* Poison a page for testing. */
> +# define MADV_NORMAL 0 /* No further special treatment. */
> +# define MADV_RANDOM 1 /* Expect random page references. */
> +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
> +# define MADV_WILLNEED 3 /* Will need these pages. */
> +# define MADV_DONTNEED 4 /* Don't need these pages. */
> +# define MADV_REMOVE 9 /* Remove these pages and resources. */
> +# define MADV_DONTFORK 10 /* Do not inherit across fork. */
> +# define MADV_DOFORK 11 /* Do inherit across fork. */
> #endif
>
> /* The POSIX people had to invent similar names for the same things. */
> --- sysdeps/unix/sysv/linux/mips/bits/poll.h
> +++ sysdeps/unix/sysv/linux/mips/bits/poll.h
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 1997, 2001, 2006, 2009 Free Software Foundation, Inc.
> +/* Copyright (C) 1997, 2001, 2006 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
> @@ -27,7 +27,7 @@
> #define POLLPRI 0x002 /* There is urgent data to read. */
> #define POLLOUT 0x004 /* Writing now will not block. */
>
> -#if defined __USE_XOPEN || defined __USE_XOPEN2K8
> +#ifdef __USE_XOPEN
> /* These values are defined in XPG4.2. */
> # define POLLRDNORM 0x040 /* Normal data may be read. */
> # define POLLRDBAND 0x080 /* Priority data may be read. */
> --- sysdeps/unix/sysv/linux/mips/bits/sigaction.h
> +++ sysdeps/unix/sysv/linux/mips/bits/sigaction.h
> @@ -1,5 +1,5 @@
> /* The proper definitions for Linux/MIPS's sigaction.
> - Copyright (C) 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2003, 2010
> + Copyright (C) 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2003
> Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> @@ -64,8 +64,6 @@
> three arguments instead of one. */
> #if defined __USE_UNIX98 || defined __USE_MISC
> # define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
> -#endif
> -#if defined __USE_UNIX98 || defined __USE_MISC || defined __USE_XOPEN2K8
> # define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */
> # define SA_RESTART 0x10000000 /* Restart syscall on signal return. */
> # define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
> --- sysdeps/unix/sysv/linux/mips/bits/socket.h
> +++ sysdeps/unix/sysv/linux/mips/bits/socket.h
> @@ -1,6 +1,6 @@
> /* System-specific socket constants and types. Linux/MIPS version.
> Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006, 2007, 2008,
> - 2009, 2010 Free Software Foundation, Inc.
> + 2009 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> The GNU C Library is free software; you can redistribute it and/or
> @@ -232,12 +232,10 @@
> #define MSG_NOSIGNAL MSG_NOSIGNAL
> MSG_MORE = 0x8000, /* Sender will send more. */
> #define MSG_MORE MSG_MORE
> - MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/
> -#define MSG_WAITFORONE MSG_WAITFORONE
>
> MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file
> - descriptor received through
> - SCM_RIGHTS. */
> + descriptor received through
> + SCM_RIGHTS. */
> #define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC
> };
>
> @@ -258,15 +256,6 @@
> int msg_flags; /* Flags on received message. */
> };
>
> -#ifdef __USE_GNU
> -/* For `recvmmsg'. */
> -struct mmsghdr
> - {
> - struct msghdr msg_hdr; /* Actual message header. */
> - unsigned int msg_len; /* Number of received bytes for the entry. */
> - };
> -#endif
> -
> /* Structure used for storage of ancillary data object information. */
> struct cmsghdr
> {
> @@ -408,18 +397,4 @@
> int l_linger; /* Time to linger. */
> };
>
> -
> -__BEGIN_DECLS
> -
> -/* Receive a message as described by MESSAGE from socket FD.
> - Returns the number of bytes read or -1 for errors.
> -
> - This function is a cancellation point and therefore not marked with
> - __THROW. */
> -extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
> - unsigned int __vlen, int __flags,
> - __const struct timespec *__tmo);
> -
> -__END_DECLS
> -
> #endif /* bits/socket.h */
> --- sysdeps/unix/sysv/linux/mips/bits/stat.h
> +++ sysdeps/unix/sysv/linux/mips/bits/stat.h
> @@ -1,5 +1,5 @@
> /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004,
> - 2007, 2009, 2010 Free Software Foundation, Inc.
> + 2007, 2009 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> The GNU C Library is free software; you can redistribute it and/or
> @@ -17,13 +17,10 @@
> Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA. */
>
> -#if !defined _SYS_STAT_H && !defined _FCNTL_H
> +#ifndef _SYS_STAT_H
> # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
> #endif
>
> -#ifndef _BITS_STAT_H
> -#define _BITS_STAT_H 1
> -
> #include <sgidefs.h>
>
> /* Versions of the `struct stat' data structure. */
> @@ -64,7 +61,7 @@
> long int st_pad2[3];
> __off64_t st_size; /* Size of file, in bytes. */
> #endif
> -#if defined __USE_MISC || defined __USE_XOPEN2K8
> +#ifdef __USE_MISC
> /* Nanosecond resolution timestamps are stored in a format
> equivalent to 'struct timespec'. This is the type used
> whenever possible but the Unix namespace rules do not allow the
> @@ -108,7 +105,7 @@
> unsigned long int st_rdev; /* Device number, if device. */
> long int st_pad2[3];
> __off64_t st_size; /* Size of file, in bytes. */
> -# if defined __USE_MISC || defined __USE_XOPEN2K8
> +#ifdef __USE_MISC
> /* Nanosecond resolution timestamps are stored in a format
> equivalent to 'struct timespec'. This is the type used
> whenever possible but the Unix namespace rules do not allow the
> @@ -118,14 +115,14 @@
> struct timespec st_atim; /* Time of last access. */
> struct timespec st_mtim; /* Time of last modification. */
> struct timespec st_ctim; /* Time of last status change. */
> -# else
> +#else
> __time_t st_atime; /* Time of last access. */
> long int __reserved0;
> __time_t st_mtime; /* Time of last modification. */
> long int __reserved1;
> __time_t st_ctime; /* Time of last status change. */
> long int __reserved2;
> -# endif
> +#endif
> __blksize_t st_blksize; /* Optimal block size for I/O. */
> long int st_pad3;
> __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
> @@ -155,7 +152,7 @@
> unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
> __off64_t st_size;
> #endif
> -#if defined __USE_MISC || defined __USE_XOPEN2K8
> +#ifdef __USE_MISC
> /* Nanosecond resolution timestamps are stored in a format
> equivalent to 'struct timespec'. This is the type used
> whenever possible but the Unix namespace rules do not allow the
> @@ -199,7 +196,7 @@
> __dev_t st_rdev;
> unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
> __off64_t st_size;
> -# if defined __USE_MISC || defined __USE_XOPEN2K8
> +#ifdef __USE_MISC
> /* Nanosecond resolution timestamps are stored in a format
> equivalent to 'struct timespec'. This is the type used
> whenever possible but the Unix namespace rules do not allow the
> @@ -209,14 +206,14 @@
> struct timespec st_atim; /* Time of last access. */
> struct timespec st_mtim; /* Time of last modification. */
> struct timespec st_ctim; /* Time of last status change. */
> -# else
> +#else
> __time_t st_atime;
> int __reserved0;
> __time_t st_mtime;
> int __reserved1;
> __time_t st_ctime;
> int __reserved2;
> -# endif
> +#endif
> __blksize_t st_blksize;
> unsigned int st_pad3;
> __blkcnt64_t st_blocks;
> @@ -261,5 +258,3 @@
> # define UTIME_NOW ((1l << 30) - 1l)
> # define UTIME_OMIT ((1l << 30) - 2l)
> #endif
> -
> -#endif /* bits/stat.h */
> --- sysdeps/unix/sysv/linux/mips/ldsodefs.h
> +++ sysdeps/unix/sysv/linux/mips/ldsodefs.h
> @@ -30,12 +30,4 @@
> #undef DL_STATIC_INIT
> #define DL_STATIC_INIT(map) _dl_static_init (map)
>
> -/* Allow ABIVERSION == 1, meaning PLTs and copy relocations are
> - required, with ELFOSABI_SYSV. */
> -#undef VALID_ELF_ABIVERSION
> -#define VALID_ELF_ABIVERSION(osabi,ver) \
> - (ver == 0 \
> - || (osabi == ELFOSABI_SYSV && ver < 2) \
> - || (osabi == ELFOSABI_LINUX && ver < LIBC_ABI_MAX))
> -
> #endif /* ldsodefs.h */
> --- sysdeps/unix/sysv/linux/mips/libc-abis
> +++ sysdeps/unix/sysv/linux/mips/libc-abis
> -# See the copy of this file in libc for detailed explanations. This
> -# copy needs to include all libc definitions applicable to MIPS; only
> -# one copy will be used.
> -#
> -# Feature Name Configuration
> -# ------------ -------------
> -#
> -# MIPS PLTs.
> -MIPS_PLT mips*-*-linux*
> -#
> -# Unique symbol definitions for C++.
> -# Architecture independent, all ELF targets (== all targets)
> -UNIQUE
> --- sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c
> +++ sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise.c
> -/* Copyright (C) 2003, 2004, 2009 Free Software Foundation, Inc.
> - This file is part of the GNU C Library.
> -
> - The GNU C Library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - The GNU C Library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with the GNU C Library; if not, write to the Free
> - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> - 02111-1307 USA. */
> -
> -#include <errno.h>
> -#include <fcntl.h>
> -#include <sysdep.h>
> -
> -/* Advice the system about the expected behaviour of the application with
> - respect to the file associated with FD. */
> -
> -int
> -posix_fadvise (int fd, off_t offset, off_t len, int advise)
> -{
> -#ifdef __NR_fadvise64
> - INTERNAL_SYSCALL_DECL (err);
> - int ret = INTERNAL_SYSCALL (fadvise64, err, 4, fd, offset, len, advise);
> - if (INTERNAL_SYSCALL_ERROR_P (ret, err))
> - return INTERNAL_SYSCALL_ERRNO (ret, err);
> - return 0;
> -#else
> - return ENOSYS;
> -#endif
> -}
> --- sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
> +++ sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
> @@ -2,5 +2,6 @@
>
> readahead - readahead i:iii __readahead readahead
> sync_file_range - sync_file_range i:iiii sync_file_range
> +posix_fadvise - fadvise64 i:iiii posix_fadvise
> ftruncate - ftruncate i:ii __ftruncate ftruncate ftruncate64 __ftruncate64
> truncate - truncate i:si truncate truncate64
> --- sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c
> +++ sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c
> -#include <sysdeps/unix/sysv/linux/wordsize-64/posix_fadvise.c>
> --- sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c
> +++ sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c
> -/* posix_fadvise64 is in posix_fadvise.c */
>
> ++++++ nis_shadow.diff (new)
> --- nis_shadow.diff
> +++ nis_shadow.diff
> +diff -Naurp glibc-2.7.original/nis/nss_nis/nis-pwd.c glibc-2.7/nis/nss_nis/nis-pwd.c
> +--- glibc-2.7.original/nis/nss_nis/nis-pwd.c 2006-05-02 00:31:15.000000000 +0200
> ++++ glibc-2.7/nis/nss_nis/nis-pwd.c 2009-12-22 09:04:46.000000000 +0100
> +@@ -275,8 +275,8 @@ internal_nis_getpwent_r (struct passwd *
> + yp_match (domain, "passwd.adjunct.byname", result, namelen,
> + &result2, &len2)) == YPERR_SUCCESS)
> + {
> +- /* We found a passwd.adjunct entry. Merge encrypted
> +- password therein into original result. */
> ++ /* We found a passwd.adjunct entry. Merge "x"
> ++ into original result. */
> + char *encrypted = strchr (result2, ':');
> + char *endp;
> + size_t restlen;
> +@@ -304,7 +304,7 @@ internal_nis_getpwent_r (struct passwd *
> +
> + mempcpy (mempcpy (mempcpy (mempcpy (buffer, result, namelen),
> + ":", 1),
> +- encrypted, endp - encrypted),
> ++ "x", 1),
> + p, restlen + 1);
> + p = buffer;
> +
> +@@ -408,8 +408,8 @@ _nss_nis_getpwnam_r (const char *name, s
> + && yp_match (domain, "passwd.adjunct.byname", name, namelen,
> + &result2, &len2) == YPERR_SUCCESS)
> + {
> +- /* We found a passwd.adjunct entry. Merge encrypted password
> +- therein into original result. */
> ++ /* We found a passwd.adjunct entry. Merge "x"
> ++ into original result. */
> + char *encrypted = strchr (result2, ':');
> + char *endp;
> +
> +@@ -436,7 +436,7 @@ _nss_nis_getpwnam_r (const char *name, s
> +
> + __mempcpy (__mempcpy (__mempcpy (__mempcpy (buffer, name, namelen),
> + ":", 1),
> +- encrypted, endp - encrypted),
> ++ "x", 1),
> + p, restlen + 1);
> + p = buffer;
> +
> +@@ -509,8 +509,8 @@ _nss_nis_getpwuid_r (uid_t uid, struct p
> + yp_match (domain, "passwd.adjunct.byname", result, namelen,
> + &result2, &len2)) == YPERR_SUCCESS)
> + {
> +- /* We found a passwd.adjunct entry. Merge encrypted password
> +- therein into original result. */
> ++ /* We found a passwd.adjunct entry. Merge "x"
> ++ into original result. */
> + char *encrypted = strchr (result2, ':');
> + char *endp;
> + size_t restlen;
> +@@ -538,7 +538,7 @@ _nss_nis_getpwuid_r (uid_t uid, struct p
> +
> + __mempcpy (__mempcpy (__mempcpy (__mempcpy (buffer, result, namelen),
> + ":", 1),
> +- encrypted, endp - encrypted),
> ++ "x", 1),
> + p, restlen + 1);
> + p = buffer;
> +
> +diff -Naurp glibc-2.7.original/nis/nss_nis/nis-spwd.c glibc-2.7/nis/nss_nis/nis-spwd.c
> +--- glibc-2.7.original/nis/nss_nis/nis-spwd.c 2006-04-29 03:09:49.000000000 +0200
> ++++ glibc-2.7/nis/nss_nis/nis-spwd.c 2009-12-22 10:02:25.000000000 +0100
> +@@ -78,17 +78,42 @@ internal_nis_getspent_r (struct spwd *sp
> + {
> + char *result;
> + char *outkey;
> ++ char *p;
> + int len;
> + int keylen;
> + int yperr;
> ++ int adjunct_used = 0;
> +
> +- if (new_start)
> ++ if (new_start) {
> + yperr = yp_first (domain, "shadow.byname", &outkey, &keylen, &result,
> + &len);
> +- else
> ++
> ++ if (yperr == YPERR_MAP) {
> ++ if (result != NULL)
> ++ free (result);
> ++
> ++ yperr = yp_first (domain, "passwd.adjunct.byname", &outkey, &keylen, &result,
> ++ &len);
> ++
> ++ adjunct_used = 1;
> ++ }
> ++ }
> ++
> ++ else {
> + yperr = yp_next (domain, "shadow.byname", oldkey, oldkeylen, &outkey,
> + &keylen, &result, &len);
> +
> ++ if (yperr == YPERR_MAP) {
> ++ if (result != NULL)
> ++ free (result);
> ++
> ++ yperr = yp_next (domain, "passwd.adjunct.byname", oldkey, oldkeylen, &outkey,
> ++ &keylen, &result, &len);
> ++
> ++ adjunct_used = 1;
> ++ }
> ++ }
> ++
> + if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
> + {
> + enum nss_status retval = yperr2nss (yperr);
> +@@ -98,15 +123,32 @@ internal_nis_getspent_r (struct spwd *sp
> + return retval;
> + }
> +
> +- if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
> +- {
> +- free (result);
> +- *errnop = ERANGE;
> +- return NSS_STATUS_TRYAGAIN;
> +- }
> ++ if (! adjunct_used)
> ++ {
> ++ if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
> ++ {
> ++ free (result);
> ++ *errnop = ERANGE;
> ++ return NSS_STATUS_TRYAGAIN;
> ++ }
> ++
> ++ p = strncpy (buffer, result, len);
> ++ buffer[len] = '\0';
> ++ }
> ++ else
> ++ {
> ++ if (__builtin_expect ((size_t) (len + 3) > buflen, 0))
> ++ {
> ++ free (result);
> ++ *errnop = ERANGE;
> ++ return NSS_STATUS_TRYAGAIN;
> ++ }
> ++
> ++ p = strncpy (buffer, result, len);
> ++ buffer[len] = '\0';
> ++ p = strcat (buffer, "::");
> ++ }
> +
> +- char *p = strncpy (buffer, result, len);
> +- buffer[len] = '\0';
> + while (isspace (*p))
> + ++p;
> + free (result);
> +@@ -149,6 +191,9 @@ enum nss_status
> + _nss_nis_getspnam_r (const char *name, struct spwd *sp,
> + char *buffer, size_t buflen, int *errnop)
> + {
> ++ int adjunct_used = 0;
> ++ char *p;
> ++
> + if (name == NULL)
> + {
> + *errnop = EINVAL;
> +@@ -164,6 +209,15 @@ _nss_nis_getspnam_r (const char *name, s
> + int yperr = yp_match (domain, "shadow.byname", name, strlen (name), &result,
> + &len);
> +
> ++ if (yperr == YPERR_MAP) {
> ++ if (result != NULL)
> ++ free (result);
> ++
> ++ yperr = yp_match (domain, "passwd.adjunct.byname", name, strlen (name), &result,
> ++ &len);
> ++ adjunct_used = 1;
> ++ }
> ++
> + if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
> + {
> + enum nss_status retval = yperr2nss (yperr);
> +@@ -173,15 +227,32 @@ _nss_nis_getspnam_r (const char *name, s
> + return retval;
> + }
> +
> +- if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
> ++ if (! adjunct_used)
> + {
> +- free (result);
> +- *errnop = ERANGE;
> +- return NSS_STATUS_TRYAGAIN;
> ++ if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
> ++ {
> ++ free (result);
> ++ *errnop = ERANGE;
> ++ return NSS_STATUS_TRYAGAIN;
> ++ }
> ++
> ++ p = strncpy (buffer, result, len);
> ++ buffer[len] = '\0';
> + }
> (19 more lines skipped)
>
> ++++++ prelink-causes-zypper-ref-to-die.patch (new)
> --- prelink-causes-zypper-ref-to-die.patch
> +++ prelink-causes-zypper-ref-to-die.patch
> +2010-03-23 Jakub Jelinek <jakub at redhat.com>
> +
> + * elf/dl-lookup.c (do_lookup_x): If tab->entries is NULL,
> + but tab->size != 0, just unlock and goto success, without
> + allocating anything or entering anything into the hash table.
> + (_dl_debug_bindings): Temporarily set tab->entries to NULL
> + around do_lookup_x in undef_map->l_local_scope[0].
> +
> +--- libc/elf/dl-lookup.c.jj 2009-12-16 00:10:37.000000000 +0100
> ++++ libc/elf/dl-lookup.c 2010-03-23 11:03:45.850560036 +0100
> +@@ -1,5 +1,6 @@
> + /* Look up a symbol in the loaded objects.
> +- Copyright (C) 1995-2005, 2006, 2007, 2009 Free Software Foundation, Inc.
> ++ Copyright (C) 1995-2005, 2006, 2007, 2009, 2010
> ++ 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
> +@@ -414,6 +415,20 @@ do_lookup_x (const char *undef_name, uin
> + assert (!RTLD_CHECK_FOREIGN_CALL);
> + #endif
> +
> ++#ifdef SHARED
> ++ /* If tab->entries is NULL, but tab->size is not, it means
> ++ this is the second, conflict finding, lookup for
> ++ LD_TRACE_PRELINKING in _dl_debug_bindings. Don't
> ++ allocate anything and don't enter anything into the
> ++ hash table. */
> ++ if (__builtin_expect (tab->size, 0))
> ++ {
> ++ assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK);
> ++ __rtld_lock_unlock_recursive (tab->lock);
> ++ goto success;
> ++ }
> ++#endif
> ++
> + #define INITIAL_NUNIQUE_SYM_TABLE 31
> + size = INITIAL_NUNIQUE_SYM_TABLE;
> + entries = calloc (sizeof (struct unique_sym), size);
> +@@ -917,13 +932,17 @@ _dl_debug_bindings (const char *undef_na
> + {
> + const uint_fast32_t new_hash = dl_new_hash (undef_name);
> + unsigned long int old_hash = 0xffffffff;
> ++ struct unique_sym *saved_entries
> ++ = GL(dl_ns)[LM_ID_BASE]._ns_unique_sym_table.entries;
> +
> ++ GL(dl_ns)[LM_ID_BASE]._ns_unique_sym_table.entries = NULL;
> + do_lookup_x (undef_name, new_hash, &old_hash, *ref, &val,
> + undef_map->l_local_scope[0], 0, version, 0, NULL,
> + type_class, undef_map);
> +
> + if (val.s != value->s || val.m != value->m)
> + conflict = 1;
> ++ GL(dl_ns)[LM_ID_BASE]._ns_unique_sym_table.entries = saved_entries;
> + }
> +
> + if (value->s)
> +
> +
>
> ++++++ tzdata-update.c.arm.patch (new)
> --- tzdata-update.c.arm.patch
> +++ tzdata-update.c.arm.patch
> +diff -up glibc-20071017T2029/fedora/tzdata-update.c.orig glibc-20071017T2029/fedora/tzdata-update.c
> +--- glibc-20071017T2029/fedora/tzdata-update.c.orig 2007-11-26 16:48:44.000000000 -0500
> ++++ glibc-20071017T2029/fedora/tzdata-update.c 2007-11-26 16:51:38.000000000 -0500
> +@@ -391,6 +391,35 @@ register void *__thread_self __asm ("g7"
> + : inline_syscall_clobbers, "$20", "$21"); \
> + _sc_ret = _sc_0, _sc_err = _sc_19; \
> + }
> ++#elif defined __arm__ && defined __ARM_EABI__
> ++# define INTERNAL_SYSCALL_DECL(err) do { } while (0)
> ++# define INTERNAL_SYSCALL(name, err, nr, args...) \
> ++ ({ \
> ++ register int _r0 __asm__("r0"); \
> ++ register int _nr __asm__("r7"); \
> ++ LOAD_ARGS_##nr(args) \
> ++ _nr = __NR_##name; \
> ++ asm volatile ("swi\t0\t@ syscall " #name "\n\t" \
> ++ : "=r" (_r0) \
> ++ : "r" (_nr) ASM_ARGS_##nr \
> ++ : "memory"); \
> ++ _r0; })
> ++# define INTERNAL_SYSCALL_ERROR_P(val, err) \
> ++ ((unsigned int) (val) >= 0xfffff001u)
> ++# define ASM_ARGS_0
> ++# define ASM_ARGS_1 , "r" (_r0)
> ++# define ASM_ARGS_2 , "r" (_r0), "r" (_r1)
> ++# define ASM_ARGS_3 , "r" (_r0), "r" (_r1), "r" (_r2)
> ++# define LOAD_ARGS_0()
> ++# define LOAD_ARGS_1(r0) \
> ++ _r0 = (int)r0;
> ++# define LOAD_ARGS_2(r0, r1) \
> ++ _r0 = (int)r0; \
> ++ register int _r1 __asm__("r1") = (int)r1;
> ++# define LOAD_ARGS_3(r0, r1, r2) \
> ++ _r0 = (int)r0; \
> ++ register int _r1 __asm__("r1") = (int)r1; \
> ++ register int _r2 __asm__("r2") = (int)r2;
> + #endif
> +
> + char buffer[32768], data[32768];
> +@@ -543,6 +572,12 @@ void __libc_csu_fini (void) { }
> + pid_t __fork (void) { return -1; }
> + char thr_buf[65536];
> +
> ++#if defined __arm__
> ++/* Prevent pulling in libc-start.o (which also defines
> ++ * __libc_start_main.) */
> ++unsigned int __stack_chk_guard = ~0U;
> ++#endif
> ++
> + #ifndef __powerpc__
> + int __libc_start_main (int (*main) (int argc, char **argv),
> + int argc, char **argv,
>
> ++++++ deleted files:
> --- glibc-2.12-e28c887.tar.bz2
>
> _______________________________________________
> Meego-commits mailing list
> Meego-commits at meego.com
> http://lists.meego.com/listinfo/meego-commits
More information about the MeeGo-packaging
mailing list