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

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