Hello community,

here is the log from the commit of package glibc for openSUSE:Factory checked 
in at 2017-12-16 20:44:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/glibc (Old)
 and      /work/SRC/openSUSE:Factory/.glibc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "glibc"

Sat Dec 16 20:44:23 2017 rev:217 rq:556908 version:2.26

Changes:
--------
--- /work/SRC/openSUSE:Factory/glibc/glibc.changes      2017-11-15 
16:48:20.624822159 +0100
+++ /work/SRC/openSUSE:Factory/.glibc.new/glibc.changes 2017-12-16 
20:44:26.487411742 +0100
@@ -1,0 +2,24 @@
+Wed Dec 13 15:04:54 UTC 2017 - [email protected]
+
+- tst-tlsopt-powerpc.patch: fix tst-tlsopt-powerpc (bcn#1070419)
+- powerpc-hwcap-bits.patch: Update HWCAP for powerpc (bnc#1070420)
+- malloc-tcache-check-overflow.patch: Fix integer overflow in malloc when
+  tcache is enabled (CVE-2017-17426, bnc#1071479, BZ #22375)
+
+-------------------------------------------------------------------
+Tue Dec 12 10:37:21 UTC 2017 - [email protected]
+
+- Add _multibuild
+
+-------------------------------------------------------------------
+Mon Nov 27 11:11:07 UTC 2017 - [email protected]
+
+- glob64-s390.patch: no compat glob64 on s390
+- noversion.tar.bz2: remove unused source
+
+-------------------------------------------------------------------
+Thu Oct 26 15:25:07 UTC 2017 - [email protected]
+
+- x86-64-dl-platform.patch: Don't set GLRO(dl_platform) to NULL (BZ #22299)
+
+-------------------------------------------------------------------

Old:
----
  glibc-testsuite.changes
  glibc-testsuite.spec
  glibc-testsuite.spec.in
  glibc-utils.changes
  glibc-utils.spec
  glibc-utils.spec.in
  noversion.tar.bz2
  pre_checkin.sh

New:
----
  _multibuild
  glob64-s390.patch
  malloc-tcache-check-overflow.patch
  powerpc-hwcap-bits.patch
  tst-tlsopt-powerpc.patch
  x86-64-dl-platform.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ glibc.spec ++++++
--- /var/tmp/diff_new_pack.xORAaQ/_old  2017-12-16 20:44:28.435317708 +0100
+++ /var/tmp/diff_new_pack.xORAaQ/_new  2017-12-16 20:44:28.439317515 +0100
@@ -22,35 +22,35 @@
 
 %define crypt_bf_version 1.3
 %define build_snapshot 0
+%bcond_with ringdisabled
 
-# INCLUDE glibc$flavor.spec.in
-%ifarch i686
-%define flavor i686
-%else
-%define flavor %nil
-%endif
-
-Name:           glibc
-Summary:        Standard Shared Libraries (from the GNU C Library)
-License:        LGPL-2.1+ and SUSE-LGPL-2.1+-with-GCC-exception and GPL-2.0+
-Group:          System/Libraries
-# END INCLUDE glibc$flavor.spec.in
+%define flavor @BUILD_FLAVOR@%{nil}
 
 %bcond_with all
 %define build_main 1
 %define build_utils %{with all}
 %define build_testsuite %{with all}
 %if "%flavor" == "utils"
+%if %{with ringdisabled}
+ExclusiveArch:  do_not_build
+%endif
 %define build_main 0
 %define build_utils 1
 %define build_testsuite 0
 %endif
 %if "%flavor" == "testsuite"
+%if %{with ringdisabled}
+ExclusiveArch:  do_not_build
+%endif
 %define build_main 0
 %define build_utils 0
 %define build_testsuite 1
 %endif
 
+Name:           glibc
+Summary:        Standard Shared Libraries (from the GNU C Library)
+License:        LGPL-2.1+ AND SUSE-LGPL-2.1+-with-GCC-exception AND GPL-2.0+
+Group:          System/Libraries
 BuildRequires:  audit-devel
 BuildRequires:  fdupes
 BuildRequires:  libcap-devel
@@ -153,7 +153,6 @@
 Source:         glibc-%{version}.tar.xz
 %endif
 Source2:        
http://savannah.gnu.org/project/memberlist-gpgkeys.php?group=libc&download=1#/glibc.keyring
-Source3:        noversion.tar.bz2
 Source4:        manpages.tar.bz2
 Source5:        nsswitch.conf
 Source7:        bindresvport.blacklist
@@ -317,6 +316,16 @@
 Patch1020:      dl-runtime-resolve-xsave.patch
 # PATCH-FIX-UPSTREAM posix: Fix improper assert in Linux posix_spawn (BZ 
#22273)
 Patch1021:      spawni-assert.patch
+# PATCH-FIX-UPSTREAM x86-64: Don't set GLRO(dl_platform) to NULL (BZ #22299)
+Patch1022:      x86-64-dl-platform.patch
+# PATCH-FIX-UPSTREAM no compat glob64 on s390
+Patch1023:      glob64-s390.patch
+# PATCH-FIX-UPSTREAM tst-tlsopt-powerpc as a shared lib
+Patch1024:      tst-tlsopt-powerpc.patch
+# PATCH-FIX-UPSTREAM Update HWCAP for powerpc
+Patch1025:      powerpc-hwcap-bits.patch
+# PATCH-FIX-UPSTREAM Fix integer overflow in malloc when tcache is enabled 
(CVE-2017-17426, BZ #22375)
+Patch1026:      malloc-tcache-check-overflow.patch
 
 ### 
 # Patches awaiting upstream approval
@@ -339,23 +348,33 @@
 Patch3000:      manpages.patch
 
 %description
-%if %build_main
 The GNU C Library provides the most important standard libraries used
 by nearly all programs: the standard C library, the standard math
 library, and the POSIX thread library. A system is not functional
 without these libraries.
-%endif
-%if %build_utils
+
+%package utils
+Summary:        Development utilities from the GNU C Library
+License:        LGPL-2.1+
+Group:          Development/Languages/C and C++
+Requires:       glibc = %{version}
+
+%description utils
 The glibc-utils package contains mtrace, a memory leak tracer and
 xtrace, a function call tracer which can be helpful during program
 debugging.
 
 If you are unsure if you need this, do not install this package.
-%endif
-%if %build_testsuite
+
+%package testsuite
+Summary:        Testsuite results from the GNU C Library
+License:        LGPL-2.1+
+Group:          Development/Languages/C and C++
+
+%description testsuite
 This package contains the testsuite results from the GNU C Library.
-%endif
 
+%if %{build_main}
 %package info
 Summary:        Info Files for the GNU C Library
 License:        GFDL-1.1
@@ -382,7 +401,7 @@
 
 %package i18ndata
 Summary:        Database Sources for 'locale'
-License:        GPL-2.0+ and MIT
+License:        GPL-2.0+ AND MIT
 Group:          System/Libraries
 BuildArch:      noarch
 
@@ -394,7 +413,7 @@
 
 %package locale
 Summary:        Locale Data for Localized Programs
-License:        GPL-2.0+ and MIT and LGPL-2.1+
+License:        GPL-2.0+ AND MIT AND LGPL-2.1+
 Group:          System/Libraries
 Requires(post): /bin/cat
 Requires:       glibc = %{version}
@@ -425,7 +444,7 @@
 
 %package profile
 Summary:        Libc Profiling and Debugging Versions
-License:        LGPL-2.1+ and SUSE-LGPL-2.1+-with-GCC-exception and GPL-2.0+
+License:        LGPL-2.1+ AND SUSE-LGPL-2.1+-with-GCC-exception AND GPL-2.0+
 Group:          Development/Libraries/C and C++
 Requires:       glibc = %{version}
 # bug437293
@@ -442,7 +461,7 @@
 
 %package devel
 Summary:        Include Files and Libraries Mandatory for Development
-License:        BSD-3-Clause and LGPL-2.1+ and 
SUSE-LGPL-2.1+-with-GCC-exception and GPL-2.0+
+License:        BSD-3-Clause AND LGPL-2.1+ AND 
SUSE-LGPL-2.1+-with-GCC-exception AND GPL-2.0+
 Group:          Development/Libraries/C and C++
 Obsoletes:      epoll = 1.0
 Provides:       epoll < 1.0
@@ -462,7 +481,7 @@
 
 %package devel-static
 Summary:        C library static libraries for -static linking
-License:        BSD-3-Clause and LGPL-2.1+ and 
SUSE-LGPL-2.1+-with-GCC-exception and GPL-2.0+
+License:        BSD-3-Clause AND LGPL-2.1+ AND 
SUSE-LGPL-2.1+-with-GCC-exception AND GPL-2.0+
 Group:          Development/Libraries/C and C++
 Requires:       %{name}-devel = %{version}
 # Provide Fedora name for package to make packaging easier
@@ -486,9 +505,10 @@
 are not essential but recommend to use.
 
 makedb: A program to create a database for nss
+%endif # main
 
 %prep
-%setup -n glibc-%{version} -q -a 3 -a 4
+%setup -n glibc-%{version} -q -a 4
 # Owl crypt_blowfish
 tar -xzf %SOURCE50
 pushd crypt_blowfish-%{crypt_bf_version}
@@ -549,6 +569,11 @@
 %patch1019 -p1
 %patch1020 -p1
 %patch1021 -p1
+%patch1022 -p1
+%patch1023 -p1
+%patch1024 -p1
+%patch1025 -p1
+%patch1026 -p1
 
 %patch2000 -p1
 %patch2001 -p1
@@ -1089,6 +1114,8 @@
 
 %endif # !main
 
+%if %{build_main}
+
 %post -p %{_sbindir}/glibc_post_upgrade
 %postun -p /sbin/ldconfig
 
@@ -1128,7 +1155,6 @@
 %service_del_postun nscd.service
 exit 0
 
-%if %{build_main}
 %files
 # glibc
 %defattr(-,root,root)
@@ -1396,7 +1422,7 @@
 %endif # main
 
 %if %{build_utils}
-%files
+%files utils
 %defattr(-,root,root)
 /%{_lib}/libmemusage.so
 /%{_lib}/libpcprofile.so

++++++ _multibuild ++++++
<multibuild>
  <package>i686</package>
  <package>utils</package>
  <package>testsuite</package>
</multibuild>

++++++ glob64-s390.patch ++++++
Index: glibc-2.26/sysdeps/unix/sysv/linux/s390/s390-32/oldglob.c
===================================================================
--- /dev/null
+++ glibc-2.26/sysdeps/unix/sysv/linux/s390/s390-32/oldglob.c
@@ -0,0 +1 @@
+/* No compat glob64 on s390.  */
++++++ malloc-tcache-check-overflow.patch ++++++
2017-11-30  Arjun Shankar  <[email protected]>

        [BZ #22375]
        CVE-2017-17426
        * malloc/malloc.c (__libc_malloc): Use checked_request2size
        instead of request2size.

Index: glibc-2.26/malloc/malloc.c
===================================================================
--- glibc-2.26.orig/malloc/malloc.c
+++ glibc-2.26/malloc/malloc.c
@@ -3052,7 +3052,8 @@ __libc_malloc (size_t bytes)
     return (*hook)(bytes, RETURN_ADDRESS (0));
 #if USE_TCACHE
   /* int_free also calls request2size, be careful to not pad twice.  */
-  size_t tbytes = request2size (bytes);
+  size_t tbytes;
+  checked_request2size (bytes, tbytes);
   size_t tc_idx = csize2tidx (tbytes);
 
   MAYBE_INIT_TCACHE ();
++++++ powerpc-hwcap-bits.patch ++++++
2017-11-17  Tulio Magno Quites Machado Filho  <[email protected]>

        * sysdeps/powerpc/bits/hwcap.h (PPC_FEATURE2_HTM_NO_SUSPEND): New
        macro.

Index: glibc-2.26/sysdeps/powerpc/bits/hwcap.h
===================================================================
--- glibc-2.26.orig/sysdeps/powerpc/bits/hwcap.h
+++ glibc-2.26/sysdeps/powerpc/bits/hwcap.h
@@ -72,3 +72,5 @@
                                                 128-bit */
 #define PPC_FEATURE2_DARN         0x00200000 /* darn instruction.  */
 #define PPC_FEATURE2_SCV          0x00100000 /* scv syscall.  */
+#define PPC_FEATURE2_HTM_NO_SUSPEND  0x00080000 /* TM without suspended
+                                                  state.  */
++++++ tst-tlsopt-powerpc.patch ++++++
2017-08-03  Alan Modra  <[email protected]>

        * sysdeps/powerpc/mod-tlsopt-powerpc.c: Extract from
        tst-tlsopt-powerpc.c with function name change and no test harness.
        * sysdeps/powerpc/tst-tlsopt-powerpc.c: Remove body of test.
        Call tls_get_addr_opt_test.
        * sysdeps/powerpc/Makefile (LDFLAGS-tst-tlsopt-powerpc): Don't define.
        (modules-names): Add mod-tlsopt-powerpc.
        (mod-tlsopt-powerpc.so-no-z-defs): Define.
        (tst-tlsopt-powerpc): Depend on .so.
        * sysdeps/powerpc/powerpc64/tls-macros.h (__TLS_GET_ADDR): Don't
        define.  Expand use in TLS_GD and TLS_LD.

Index: glibc-2.26/sysdeps/powerpc/Makefile
===================================================================
--- glibc-2.26.orig/sysdeps/powerpc/Makefile
+++ glibc-2.26/sysdeps/powerpc/Makefile
@@ -8,9 +8,11 @@ sysdep-dl-routines += dl-machine hwcapin
 sysdep_routines += dl-machine hwcapinfo
 # extra shared linker files to link only into dl-allobjs.so
 sysdep-rtld-routines += dl-machine hwcapinfo
-# Don't optimize GD tls sequence to LE.
-LDFLAGS-tst-tlsopt-powerpc += -Wl,--no-tls-optimize
+
+modules-names += mod-tlsopt-powerpc
+mod-tlsopt-powerpc.so-no-z-defs = yes
 tests += tst-tlsopt-powerpc
+$(objpfx)tst-tlsopt-powerpc: $(objpfx)mod-tlsopt-powerpc.so
 
 ifneq (no,$(multi-arch))
 tests-static += tst-tlsifunc-static
Index: glibc-2.26/sysdeps/powerpc/mod-tlsopt-powerpc.c
===================================================================
--- /dev/null
+++ glibc-2.26/sysdeps/powerpc/mod-tlsopt-powerpc.c
@@ -0,0 +1,49 @@
+/* shared library to test for __tls_get_addr optimization.  */
+#include <stdio.h>
+
+#include "../../elf/tls-macros.h"
+#include "dl-tls.h"
+
+/* common 'int' variable in TLS.  */
+COMMON_INT_DEF(foo);
+
+
+int
+tls_get_addr_opt_test (void)
+{
+  int result = 0;
+
+  /* Get variable using general dynamic model.  */
+  int *ap = TLS_GD (foo);
+  if (*ap != 0)
+    {
+      printf ("foo = %d\n", *ap);
+      result = 1;
+    }
+
+  tls_index *tls_arg;
+#ifdef __powerpc64__
+  register unsigned long thread_pointer __asm__ ("r13");
+  asm ("addi %0,2,foo@got@tlsgd" : "=r" (tls_arg));
+#else
+  register unsigned long thread_pointer __asm__ ("r2");
+  asm ("bcl 20,31,1f\n1:\t"
+       "mflr %0\n\t"
+       "addis %0,%0,_GLOBAL_OFFSET_TABLE_-1b@ha\n\t"
+       "addi %0,%0,_GLOBAL_OFFSET_TABLE_-1b@l\n\t"
+       "addi %0,%0,foo@got@tlsgd" : "=b" (tls_arg));
+#endif
+
+  if (tls_arg->ti_module != 0)
+    {
+      printf ("tls_index not optimized, binutils too old?\n");
+      result = 1;
+    }
+  else if (tls_arg->ti_offset + thread_pointer != (unsigned long) ap)
+    {
+      printf ("tls_index->ti_offset wrong value\n");
+      result = 1;
+    }
+
+  return result;
+}
Index: glibc-2.26/sysdeps/powerpc/powerpc64/tls-macros.h
===================================================================
--- glibc-2.26.orig/sysdeps/powerpc/powerpc64/tls-macros.h
+++ glibc-2.26/sysdeps/powerpc/powerpc64/tls-macros.h
@@ -18,13 +18,11 @@
      __result;                                                               \
   })
 
-#define __TLS_GET_ADDR "__tls_get_addr"
-
 /* PowerPC64 Local Dynamic TLS access.  */
 #define TLS_LD(x)                                                            \
   ({ int * __result;                                                         \
      asm ("addi  3,2," #x "@got@tlsld\n\t"                                   \
-         "bl    " __TLS_GET_ADDR "\n\t"                                      \
+         "bl    __tls_get_addr\n\t"                                          \
          "nop   \n\t"                                                        \
          "addis %0,3," #x "@dtprel@ha\n\t"                                   \
          "addi  %0,%0," #x "@dtprel@l"                                       \
@@ -36,7 +34,7 @@
 #define TLS_GD(x)                                                            \
   ({ register int *__result __asm__ ("r3");                                  \
      asm ("addi  3,2," #x "@got@tlsgd\n\t"                                   \
-         "bl    " __TLS_GET_ADDR "\n\t"                                      \
+         "bl    __tls_get_addr\n\t"                                          \
          "nop   "                                                            \
          : "=r" (__result) :                                                 \
          : __TLS_CALL_CLOBBERS);                                             \
Index: glibc-2.26/sysdeps/powerpc/tst-tlsopt-powerpc.c
===================================================================
--- glibc-2.26.orig/sysdeps/powerpc/tst-tlsopt-powerpc.c
+++ glibc-2.26/sysdeps/powerpc/tst-tlsopt-powerpc.c
@@ -1,51 +1,11 @@
 /* glibc test for __tls_get_addr optimization.  */
-#include <stdio.h>
-
-#include "../../elf/tls-macros.h"
-#include "dl-tls.h"
-
-/* common 'int' variable in TLS.  */
-COMMON_INT_DEF(foo);
-
 
 static int
 do_test (void)
 {
-  int result = 0;
-
-  /* Get variable using general dynamic model.  */
-  int *ap = TLS_GD (foo);
-  if (*ap != 0)
-    {
-      printf ("foo = %d\n", *ap);
-      result = 1;
-    }
-
-  tls_index *tls_arg;
-#ifdef __powerpc64__
-  register unsigned long thread_pointer __asm__ ("r13");
-  asm ("addi %0,2,foo@got@tlsgd" : "=r" (tls_arg));
-#else
-  register unsigned long thread_pointer __asm__ ("r2");
-  asm ("bcl 20,31,1f\n1:\t"
-       "mflr %0\n\t"
-       "addis %0,%0,_GLOBAL_OFFSET_TABLE_-1b@ha\n\t"
-       "addi %0,%0,_GLOBAL_OFFSET_TABLE_-1b@l\n\t"
-       "addi %0,%0,foo@got@tlsgd" : "=b" (tls_arg));
-#endif
-
-  if (tls_arg->ti_module != 0)
-    {
-      printf ("tls_index not optimized, binutils too old?\n");
-      result = 1;
-    }
-  else if (tls_arg->ti_offset + thread_pointer != (unsigned long) ap)
-    {
-      printf ("tls_index->ti_offset wrong value\n");
-      result = 1;
-    }
+  extern int tls_get_addr_opt_test (void);
 
-  return result;
+  return tls_get_addr_opt_test ();
 }
 
 #include <support/test-driver.c>
++++++ x86-64-dl-platform.patch ++++++
2017-10-26  Valery Reznic <[email protected]>
            H.J. Lu  <[email protected]>

        [BZ #22299]
        * sysdeps/x86/cpu-features.c (init_cpu_features): Don't set
        GLRO(dl_platform) to NULL.
        * sysdeps/x86_64/Makefile (tests): Add tst-platform-1.
        (modules-names): Add tst-platformmod-1 and
        x86_64/tst-platformmod-2.
        (CFLAGS-tst-platform-1.c): New.
        (CFLAGS-tst-platformmod-1.c): Likewise.
        (CFLAGS-tst-platformmod-2.c): Likewise.
        (LDFLAGS-tst-platformmod-2.so): Likewise.
        ($(objpfx)tst-platform-1): Likewise.
        ($(objpfx)tst-platform-1.out): Likewise.
        (tst-platform-1-ENV): Likewise.
        ($(objpfx)x86_64/tst-platformmod-2.os): Likewise.
        * sysdeps/x86_64/tst-platform-1.c: New file.
        * sysdeps/x86_64/tst-platformmod-1.c: Likewise.
        * sysdeps/x86_64/tst-platformmod-2.c: Likewise.

Index: glibc-2.26/sysdeps/x86/cpu-features.c
===================================================================
--- glibc-2.26.orig/sysdeps/x86/cpu-features.c
+++ glibc-2.26/sysdeps/x86/cpu-features.c
@@ -389,7 +389,6 @@ no_cpuid:
 #endif
 
   /* Reuse dl_platform, dl_hwcap and dl_hwcap_mask for x86.  */
-  GLRO(dl_platform) = NULL;
 #if !HAVE_TUNABLES && defined SHARED
   /* The glibc.tune.hwcap_mask tunable is initialized already, so no need to do
      this.  */
@@ -400,13 +399,15 @@ no_cpuid:
   GLRO(dl_hwcap) = HWCAP_X86_64;
   if (cpu_features->kind == arch_kind_intel)
     {
+      const char *platform = NULL;
+
       if (CPU_FEATURES_ARCH_P (cpu_features, AVX512F_Usable)
          && CPU_FEATURES_CPU_P (cpu_features, AVX512CD))
        {
          if (CPU_FEATURES_CPU_P (cpu_features, AVX512ER))
            {
              if (CPU_FEATURES_CPU_P (cpu_features, AVX512PF))
-               GLRO(dl_platform) = "xeon_phi";
+               platform = "xeon_phi";
            }
          else
            {
@@ -417,7 +418,7 @@ no_cpuid:
            }
        }
 
-      if (GLRO(dl_platform) == NULL
+      if (platform == NULL
          && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable)
          && CPU_FEATURES_ARCH_P (cpu_features, FMA_Usable)
          && CPU_FEATURES_CPU_P (cpu_features, BMI1)
@@ -425,7 +426,10 @@ no_cpuid:
          && CPU_FEATURES_CPU_P (cpu_features, LZCNT)
          && CPU_FEATURES_CPU_P (cpu_features, MOVBE)
          && CPU_FEATURES_CPU_P (cpu_features, POPCNT))
-       GLRO(dl_platform) = "haswell";
+       platform = "haswell";
+
+      if (platform != NULL)
+       GLRO(dl_platform) = platform;
     }
 #else
   GLRO(dl_hwcap) = 0;
Index: glibc-2.26/sysdeps/x86_64/Makefile
===================================================================
--- glibc-2.26.orig/sysdeps/x86_64/Makefile
+++ glibc-2.26/sysdeps/x86_64/Makefile
@@ -62,6 +62,21 @@ endif
 
 $(objpfx)tst-x86_64-1: $(objpfx)x86_64/tst-x86_64mod-1.so
 
+ifneq (no,$(have-tunables))
+tests += tst-platform-1
+modules-names += tst-platformmod-1 x86_64/tst-platformmod-2
+CFLAGS-tst-platform-1.c = -mno-avx
+CFLAGS-tst-platformmod-1.c = -mno-avx
+CFLAGS-tst-platformmod-2.c = -mno-avx
+LDFLAGS-tst-platformmod-2.so = -Wl,-soname,tst-platformmod-2.so
+$(objpfx)tst-platform-1: $(objpfx)tst-platformmod-1.so
+$(objpfx)tst-platform-1.out: $(objpfx)x86_64/tst-platformmod-2.so
+# Turn off AVX512F_Usable and AVX2_Usable so that GLRO(dl_platform) is
+# always set to x86_64.
+tst-platform-1-ENV = LD_PRELOAD=$(objpfx)\$$PLATFORM/tst-platformmod-2.so \
+       GLIBC_TUNABLES=glibc.tune.hwcaps=-AVX512F_Usable,-AVX2_Usable
+endif
+
 tests += tst-audit3 tst-audit4 tst-audit5 tst-audit6 tst-audit7 \
         tst-audit10 tst-sse tst-avx tst-avx512
 test-extras += tst-audit4-aux tst-audit10-aux \
@@ -143,3 +158,8 @@ do-tests-clean common-mostlyclean: tst-x
 .PHONY: tst-x86_64-1-clean
 tst-x86_64-1-clean:
        -rm -rf $(objpfx)x86_64
+
+$(objpfx)x86_64/tst-platformmod-2.os: $(objpfx)tst-platformmod-2.os
+       $(make-target-directory)
+       rm -f $@
+       ln $< $@
Index: glibc-2.26/sysdeps/x86_64/tst-platform-1.c
===================================================================
--- /dev/null
+++ glibc-2.26/sysdeps/x86_64/tst-platform-1.c
@@ -0,0 +1,29 @@
+/* Test PRELOAD with $PLATFORM.
+   Copyright (C) 2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <stdlib.h>
+
+extern int preload (void);
+
+static int
+do_test (void)
+{
+  return preload () == 0x1234 ? EXIT_SUCCESS : EXIT_FAILURE;
+}
+
+#include <support/test-driver.c>
Index: glibc-2.26/sysdeps/x86_64/tst-platformmod-1.c
===================================================================
--- /dev/null
+++ glibc-2.26/sysdeps/x86_64/tst-platformmod-1.c
@@ -0,0 +1,23 @@
+/* Test PRELOAD with $PLATFORM.
+   Copyright (C) 2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+int
+preload (void)
+{
+  return 0;
+}
Index: glibc-2.26/sysdeps/x86_64/tst-platformmod-2.c
===================================================================
--- /dev/null
+++ glibc-2.26/sysdeps/x86_64/tst-platformmod-2.c
@@ -0,0 +1,23 @@
+/* Test PRELOAD with $PLATFORM.
+   Copyright (C) 2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+int
+preload (void)
+{
+  return 0x1234;
+}

Reply via email to