c6d234
commit 3a7ac8a0f596bb73093212cd1109c1413777e1f8
c6d234
Author: Joseph Myers <joseph@codesourcery.com>
c6d234
Date:   Fri Feb 1 00:06:18 2013 +0000
c6d234
c6d234
    Remove bp-start.h and INIT_ARGV_and_ENVIRON.
c6d234
c6d234
Conflicts:
c6d234
	sysdeps/generic/bp-start.h
c6d234
c6d234
Copyright header change; file removed manually.
c6d234
c6d234
diff --git a/csu/libc-start.c b/csu/libc-start.c
c6d234
index ebf9f4ec7335f992..2fab8556a5e2cb26 100644
c6d234
--- a/csu/libc-start.c
c6d234
+++ b/csu/libc-start.c
c6d234
@@ -19,7 +19,6 @@
c6d234
 #include <stdio.h>
c6d234
 #include <unistd.h>
c6d234
 #include <ldsodefs.h>
c6d234
-#include <bp-start.h>
c6d234
 #include <bp-sym.h>
c6d234
 
c6d234
 extern void __libc_init_first (int argc, char **argv, char **envp);
c6d234
@@ -146,7 +145,7 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
c6d234
 #ifndef SHARED
c6d234
   char *__unbounded *__unbounded ubp_ev = &ubp_av[argc + 1];
c6d234
 
c6d234
-  INIT_ARGV_and_ENVIRON;
c6d234
+  __environ = ubp_ev;
c6d234
 
c6d234
   /* Store the lowest stack address.  This is done in ld.so if this is
c6d234
      the code for the DSO.  */
c6d234
diff --git a/sysdeps/generic/bp-start.h b/sysdeps/generic/bp-start.h
c6d234
deleted file mode 100644
c6d234
index 0f0339f54cba4aa8..0000000000000000
c6d234
--- a/sysdeps/generic/bp-start.h
c6d234
+++ /dev/null
c6d234
@@ -1,71 +0,0 @@
c6d234
-/* Bounded-pointer checking macros for C.
c6d234
-   Copyright (C) 2000 Free Software Foundation, Inc.
c6d234
-   This file is part of the GNU C Library.
c6d234
-   Contributed by Greg McGary <greg@mcgary.org>
c6d234
-
c6d234
-   The GNU C Library is free software; you can redistribute it and/or
c6d234
-   modify it under the terms of the GNU Lesser General Public
c6d234
-   License as published by the Free Software Foundation; either
c6d234
-   version 2.1 of the License, or (at your option) any later version.
c6d234
-
c6d234
-   The GNU C Library is distributed in the hope that it will be useful,
c6d234
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
c6d234
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
c6d234
-   Lesser General Public License for more details.
c6d234
-
c6d234
-   You should have received a copy of the GNU Lesser General Public
c6d234
-   License along with the GNU C Library; if not, see
c6d234
-   <http://www.gnu.org/licenses/>.  */
c6d234
-
c6d234
-
c6d234
-#if __BOUNDED_POINTERS__
c6d234
-
c6d234
-  /* The command-line arg vector and environment vector come to us from
c6d234
-     the OS as an unbounded pointer to an array of unbounded strings.
c6d234
-     The user's main expects argv and __environ to be bounded pointers
c6d234
-     to arrays of bounded strings.  */
c6d234
-# define INIT_ARGV_and_ENVIRON \
c6d234
-  do {									      \
c6d234
-    int envc;								      \
c6d234
-    for (envc = 0; *ubp_ev; ubp_ev++, envc++)				      \
c6d234
-      ;									      \
c6d234
-    ubp_ev -= envc;							      \
c6d234
-									      \
c6d234
-    /* GKM FIXME: we could save some space by allocating only enough for      \
c6d234
-       the additional low & high words, and destructively rewriting	      \
c6d234
-       argv in place.  */						      \
c6d234
-    __ptrvalue (argv) = __ptrlow (argv)					      \
c6d234
-      = alloca ((argc + envc + 2) * sizeof (*argv));			      \
c6d234
-    __ptrhigh (argv) = __ptrvalue (argv) + argc + 1;			      \
c6d234
-    __ptrvalue (__environ) = __ptrlow (__environ) = __ptrhigh (argv);	      \
c6d234
-    __ptrhigh (__environ) = __ptrvalue (__environ) + envc + 1;		      \
c6d234
-    boundify_vector (__environ, ubp_ev);				      \
c6d234
-    boundify_vector (argv, ubp_av);					      \
c6d234
-  } while (0)
c6d234
-
c6d234
-
c6d234
-/* Copy an unbounded vector of unbounded strings into a bounded
c6d234
-   counterpart.  */
c6d234
-
c6d234
-static void
c6d234
-boundify_vector (char **dest, char *__unbounded *__unbounded src)
c6d234
-{
c6d234
-  char *__unbounded s;
c6d234
-  for (; *src; src++, dest++)
c6d234
-    {
c6d234
-      __ptrvalue (*dest) = __ptrlow (*dest) = *src;
c6d234
-      __ptrhigh (*dest) = src[1];
c6d234
-    }
c6d234
-  *dest = 0;
c6d234
-  /* The OS lays out strings contiguously in vector order,
c6d234
-     so  */
c6d234
-  for (s = __ptrvalue (dest[-1]); *s; s++)
c6d234
-    ;
c6d234
-  __ptrhigh (dest[-1]) = ++s;
c6d234
-}
c6d234
-
c6d234
-#else
c6d234
-
c6d234
-# define INIT_ARGV_and_ENVIRON __environ = ubp_ev
c6d234
-
c6d234
-#endif
c6d234
diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
c6d234
index 98a793e0894f6936..89de1aa7e6e1df59 100644
c6d234
--- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c
c6d234
+++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
c6d234
@@ -20,7 +20,6 @@
c6d234
 #include <unistd.h>
c6d234
 #include <ldsodefs.h>
c6d234
 #include <sysdep.h>
c6d234
-#include <bp-start.h>
c6d234
 #include <bp-sym.h>
c6d234
 
c6d234