Blame SOURCES/glibc-rh1505492-bounded-12.patch

00db10
commit 2bdd4ca6b6c38367e301042c2247395568c63ebd
00db10
Author: Joseph Myers <joseph@codesourcery.com>
00db10
Date:   Fri Feb 15 00:51:53 2013 +0000
00db10
00db10
    Remove miscellaneous bounded-pointers relics in C code.
00db10
00db10
diff --git a/config.h.in b/config.h.in
00db10
index 07bc713e23f89e46..ef33c23c75ad2220 100644
00db10
--- a/config.h.in
00db10
+++ b/config.h.in
00db10
@@ -137,7 +137,7 @@
00db10
 
00db10
 /* Defined to some form of __attribute__ ((...)) if the compiler supports
00db10
    a different, more efficient calling convention.  */
00db10
-#if defined USE_REGPARMS && !defined PROF && !defined __BOUNDED_POINTERS__
00db10
+#if defined USE_REGPARMS && !defined PROF
00db10
 # define internal_function __attribute__ ((regparm (3), stdcall))
00db10
 #endif
00db10
 
00db10
diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c
00db10
index de55b2676fc80645..1ad2e4da7a654633 100644
00db10
--- a/elf/dl-runtime.c
00db10
+++ b/elf/dl-runtime.c
00db10
@@ -148,7 +148,7 @@ _dl_fixup (
00db10
   return elf_machine_fixup_plt (l, result, reloc, rel_addr, value);
00db10
 }
00db10
 
00db10
-#if !defined PROF && !__BOUNDED_POINTERS__
00db10
+#ifndef PROF
00db10
 DL_FIXUP_VALUE_TYPE
00db10
 __attribute ((noinline)) ARCH_FIXUP_ATTRIBUTE
00db10
 _dl_profile_fixup (
00db10
diff --git a/ports/sysdeps/am33/dl-machine.h b/ports/sysdeps/am33/dl-machine.h
00db10
index 90083c7dc45fc602..d4b321aca094863e 100644
00db10
--- a/ports/sysdeps/am33/dl-machine.h
00db10
+++ b/ports/sysdeps/am33/dl-machine.h
00db10
@@ -56,7 +56,7 @@ elf_machine_load_address (void)
00db10
   return off + gotaddr - gotval;
00db10
 }
00db10
 
00db10
-#if !defined PROF && !__BOUNDED_POINTERS__
00db10
+#ifndef PROF
00db10
 /* We add a declaration of this function here so that in dl-runtime.c
00db10
    the ELF_MACHINE_RUNTIME_TRAMPOLINE macro really can pass the parameters
00db10
    in registers.
00db10
@@ -115,7 +115,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
00db10
 
00db10
 /* This code is used in dl-runtime.c to call the `fixup' function
00db10
    and then redirect to the address it returns.  */
00db10
-#if !defined PROF && !__BOUNDED_POINTERS__
00db10
+#ifndef PROF
00db10
 # define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
00db10
 	.text\n\
00db10
 	.globl _dl_runtime_resolve\n\
00db10
diff --git a/string/bits/string2.h b/string/bits/string2.h
00db10
index bbf05a3df620d655..acd0679e72b10fbf 100644
00db10
--- a/string/bits/string2.h
00db10
+++ b/string/bits/string2.h
00db10
@@ -21,7 +21,7 @@
00db10
 # error "Never use <bits/string2.h> directly; include <string.h> instead."
00db10
 #endif
00db10
 
00db10
-#if !defined __NO_STRING_INLINES && !defined __BOUNDED_POINTERS__
00db10
+#ifndef __NO_STRING_INLINES
00db10
 
00db10
 /* Unlike the definitions in the header <bits/string.h> the
00db10
    definitions contained here are not optimized down to assembler
00db10
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
00db10
index fc2b976651e20ca7..67d23228782d39c9 100644
00db10
--- a/sysdeps/i386/dl-machine.h
00db10
+++ b/sysdeps/i386/dl-machine.h
00db10
@@ -145,7 +145,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
00db10
 
00db10
 #ifdef IN_DL_RUNTIME
00db10
 
00db10
-# if !defined PROF && !__BOUNDED_POINTERS__
00db10
+# ifndef PROF
00db10
 /* We add a declaration of this function here so that in dl-runtime.c
00db10
    the ELF_MACHINE_RUNTIME_TRAMPOLINE macro really can pass the parameters
00db10
    in registers.
00db10
diff --git a/sysdeps/unix/sysv/linux/shmat.c b/sysdeps/unix/sysv/linux/shmat.c
00db10
index 5ac515bc023e6783..401f00b7c01a6a14 100644
00db10
--- a/sysdeps/unix/sysv/linux/shmat.c
00db10
+++ b/sysdeps/unix/sysv/linux/shmat.c
00db10
@@ -38,15 +38,6 @@ shmat (shmid, shmaddr, shmflg)
00db10
   unsigned long resultvar;
00db10
   void *raddr;
00db10
 
00db10
-#if __BOUNDED_POINTERS__
00db10
-  size_t length = ~0;
00db10
-  struct shmid_ds shmds;
00db10
-  /* It's unfortunate that we need to make another system call to get
00db10
-     the shared memory segment length...  */
00db10
-  if (shmctl (shmid, IPC_STAT, &shmds) == 0)
00db10
-    length = shmds.shm_segsz;
00db10
-#endif
00db10
-
00db10
   resultvar = INTERNAL_SYSCALL (ipc, err, 5, IPCOP_shmat,
00db10
 				shmid, shmflg,
00db10
 				(long int) &raddr,
00db10
diff --git a/sysdeps/x86/bits/string.h b/sysdeps/x86/bits/string.h
00db10
index 14793029638ac613..bfa43cca72a92229 100644
00db10
--- a/sysdeps/x86/bits/string.h
00db10
+++ b/sysdeps/x86/bits/string.h
00db10
@@ -36,7 +36,7 @@
00db10
 /* We only provide optimizations if the user selects them and if
00db10
    GNU CC is used.  */
00db10
 # if !defined __NO_STRING_INLINES && defined __USE_STRING_INLINES \
00db10
-    && defined __GNUC__ && __GNUC__ >= 2 && !__BOUNDED_POINTERS__
00db10
+    && defined __GNUC__ && __GNUC__ >= 2
00db10
 
00db10
 # ifndef __STRING_INLINE
00db10
 #  ifndef __extern_inline