Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Nov 2009 16:47:37 GMT
From:      Jonathan Anderson <jona@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 170405 for review
Message-ID:  <200911091647.nA9Glbu3017189@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=170405

Change 170405 by jona@jona-capsicum-kent on 2009/11/09 16:47:10

	Removed the multiple definitions which snuck in here

Affected files ...

.. //depot/projects/trustedbsd/capabilities/src/lib/csu/amd64/crt1.c#4 edit
.. //depot/projects/trustedbsd/capabilities/src/lib/csu/common/crtbrand.c#5 edit
.. //depot/projects/trustedbsd/capabilities/src/lib/csu/i386-elf/crt1.c#4 edit

Differences ...

==== //depot/projects/trustedbsd/capabilities/src/lib/csu/amd64/crt1.c#4 (text+ko) ====

@@ -134,42 +134,4 @@
 	exit( cap_main(argc, argv, env) );
 }
 
-
-/* The Capsicum entry function. */
-void
-_capstart(char **ap, void (*cleanup)(void))
-{
-	int argc;
-	char **argv;
-	char **env;
-	const char *s;
-
-	argc = *(long *)(void *)ap;
-	argv = ap + 1;
-	env = ap + 2 + argc;
-	environ = env;
-	if (argc > 0 && argv[0] != NULL) {
-		__progname = argv[0];
-		for (s = __progname; *s != '\0'; s++)
-			if (*s == '/')
-				__progname = s + 1;
-	}
-
-	if (&_DYNAMIC != NULL)
-		atexit(cleanup);
-	else
-		_init_tls();
-
-#ifdef GCRT
-	atexit(_mcleanup);
-#endif
-	atexit(_fini);
-#ifdef GCRT
-/*	monstartup(&eprol, &etext);
-__asm__("eprol:");*/        /* XXX: does this interfere with profiling? */
-#endif
-	_init();
-	exit( cap_main(argc, argv, env) );
-}
-
 __asm__(".ident\t\"$FreeBSD: src/lib/csu/amd64/crt1.c,v 1.15 2005/10/07 22:13:17 bde Exp $\"");

==== //depot/projects/trustedbsd/capabilities/src/lib/csu/common/crtbrand.c#5 (text+ko) ====

@@ -62,17 +62,3 @@
 	write(2, warning, sizeof(warning));
 }
 
-
-int cap_main(int argc, char **argv, char **env)
-{
-	const char warning[] =
-		"ERROR: attempting to run a regular binary in capability mode."
-		"\n\n"
-		"If you wish to run a binary in a sandbox, you must provide a "
-		"cap_main() function which takes the same arguments as main()."
-		"\n";
-
-	write(2, warning, sizeof(warning));
-	return 1;
-}
-

==== //depot/projects/trustedbsd/capabilities/src/lib/csu/i386-elf/crt1.c#4 (text+ko) ====

@@ -155,49 +155,4 @@
 	exit( cap_main(argc, argv, env) );
 }
 
-
-
-
-/* The Capsicum entry function. */
-void
-_capstart(char *ap, ...)
-{
-	fptr cleanup;
-	int argc;
-	char **argv;
-	char **env;
-	const char *s;
-
-#ifdef __GNUC__
-	__asm__("and $0xfffffff0,%esp");
-#endif
-	cleanup = get_rtld_cleanup();
-	argv = &ap;
-	argc = *(long *)(void *)(argv - 1);
-	env = argv + argc + 1;
-	environ = env;
-	if (argc > 0 && argv[0] != NULL) {
-		__progname = argv[0];
-		for (s = __progname; *s != '\0'; s++)
-			if (*s == '/')
-				__progname = s + 1;
-	}
-
-	if (&_DYNAMIC != NULL)
-		atexit(cleanup);
-	else
-		_init_tls();
-
-#ifdef GCRT
-	atexit(_mcleanup);
-#endif
-	atexit(_fini);
-#ifdef GCRT
-/*	monstartup(&eprol, &etext);
-__asm__("eprol:");*/        /* XXX: does this interfere with profiling? */
-#endif
-	_init();
-	exit( cap_main(argc, argv, env) );
-}
-
 __asm__(".ident\t\"$FreeBSD: src/lib/csu/i386-elf/crt1.c,v 1.15 2005/10/07 22:13:17 bde Exp $\"");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911091647.nA9Glbu3017189>