Date: Sat, 30 Jan 2010 18:43:54 +0000 (UTC) From: Robert Watson <rwatson@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r203213 - in projects/capabilities8/lib/csu: amd64 common i386-elf Message-ID: <201001301843.o0UIhsAv075391@svn.freebsd.org>
index | next in thread | raw e-mail
Author: rwatson Date: Sat Jan 30 18:43:54 2010 New Revision: 203213 URL: http://svn.freebsd.org/changeset/base/203213 Log: Merge c170405 from the p4 TrustedBSD Capabilities branch to capabilities8: Removed the multiple definitions which snuck in here Submitted by: Jonathan Anderson <jonathan.anderson at cl.cam.ac.uk> Modified: projects/capabilities8/lib/csu/amd64/crt1.c projects/capabilities8/lib/csu/common/crtbrand.c projects/capabilities8/lib/csu/i386-elf/crt1_c.c Modified: projects/capabilities8/lib/csu/amd64/crt1.c ============================================================================== --- projects/capabilities8/lib/csu/amd64/crt1.c Sat Jan 30 18:35:55 2010 (r203212) +++ projects/capabilities8/lib/csu/amd64/crt1.c Sat Jan 30 18:43:54 2010 (r203213) @@ -134,42 +134,4 @@ _capstart(char **ap, void (*cleanup)(voi 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$\""); Modified: projects/capabilities8/lib/csu/common/crtbrand.c ============================================================================== --- projects/capabilities8/lib/csu/common/crtbrand.c Sat Jan 30 18:35:55 2010 (r203212) +++ projects/capabilities8/lib/csu/common/crtbrand.c Sat Jan 30 18:43:54 2010 (r203213) @@ -62,17 +62,3 @@ int cap_main(int argc, char **argv, char 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; -} - Modified: projects/capabilities8/lib/csu/i386-elf/crt1_c.c ============================================================================== --- projects/capabilities8/lib/csu/i386-elf/crt1_c.c Sat Jan 30 18:35:55 2010 (r203212) +++ projects/capabilities8/lib/csu/i386-elf/crt1_c.c Sat Jan 30 18:43:54 2010 (r203213) @@ -137,49 +137,4 @@ __asm__("eprol:"); 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 = ≈ - 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(".hidden _start1");help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001301843.o0UIhsAv075391>
