From owner-freebsd-audit Sun Jun 23 11:39:57 2002 Delivered-To: freebsd-audit@freebsd.org Received: from storm.FreeBSD.org.uk (storm.FreeBSD.org.uk [194.242.139.170]) by hub.freebsd.org (Postfix) with ESMTP id 0E3BB37B40F; Sun, 23 Jun 2002 11:39:31 -0700 (PDT) Received: from storm.FreeBSD.org.uk (uucp@localhost [127.0.0.1]) by storm.FreeBSD.org.uk (8.12.3/8.12.3) with ESMTP id g5NIdU8r032772; Sun, 23 Jun 2002 19:39:30 +0100 (BST) (envelope-from mark@grimreaper.grondar.org) Received: (from uucp@localhost) by storm.FreeBSD.org.uk (8.12.3/8.12.3/Submit) with UUCP id g5NIdUSc032771; Sun, 23 Jun 2002 19:39:30 +0100 (BST) Received: from grimreaper.grondar.org (localhost [127.0.0.1]) by grimreaper.grondar.org (8.12.4/8.12.4) with ESMTP id g5NIUAa4045990; Sun, 23 Jun 2002 19:30:10 +0100 (BST) (envelope-from mark@grimreaper.grondar.org) Message-Id: <200206231830.g5NIUAa4045990@grimreaper.grondar.org> To: jdp@freebsd.org Cc: audit@freebsd.org Subject: lib/csu cleanup - review please Date: Fri, 21 Jun 2002 16:58:06 +0100 From: Mark Murray Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi John and other folks Please check out the following diffs to lib/csu/*/crt1.c. I've been carrying a lot of this for nearly a year now with no problems at all on my laptop or SMP servers. There are two separate reasons for the cleanup: WARNS/lint fixes, and diff-reduction between all of the crt1.c's. For the i386-elf version, there are a lot of whitespace diffs that will be committed separately. Also for the i386-elf one, a macro containing GCC-specific __asm() code has been turned into an inline function. This makes for neater (IMO) code, and makes it possible to lint. Comments? Flames? Awards? :-) M -- o Mark Murray \_ O.\_ Warning: this .sig is umop ap!sdn Index: alpha/crt1.c =================================================================== RCS file: /home/ncvs/src/lib/csu/alpha/crt1.c,v retrieving revision 1.12 diff -u -d -r1.12 crt1.c --- alpha/crt1.c 13 Apr 2002 21:54:09 -0000 1.12 +++ alpha/crt1.c 20 Jun 2002 19:01:36 -0000 @@ -35,23 +35,31 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef lint + #ifndef __GNUC__ #error "GCC is needed to compile this file" #endif +#ifndef __alpha__ +#error "This file only supports the alpha architecture" +#endif + +#endif /* lint */ + #include + #include "libc_private.h" #include "crtbrand.c" struct Struct_Obj_Entry; struct ps_strings; -#pragma weak _DYNAMIC -extern int _DYNAMIC; - extern void _init(void); extern void _fini(void); extern int main(int, char **, char **); +void _start(char **, void (*)(void), struct Struct_Obj_Entry *, + struct ps_strings *); #ifdef GCRT extern void _mcleanup(void); @@ -60,6 +68,9 @@ extern int etext; #endif +extern int _DYNAMIC; +#pragma weak _DYNAMIC + char **environ; const char *__progname = ""; @@ -75,7 +86,7 @@ char **env; const char *s; - argc = * (long *) ap; + argc = *(long *)(void *)ap; argv = ap + 1; env = ap + 2 + argc; environ = env; Index: i386-elf/crt1.c =================================================================== RCS file: /home/ncvs/src/lib/csu/i386-elf/crt1.c,v retrieving revision 1.7 diff -u -d -r1.7 crt1.c --- i386-elf/crt1.c 29 Mar 2002 22:43:41 -0000 1.7 +++ i386-elf/crt1.c 21 Jun 2002 06:56:31 -0000 @@ -23,20 +23,29 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef lint + #ifndef __GNUC__ #error "GCC is needed to compile this file" #endif -#include +#ifndef __i386__ +#error "This file only supports the i386 architecture" +#endif + +#endif /* lint */ + #include + #include "libc_private.h" #include "crtbrand.c" typedef void (*fptr)(void); -extern void _fini(void); extern void _init(void); +extern void _fini(void); extern int main(int, char **, char **); +void _start(char *, ...); #ifdef GCRT extern void _mcleanup(void); @@ -48,51 +57,56 @@ extern int _DYNAMIC; #pragma weak _DYNAMIC -#ifdef __i386__ -#define get_rtld_cleanup() \ - ({ fptr __value; \ - __asm__("movl %%edx,%0" : "=rm"(__value)); \ - __value; }) -#else -#error "This file only supports the i386 architecture" -#endif - char **environ; const char *__progname = ""; +__inline static fptr +get_rtld_cleanup(void) +{ + fptr retval; + + retval = +#ifdef __GNUC__ + ({ fptr __value; __asm__("movl %%edx,%0" : "=rm"(__value)); __value; }); +#else + (fptr)0; +#endif + return(retval); +} + void -_start(char *arguments, ...) +_start(char *ap, ...) { - fptr rtld_cleanup; - int argc; - char **argv; - char **env; - const char *s; + fptr rtld_cleanup; + int argc; + char **argv; + char **env; + const char *s; - rtld_cleanup = get_rtld_cleanup(); - argv = &arguments; - argc = * (int *) (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; - } + rtld_cleanup = get_rtld_cleanup(); + argv = ≈ + argc = *(int *)(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(rtld_cleanup); + if (&_DYNAMIC != NULL) + atexit(rtld_cleanup); #ifdef GCRT - atexit(_mcleanup); + atexit(_mcleanup); #endif - atexit(_fini); + atexit(_fini); #ifdef GCRT - monstartup(&eprol, &etext); + monstartup(&eprol, &etext); #endif - _init(); - exit( main(argc, argv, env) ); + _init(); + exit( main(argc, argv, env) ); } #ifdef GCRT Index: powerpc/crt1.c =================================================================== RCS file: /home/ncvs/src/lib/csu/powerpc/crt1.c,v retrieving revision 1.8 diff -u -d -r1.8 crt1.c --- powerpc/crt1.c 29 Mar 2002 22:43:41 -0000 1.8 +++ powerpc/crt1.c 20 Jun 2002 19:11:17 -0000 @@ -38,20 +38,26 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef lint + #ifndef __GNUC__ #error "GCC is needed to compile this file" #endif +#ifndef __powerpc__ +#error "This file only supports the powerpc architecture" +#endif + +#endif /* lint */ + #include + #include "libc_private.h" #include "crtbrand.c" struct Struct_Obj_Entry; struct ps_strings; -#pragma weak _DYNAMIC -extern int _DYNAMIC; - extern void _init(void); extern void _fini(void); extern int main(int, char **, char **); @@ -63,6 +69,9 @@ extern int etext; #endif +extern int _DYNAMIC; +#pragma weak _DYNAMIC + char **environ; const char *__progname = ""; struct ps_strings *__ps_strings; @@ -73,17 +82,13 @@ * The last argument, ps_strings, is a BSD extension. */ void -_start(argc, argv, envp, obj, cleanup, ps_strings) - int argc; - char **argv, **envp; - const struct Struct_Obj_Entry *obj; /* from shared loader */ - void (*cleanup)(void); /* from shared loader */ - struct ps_strings *ps_strings; /* BSD extension */ +_start(int argc, char **argv, char **env, const struct Struct_Obj_Entry *obj, + void (*cleanup)(void), struct ps_strings *ps_strings) { char *namep; const char *s; - environ = envp; + environ = env; if (argc > 0 && argv[0] != NULL) { __progname = argv[0]; @@ -106,7 +111,7 @@ monstartup(&eprol, &etext); #endif _init(); - exit( main(argc, argv, envp) ); + exit( main(argc, argv, env) ); } #ifdef GCRT Index: sparc64/crt1.c =================================================================== RCS file: /home/ncvs/src/lib/csu/sparc64/crt1.c,v retrieving revision 1.8 diff -u -d -r1.8 crt1.c --- sparc64/crt1.c 29 Apr 2002 20:25:29 -0000 1.8 +++ sparc64/crt1.c 20 Jun 2002 19:02:25 -0000 @@ -29,23 +29,31 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef lint + #ifndef __GNUC__ #error "GCC is needed to compile this file" #endif +#ifndef __sparc64__ +#error "This file only supports the sparc64 architecture" +#endif + +#endif /* lint */ + #include + #include "libc_private.h" #include "crtbrand.c" struct Struct_Obj_Entry; struct ps_strings; -#pragma weak _DYNAMIC -extern int _DYNAMIC; - extern void _init(void); extern void _fini(void); extern int main(int, char **, char **); +void _start(char **, void (*)(void), struct Struct_Obj_Entry *, + struct ps_strings *); extern void __sparc64_sigtramp_setup(void); extern void __sparc64_utrap_setup(void); @@ -55,6 +63,9 @@ extern int eprol; extern int etext; #endif + +extern int _DYNAMIC; +#pragma weak _DYNAMIC char **environ; const char *__progname = ""; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sun Jun 23 11:43:10 2002 Delivered-To: freebsd-audit@freebsd.org Received: from wall.polstra.com (wall-gw.polstra.com [206.213.73.130]) by hub.freebsd.org (Postfix) with ESMTP id 2398D37B403 for ; Sun, 23 Jun 2002 11:42:58 -0700 (PDT) Received: from strings.polstra.com (strings.polstra.com [206.213.73.20]) by wall.polstra.com (8.11.3/8.11.3) with ESMTP id g5NIgff30586; Sun, 23 Jun 2002 11:42:41 -0700 (PDT) (envelope-from jdp@polstra.com) Message-ID: X-Mailer: XFMail 1.5.1 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200206231830.g5NIUAa4045990@grimreaper.grondar.org> Date: Sun, 23 Jun 2002 11:42:41 -0700 (PDT) Organization: Polstra & Co., Inc. From: John Polstra To: Mark Murray Subject: Re: lib/csu cleanup - review please Cc: audit@freebsd.org Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mark Murray wrote: > Hi John and other folks > > Please check out the following diffs to lib/csu/*/crt1.c. Sorry I didn't reply sooner. Could you run these changes by David O'Brien? I think he's the main guy who's been working on the csu stuff for the past few years. I haven't touched it in quite a while. John To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Tue Jun 25 1: 5:54 2002 Delivered-To: freebsd-audit@freebsd.org Received: from hotmail.com (law2-oe48.hotmail.com [216.32.180.46]) by hub.freebsd.org (Postfix) with ESMTP id 1060B37B634; Tue, 25 Jun 2002 01:02:31 -0700 (PDT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 25 Jun 2002 01:02:30 -0700 X-Originating-IP: [203.144.144.233] From: "mont" To: Subject: =?windows-874?B?cGFydC10aW1lIDUsMDAwLTEwLDAwMCCk2LOh57fT5LTpICEhIQ==?= Date: Tue, 25 Jun 2002 15:00:10 +0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_004D_01C21C59.00578D00" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: X-OriginalArrivalTime: 25 Jun 2002 08:02:30.0967 (UTC) FILETIME=[A7CDBC70:01C21C1E] Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. ------=_NextPart_000_004D_01C21C59.00578D00 Content-Type: text/plain; charset="windows-874" Content-Transfer-Encoding: quoted-printable = =C3=D0=BA=BA=A1=D2=C3=B7=D3=A7=D2=B9=A2=CD=A7=B8=D8=C3=A1=D4=A8=E3=B9=CD=B9= =D2=A4=B5 =B7=D3=E4=B4=E9=A7=E8=D2=C2 = =E1=C5=D0=CA=C3=E9=D2=A7=C3=D2=C2=E4=B4=E9=A7=D2=C1=A8=D2=A1=A1=D2=C3=B7=D3= =A7=D2=B9=BC=E8=D2=B9=C3=D0=BA=BA =BC=C1=C1=D5=C3=D2=C2=E4=B4=E9=C1=D2=A1=A1=C7=E8=D2 30,000 / = =E0=B4=D7=CD=B9 = =A8=D2=A1=A1=D2=C3=B7=D3=A7=D2=B9=E0=BE=D5=C2=A7=C7=D1=B9=C5=D0 2-3 = =AA=D1=E8=C7=E2=C1=A7=E0=B7=E8=D2=B9=D1=E9=B9 =E2=CD=A1=D2=CA=C1=D2=B6=D6=A7=A4=D8=B3=E1=C5=E9=C7 ! = =E0=CB=C5=D7=CD=E1=B5=E8=E0=BE=D5=C2=A7=A4=D8=B3=A8=D0=A4=C7=E9=D2=C1=D1=B9= =CB=C3=D7=CD=E0=BB=C5=E8=D2 =A1=D2=C3=BA=C3=C3=C2=D2=C2=E1=B9=D0=B9=D3=B8=D8=C3=A1=D4=A8 = International E-Business =E0=C3=D5=C2=B9=C3=D9=E9=C7=D4=B8=D5=A1=D2=C3=B7=D3=A7=D2=B9 = =B8=D8=C3=A1=D4=A8=B9=D2=B9=D2=AA=D2=B5=D4 =BA=B9 Internet=20 = =E0=C3=D5=C2=B9=C3=D9=E9=E1=BC=B9=A1=D2=C3=B7=D3=A7=D2=B9=E0=BE=D4=E8=C1=C3= =D2=C2=E4=B4=E9=BE=D4=E0=C8=C9=E3=B9=E1=B5=E8=C5=D0=E0=B4=D7=CD=B9 = =E1=BC=B9=C3=D2=C2=E4=B4=E9=CD=C2=E8=D2=A7=A8=C3=D4=A7=A8=D1=A7=E1=BA=BA=B7= =D3=A7=D2=B9 Part-time 15,000 =B6=D6=A7 60,000 =BA=D2=B7/=E0=B4=D7=CD=B9 =E0=C7=C5=D2=B7=D5=E8=B5=E9=CD=A7=E3=AA=E9 : 7- 14 =AA=C1. = /=CA=D1=BB=B4=D2=CB=EC=20 = =E1=BC=B9=C3=D2=C2=E4=B4=E9=CD=C2=E8=D2=A7=A8=C3=D4=A7=A8=D1=A7=E1=BA=BA=B7= =D3=A7=D2=B9 full-time 30,000 =B6=D6=A7 170,000 =BA=D2=B7/=E0=B4=D7=CD=B9 =E0=C7=C5=D2=B7=D5=E8=B5=E9=CD=A7=E3=AA=E9 : 20- 40 =AA=C1. = /=CA=D1=BB=B4=D2=CB=EC=20 =A2=E8=D2=C7=B4=D5 ! =CA=D3=CB=C3=D1=BA = =BC=D9=E9=B7=D5=E8=CD=C2=D9=E8=E3=B9=E0=A2=B5 =A1=C3=D8=A7=E0=B7=BE=CF = =E1=C5=D0=BB=C3=D4=C1=C5=B1=C5 = =CA=D3=C3=CD=A7=B7=D5=E8=B9=D1=E8=A7=E0=BE=D7=E8=CD=BF=D1=A7=A1=D2=C3=BA=C3= =C3=C2=D2=C2 =BF=C3=D5 !!! = ************************************************************* = =A2=CD=CD=C0=D1=C2=CB=D2=A1=A2=E9=CD=A4=C7=D2=C1=B9=D5=E9=E4=BB=B6=D6=A7=A4= =D8=B3=E2=B4=C2=BA=D1=A7=E0=CD=D4=AD=CB=D2=A1=A4=D8=B3=E4=C1=E8=B5=E9=CD=A7= =A1=D2=C3=C3=D1=BA=A2=E9=CD=A4=C7=D2=C1=B9=D5=E9=CD=D5=A1 =A1=C3=D8=B3=D2 =E1=A8=E9=A7 Mail = =A2=CD=A7=A4=D8=B3=B7=D5=E8=B5=E9=CD=A7=A1=D2=C3=C5=BA=C1=D2=B7=D5=E8 = "Unsubscribe" =20 =20 ------=_NextPart_000_004D_01C21C59.00578D00 Content-Type: text/html; charset="windows-874" Content-Transfer-Encoding: quoted-printable

=C3=D0=BA=BA=A1=D2=C3=B7=D3=A7=D2=B9=A2=CD=A7=B8=D8=C3=A1=D4=A8= =E3=B9=CD=B9=D2=A4=B5
=B7=D3=E4=B4=E9=A7=E8=D2=C2=20 = =E1=C5=D0=CA=C3=E9=D2=A7=C3=D2=C2=E4=B4=E9=A7=D2=C1=A8=D2=A1=A1=D2=C3=B7=D3= =A7=D2=B9=BC=E8=D2=B9=C3=D0=BA=BA
=BC=C1=C1=D5=C3=D2=C2=E4=B4=E9=C1=D2=A1=A1=C7=E8=D2=20 30,000 / =E0=B4=D7=CD=B9 = =A8=D2=A1=A1=D2=C3=B7=D3=A7=D2=B9=E0=BE=D5=C2=A7=C7=D1=B9=C5=D0 2-3=20 = =AA=D1=E8=C7=E2=C1=A7=E0=B7=E8=D2=B9=D1=E9=B9

=E2=CD=A1=D2=CA=C1=D2=B6=D6=A7=A4=D8=B3=E1=C5=E9=C7=20 !
=E0=CB=C5=D7=CD=E1=B5=E8=E0=BE=D5=C2=A7=A4=D8=B3=A8=D0=A4=C7= =E9=D2=C1=D1=B9=CB=C3=D7=CD=E0=BB=C5=E8=D2

=A1=D2=C3=BA=C3=C3=C2=D2=C2=E1=B9=D0=B9=D3=B8=D8=C3=A1=D4= =A8 International=20 E-Business
=E0=C3=D5=C2=B9=C3=D9=E9=C7=D4=B8=D5=A1=D2=C3=B7=D3=A7=D2= =B9 =B8=D8=C3=A1=D4=A8=B9=D2=B9=D2=AA=D2=B5=D4 =BA=B9 Internet=20
=E0=C3=D5=C2=B9=C3=D9=E9=E1=BC=B9=A1=D2=C3=B7=D3=A7=D2=B9= =E0=BE=D4=E8=C1=C3=D2=C2=E4=B4=E9=BE=D4=E0=C8=C9=E3=B9=E1=B5=E8=C5=D0=E0=B4= =D7=CD=B9

=E1=BC=B9=C3=D2=C2=E4=B4=E9=CD=C2=E8=D2=A7=A8=C3=D4=A7=A8=D1=A7=E1=BA= =BA=B7=D3=A7=D2=B9 Part-time
15,000 =B6=D6=A7 = 60,000=20 = =BA=D2=B7/=E0=B4=D7=CD=B9
=E0=C7=C5=D2=B7=D5=E8=B5=E9=CD=A7=E3=AA=E9 = : 7- 14 =AA=C1. /=CA=D1=BB=B4=D2=CB=EC=20 =
=E1=BC=B9=C3=D2=C2=E4=B4=E9=CD=C2=E8=D2=A7=A8=C3=D4=A7=A8=D1=A7=E1=BA= =BA=B7=D3=A7=D2=B9 full-time
30,000 =B6=D6=A7 170,000=20 = =BA=D2=B7/=E0=B4=D7=CD=B9
=E0=C7=C5=D2=B7=D5=E8=B5=E9=CD=A7=E3=AA=E9 = : 20- 40 =AA=C1. /=CA=D1=BB=B4=D2=CB=EC

=A2=E8=D2=C7=B4=D5=20 !     = =CA=D3=CB=C3=D1=BA = =BC=D9=E9=B7=D5=E8=CD=C2=D9=E8=E3=B9=E0=A2=B5=20 =A1=C3=D8=A7=E0=B7=BE=CF  = =E1=C5=D0=BB=C3=D4=C1=C5=B1=C5
=CA=D3=C3=CD=A7=B7=D5=E8=B9=D1=E8=A7=E0=BE=D7=E8=CD=BF=D1=A7=A1=D2= =C3=BA=C3=C3=C2=D2=C2   = =BF=C3=D5 !!!
*************************************************************
          &nbs= p; =20 =A2=CD=CD=C0=D1=C2=CB=D2=A1=A2=E9=CD=A4=C7=D2=C1=B9=D5=E9=E4=BB= =B6=D6=A7=A4=D8=B3=E2=B4=C2=BA=D1=A7=E0=CD=D4=AD=CB=D2=A1=A4=D8=B3=E4=C1=E8= =B5=E9=CD=A7=A1=D2=C3=C3=D1=BA=A2=E9=CD=A4=C7=D2=C1=B9=D5=E9=CD=D5=A1
=   =20 =            =        =20 =A1=C3=D8=B3=D2 =E1=A8=E9=A7 Mail=20 = =A2=CD=A7=A4=D8=B3=B7=D5=E8=B5=E9=CD=A7=A1=D2=C3=C5=BA=C1=D2=B7=D5=E8 = "Unsubscribe"

------=_NextPart_000_004D_01C21C59.00578D00-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Tue Jun 25 2:52: 4 2002 Delivered-To: freebsd-audit@freebsd.org Received: from hotmail.com (oe55.pav2.hotmail.com [64.4.36.63]) by hub.freebsd.org (Postfix) with ESMTP id 5EC1537B40C; Tue, 25 Jun 2002 02:49:32 -0700 (PDT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 25 Jun 2002 02:49:31 -0700 X-Originating-IP: [203.144.144.233] From: "mont" To: Subject: =?windows-874?B?cGFydC10aW1lIDUsMDAwLTEwLDAwMCCk2LOh57fT5LTpICEhIQ==?= Date: Tue, 25 Jun 2002 16:45:39 +0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_01FE_01C21C67.BCB0AE60" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: X-OriginalArrivalTime: 25 Jun 2002 09:49:31.0844 (UTC) FILETIME=[9AF1D040:01C21C2D] Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. ------=_NextPart_000_01FE_01C21C67.BCB0AE60 Content-Type: text/plain; charset="windows-874" Content-Transfer-Encoding: quoted-printable = =C3=D0=BA=BA=A1=D2=C3=B7=D3=A7=D2=B9=A2=CD=A7=B8=D8=C3=A1=D4=A8=E3=B9=CD=B9= =D2=A4=B5 =B7=D3=E4=B4=E9=A7=E8=D2=C2 = =E1=C5=D0=CA=C3=E9=D2=A7=C3=D2=C2=E4=B4=E9=A7=D2=C1=A8=D2=A1=A1=D2=C3=B7=D3= =A7=D2=B9=BC=E8=D2=B9=C3=D0=BA=BA =BC=C1=C1=D5=C3=D2=C2=E4=B4=E9=C1=D2=A1=A1=C7=E8=D2 30,000 / = =E0=B4=D7=CD=B9 = =A8=D2=A1=A1=D2=C3=B7=D3=A7=D2=B9=E0=BE=D5=C2=A7=C7=D1=B9=C5=D0 2-3 = =AA=D1=E8=C7=E2=C1=A7=E0=B7=E8=D2=B9=D1=E9=B9 =E2=CD=A1=D2=CA=C1=D2=B6=D6=A7=A4=D8=B3=E1=C5=E9=C7 ! = =E0=CB=C5=D7=CD=E1=B5=E8=E0=BE=D5=C2=A7=A4=D8=B3=A8=D0=A4=C7=E9=D2=C1=D1=B9= =CB=C3=D7=CD=E0=BB=C5=E8=D2 =A1=D2=C3=BA=C3=C3=C2=D2=C2=E1=B9=D0=B9=D3=B8=D8=C3=A1=D4=A8 = International E-Business =E0=C3=D5=C2=B9=C3=D9=E9=C7=D4=B8=D5=A1=D2=C3=B7=D3=A7=D2=B9 = =B8=D8=C3=A1=D4=A8=B9=D2=B9=D2=AA=D2=B5=D4 =BA=B9 Internet=20 = =E0=C3=D5=C2=B9=C3=D9=E9=E1=BC=B9=A1=D2=C3=B7=D3=A7=D2=B9=E0=BE=D4=E8=C1=C3= =D2=C2=E4=B4=E9=BE=D4=E0=C8=C9=E3=B9=E1=B5=E8=C5=D0=E0=B4=D7=CD=B9 = =E1=BC=B9=C3=D2=C2=E4=B4=E9=CD=C2=E8=D2=A7=A8=C3=D4=A7=A8=D1=A7=E1=BA=BA=B7= =D3=A7=D2=B9 Part-time 15,000 =B6=D6=A7 60,000 =BA=D2=B7/=E0=B4=D7=CD=B9 =E0=C7=C5=D2=B7=D5=E8=B5=E9=CD=A7=E3=AA=E9 : 7- 14 =AA=C1. = /=CA=D1=BB=B4=D2=CB=EC=20 = =E1=BC=B9=C3=D2=C2=E4=B4=E9=CD=C2=E8=D2=A7=A8=C3=D4=A7=A8=D1=A7=E1=BA=BA=B7= =D3=A7=D2=B9 full-time 30,000 =B6=D6=A7 170,000 =BA=D2=B7/=E0=B4=D7=CD=B9 =E0=C7=C5=D2=B7=D5=E8=B5=E9=CD=A7=E3=AA=E9 : 20- 40 =AA=C1. = /=CA=D1=BB=B4=D2=CB=EC=20 =A2=E8=D2=C7=B4=D5 ! =CA=D3=CB=C3=D1=BA = =BC=D9=E9=B7=D5=E8=CD=C2=D9=E8=E3=B9=E0=A2=B5 =A1=C3=D8=A7=E0=B7=BE=CF = =E1=C5=D0=BB=C3=D4=C1=C5=B1=C5 = =CA=D3=C3=CD=A7=B7=D5=E8=B9=D1=E8=A7=E0=BE=D7=E8=CD=BF=D1=A7=A1=D2=C3=BA=C3= =C3=C2=D2=C2 =BF=C3=D5 !!! = ************************************************************* = =A2=CD=CD=C0=D1=C2=CB=D2=A1=A2=E9=CD=A4=C7=D2=C1=B9=D5=E9=E4=BB=B6=D6=A7=A4= =D8=B3=E2=B4=C2=BA=D1=A7=E0=CD=D4=AD=CB=D2=A1=A4=D8=B3=E4=C1=E8=B5=E9=CD=A7= =A1=D2=C3=C3=D1=BA=A2=E9=CD=A4=C7=D2=C1=B9=D5=E9=CD=D5=A1 =A1=C3=D8=B3=D2 =E1=A8=E9=A7 Mail = =A2=CD=A7=A4=D8=B3=B7=D5=E8=B5=E9=CD=A7=A1=D2=C3=C5=BA=C1=D2=B7=D5=E8 = "Unsubscribe" =20 =20 ------=_NextPart_000_01FE_01C21C67.BCB0AE60 Content-Type: text/html; charset="windows-874" Content-Transfer-Encoding: quoted-printable

=C3=D0=BA=BA=A1=D2=C3=B7=D3=A7=D2=B9=A2=CD=A7=B8=D8=C3=A1=D4=A8= =E3=B9=CD=B9=D2=A4=B5
=B7=D3=E4=B4=E9=A7=E8=D2=C2=20 = =E1=C5=D0=CA=C3=E9=D2=A7=C3=D2=C2=E4=B4=E9=A7=D2=C1=A8=D2=A1=A1=D2=C3=B7=D3= =A7=D2=B9=BC=E8=D2=B9=C3=D0=BA=BA
=BC=C1=C1=D5=C3=D2=C2=E4=B4=E9=C1=D2=A1=A1=C7=E8=D2=20 30,000 / =E0=B4=D7=CD=B9 = =A8=D2=A1=A1=D2=C3=B7=D3=A7=D2=B9=E0=BE=D5=C2=A7=C7=D1=B9=C5=D0 2-3=20 = =AA=D1=E8=C7=E2=C1=A7=E0=B7=E8=D2=B9=D1=E9=B9

=E2=CD=A1=D2=CA=C1=D2=B6=D6=A7=A4=D8=B3=E1=C5=E9=C7=20 !
=E0=CB=C5=D7=CD=E1=B5=E8=E0=BE=D5=C2=A7=A4=D8=B3=A8=D0=A4=C7= =E9=D2=C1=D1=B9=CB=C3=D7=CD=E0=BB=C5=E8=D2

=A1=D2=C3=BA=C3=C3=C2=D2=C2=E1=B9=D0=B9=D3=B8=D8=C3=A1=D4= =A8 International=20 E-Business
=E0=C3=D5=C2=B9=C3=D9=E9=C7=D4=B8=D5=A1=D2=C3=B7=D3=A7=D2= =B9 =B8=D8=C3=A1=D4=A8=B9=D2=B9=D2=AA=D2=B5=D4 =BA=B9 Internet=20
=E0=C3=D5=C2=B9=C3=D9=E9=E1=BC=B9=A1=D2=C3=B7=D3=A7=D2=B9= =E0=BE=D4=E8=C1=C3=D2=C2=E4=B4=E9=BE=D4=E0=C8=C9=E3=B9=E1=B5=E8=C5=D0=E0=B4= =D7=CD=B9

=E1=BC=B9=C3=D2=C2=E4=B4=E9=CD=C2=E8=D2=A7=A8=C3=D4=A7=A8=D1=A7=E1=BA= =BA=B7=D3=A7=D2=B9 Part-time
15,000 =B6=D6=A7 = 60,000=20 = =BA=D2=B7/=E0=B4=D7=CD=B9
=E0=C7=C5=D2=B7=D5=E8=B5=E9=CD=A7=E3=AA=E9 = : 7- 14 =AA=C1. /=CA=D1=BB=B4=D2=CB=EC=20 =
=E1=BC=B9=C3=D2=C2=E4=B4=E9=CD=C2=E8=D2=A7=A8=C3=D4=A7=A8=D1=A7=E1=BA= =BA=B7=D3=A7=D2=B9 full-time
30,000 =B6=D6=A7 170,000=20 = =BA=D2=B7/=E0=B4=D7=CD=B9
=E0=C7=C5=D2=B7=D5=E8=B5=E9=CD=A7=E3=AA=E9 = : 20- 40 =AA=C1. /=CA=D1=BB=B4=D2=CB=EC

=A2=E8=D2=C7=B4=D5=20 !     = =CA=D3=CB=C3=D1=BA = =BC=D9=E9=B7=D5=E8=CD=C2=D9=E8=E3=B9=E0=A2=B5=20 =A1=C3=D8=A7=E0=B7=BE=CF  = =E1=C5=D0=BB=C3=D4=C1=C5=B1=C5
=CA=D3=C3=CD=A7=B7=D5=E8=B9=D1=E8=A7=E0=BE=D7=E8=CD=BF=D1=A7=A1=D2= =C3=BA=C3=C3=C2=D2=C2   = =BF=C3=D5 !!!
*************************************************************
          &nbs= p; =20 =A2=CD=CD=C0=D1=C2=CB=D2=A1=A2=E9=CD=A4=C7=D2=C1=B9=D5=E9=E4=BB= =B6=D6=A7=A4=D8=B3=E2=B4=C2=BA=D1=A7=E0=CD=D4=AD=CB=D2=A1=A4=D8=B3=E4=C1=E8= =B5=E9=CD=A7=A1=D2=C3=C3=D1=BA=A2=E9=CD=A4=C7=D2=C1=B9=D5=E9=CD=D5=A1
=   =20 =            =        =20 =A1=C3=D8=B3=D2 =E1=A8=E9=A7 Mail=20 = =A2=CD=A7=A4=D8=B3=B7=D5=E8=B5=E9=CD=A7=A1=D2=C3=C5=BA=C1=D2=B7=D5=E8 = "Unsubscribe"

------=_NextPart_000_01FE_01C21C67.BCB0AE60-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Tue Jun 25 11:41: 2 2002 Delivered-To: freebsd-audit@freebsd.org Received: from dragon.nuxi.com (trang.nuxi.com [66.92.13.169]) by hub.freebsd.org (Postfix) with ESMTP id BE16B37B41B for ; Tue, 25 Jun 2002 11:39:38 -0700 (PDT) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.4/8.12.2) with ESMTP id g5PIdbtL002584; Tue, 25 Jun 2002 11:39:37 -0700 (PDT) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.4/8.12.4/Submit) id g5PIdTMj002576; Tue, 25 Jun 2002 11:39:29 -0700 (PDT) Date: Tue, 25 Jun 2002 11:39:29 -0700 From: "David O'Brien" To: Mark Murray Cc: audit@freebsd.org Subject: Re: lib/csu cleanup - review please Message-ID: <20020625113929.A1424@dragon.nuxi.com> Reply-To: obrien@freebsd.org Mail-Followup-To: David O'Brien , Mark Murray , audit@freebsd.org References: <200206231830.g5NIUAa4045990@grimreaper.grondar.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200206231830.g5NIUAa4045990@grimreaper.grondar.org>; from mark@grondar.za on Fri, Jun 21, 2002 at 04:58:06PM +0100 X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Jun 21, 2002 at 04:58:06PM +0100, Mark Murray wrote: > Hi John and other folks > > Please check out the following diffs to lib/csu/*/crt1.c. > > I've been carrying a lot of this for nearly a year now with > no problems at all on my laptop or SMP servers. > > There are two separate reasons for the cleanup: WARNS/lint > fixes, and diff-reduction between all of the crt1.c's. > > For the i386-elf version, there are a lot of whitespace diffs > that will be committed separately. > > Also for the i386-elf one, a macro containing GCC-specific > __asm() code has been turned into an inline function. This > makes for neater (IMO) code, and makes it possible to lint. > > Comments? Flames? Awards? :-) > > M > -- > o Mark Murray > \_ > O.\_ Warning: this .sig is umop ap!sdn > Index: alpha/crt1.c > =================================================================== > RCS file: /home/ncvs/src/lib/csu/alpha/crt1.c,v ... > +#ifndef lint > + > #ifndef __GNUC__ > #error "GCC is needed to compile this file" > #endif Please change Lint to note the #error but to continue processing. I've pondered it and cannot find a good reason for Lint to "obey" #error. > +#ifndef __alpha__ > +#error "This file only supports the alpha architecture" > +#endif Why do we need this? It is the case that /sys/ only supports . We don't add this type of guard there. Why do we need it here? Oh, I see it is in i386-elf. I see no reason for it to be there and feel it should just be removed. > -#pragma weak _DYNAMIC > -extern int _DYNAMIC; ..snip.. > @@ -60,6 +68,9 @@ > extern int etext; > #endif > > +extern int _DYNAMIC; > +#pragma weak _DYNAMIC Why? IMO #pragma's should come as early as possible. > +void _start(char **, void (*)(void), struct Struct_Obj_Entry *, > + struct ps_strings *); Needed addition. > @@ -75,7 +86,7 @@ > - argc = * (long *) ap; > + argc = *(long *)(void *)ap; Is this from a Lint run on i386 or something? I just compiled crt1.c with WARNS=6 and with your _start prototype and another fix I'll commit now; I get a clean compile. > Index: i386-elf/crt1.c > =================================================================== > RCS file: /home/ncvs/src/lib/csu/i386-elf/crt1.c,v > -extern void _fini(void); > extern void _init(void); > +extern void _fini(void); Why? `f' comes before `i'. > extern int main(int, char **, char **); > +void _start(char *, ...); Needed. > #ifdef GCRT > extern void _mcleanup(void); > @@ -48,51 +57,56 @@ > extern int _DYNAMIC; > #pragma weak _DYNAMIC > > -#ifdef __i386__ > -#define get_rtld_cleanup() \ > - ({ fptr __value; \ > - __asm__("movl %%edx,%0" : "=rm"(__value)); \ > - __value; }) > -#else > -#error "This file only supports the i386 architecture" > -#endif > - > char **environ; > const char *__progname = ""; > > +__inline static fptr > +get_rtld_cleanup(void) > +{ csu/i386-elf/crt1.c:53: warning: function declaration isn't a prototype ;-) I'll post a diff that is WARNS=6 clean. I'd rather not guess a "correct" implimention for non-GCC compilers. > -_start(char *arguments, ...) > +_start(char *ap, ...) Why do we need to rename "arguments"? > { > - fptr rtld_cleanup; > - int argc; > - char **argv; > - char **env; > - const char *s; > + fptr rtld_cleanup; > + int argc; > + char **argv; > + char **env; > + const char *s; Lets seperate the style changes from the "functionality" or warnings ones. While it would be nice for this to be style(9); style(9) says to leave the format as-is when consistent. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Tue Jun 25 11:41:13 2002 Delivered-To: freebsd-audit@freebsd.org Received: from dragon.nuxi.com (trang.nuxi.com [66.92.13.169]) by hub.freebsd.org (Postfix) with ESMTP id 70ABE37B49A for ; Tue, 25 Jun 2002 11:40:59 -0700 (PDT) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.4/8.12.2) with ESMTP id g5PIextL002630; Tue, 25 Jun 2002 11:40:59 -0700 (PDT) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.4/8.12.4/Submit) id g5PIexKm002629; Tue, 25 Jun 2002 11:40:59 -0700 (PDT) Date: Tue, 25 Jun 2002 11:40:59 -0700 From: "David O'Brien" To: Mark Murray Cc: audit@freebsd.org Subject: Re: lib/csu cleanup - review please Message-ID: <20020625114059.B1424@dragon.nuxi.com> Reply-To: obrien@freebsd.org Mail-Followup-To: David O'Brien , Mark Murray , audit@freebsd.org References: <200206231830.g5NIUAa4045990@grimreaper.grondar.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200206231830.g5NIUAa4045990@grimreaper.grondar.org>; from mark@grondar.za on Fri, Jun 21, 2002 at 04:58:06PM +0100 X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Index: crt1.c =================================================================== RCS file: /home/ncvs/src/lib/csu/i386-elf/crt1.c,v retrieving revision 1.7 diff -u -r1.7 crt1.c --- crt1.c 29 Mar 2002 22:43:41 -0000 1.7 +++ crt1.c 25 Jun 2002 18:40:38 -0000 @@ -37,6 +37,7 @@ extern void _fini(void); extern void _init(void); extern int main(int, char **, char **); +extern void _start(char *, ...); #ifdef GCRT extern void _mcleanup(void); @@ -48,14 +49,17 @@ extern int _DYNAMIC; #pragma weak _DYNAMIC -#ifdef __i386__ -#define get_rtld_cleanup() \ - ({ fptr __value; \ - __asm__("movl %%edx,%0" : "=rm"(__value)); \ - __value; }) +static __inline fptr get_rtld_cleanup(void); +__inline fptr get_rtld_cleanup() { + fptr __value; +#ifdef __GNUC__ + __asm__("movl %%edx,%0" : "=rm"(__value)); #else -#error "This file only supports the i386 architecture" +#error "GCC is needed to compile this file" + __value = 0; /* shut up lint */ #endif + return __value; +} char **environ; const char *__progname = ""; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Wed Jun 26 0:39:46 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 34A1137B40F; Wed, 26 Jun 2002 00:38:59 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id RAA21604; Wed, 26 Jun 2002 17:30:47 +1000 Date: Wed, 26 Jun 2002 17:36:10 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: "David O'Brien" Cc: Mark Murray , Subject: Re: lib/csu cleanup - review please In-Reply-To: <20020625113929.A1424@dragon.nuxi.com> Message-ID: <20020626165726.O30754-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 25 Jun 2002, David O'Brien wrote: > On Fri, Jun 21, 2002 at 04:58:06PM +0100, Mark Murray wrote: > > Index: alpha/crt1.c > > =================================================================== > > RCS file: /home/ncvs/src/lib/csu/alpha/crt1.c,v > ... > > +#ifndef lint > > + > > #ifndef __GNUC__ > > #error "GCC is needed to compile this file" > > #endif > > Please change Lint to note the #error but to continue processing. I've > pondered it and cannot find a good reason for Lint to "obey" #error. The good reason is that #error is supposed to break compilation. A gcc- ware version of lint is required to compile this file, but "lint -g" is not gcc-aware enough to do so. Hiding the gcc-specific bits so that lint can handle the file is less than useful. > > +#ifndef __alpha__ > > +#error "This file only supports the alpha architecture" > > +#endif > > Why do we need this? It is the case that /sys/ only supports > . We don't add this type of guard there. Why do we need it here? > Oh, I see it is in i386-elf. I see no reason for it to be there and > feel it should just be removed. I agree. > > -#pragma weak _DYNAMIC > > -extern int _DYNAMIC; > ..snip.. > > @@ -60,6 +68,9 @@ > > extern int etext; > > #endif > > > > +extern int _DYNAMIC; > > +#pragma weak _DYNAMIC > > Why? IMO #pragma's should come as early as possible. The pragma should be together with the declaration, but _DYNAMIC sorts before etext anyway. >... > > @@ -75,7 +86,7 @@ > > - argc = * (long *) ap; > > + argc = *(long *)(void *)ap; > > Is this from a Lint run on i386 or something? I just compiled crt1.c > with WARNS=6 and with your _start prototype and another fix I'll commit > now; I get a clean compile. ap has type "char **", so casting it to "long *" should cause a diagnostic. Casting it via "void *" prevents the diagnostic. The behaviour is still undefined, but works in an MD way. "long *" is for bug-for-bug compatibility with the kernel. arc has type int, but the kernel uses suword(ptr, argc) to put it on the stack. > > Index: i386-elf/crt1.c > > =================================================================== > > RCS file: /home/ncvs/src/lib/csu/i386-elf/crt1.c,v > > ... > > +__inline static fptr > > +get_rtld_cleanup(void) > > +{ > > csu/i386-elf/crt1.c:53: warning: function declaration isn't a prototype > ;-) I'll post a diff that is WARNS=6 clean. Also, unusual order of "static __inline". > I'd rather not guess a "correct" implimention for non-GCC compilers. > > > -_start(char *arguments, ...) > > +_start(char *ap, ...) > > Why do we need to rename "arguments"? Presumably for consistency with the other crt1.c's. But ap is not a very good name, sepecially here -- it often means the varargs pointer, but that is not what it (starts as) here. The code uses a hand rolled version of va_arg() to handle "...". That probably wouldn't work on more complicated arches. The corresponding alpha code doesn't even use "...". That is more correct, since we don't have a normal varargs setup (which might have some args in registers) -- we have an array of "char **"'s which has been initialized using suword() to write a long into each char ** (this all assumes that longs can hold "char **"'s, and some other things. I'm surprised it works for i386's with 64-bit longs). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Thu Jun 27 13:12:15 2002 Delivered-To: freebsd-audit@freebsd.org Received: from dragon.nuxi.com (trang.nuxi.com [66.92.13.169]) by hub.freebsd.org (Postfix) with ESMTP id 99E4937B401; Thu, 27 Jun 2002 13:12:10 -0700 (PDT) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.4/8.12.2) with ESMTP id g5RKC9tL049240; Thu, 27 Jun 2002 13:12:09 -0700 (PDT) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.5/8.12.4/Submit) id g5RKC8PC049239; Thu, 27 Jun 2002 13:12:08 -0700 (PDT) Date: Thu, 27 Jun 2002 13:12:08 -0700 (PDT) Message-Id: <200206272012.g5RKC8PC049239@dragon.nuxi.com> To: audit@freebsd.org, obrien@freebsd.org, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, current@freebsd.org, jhb@freebsd.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-URL: http://gcc.gnu.org/cgi-bin/gnatsweb.pl X-Mailer: Lynx, Version 2.8.4rel.1 X-Personal_Name: : David O'Brien From: obrien@freebsd.org Subject: Re: optimization/6627: -fno-align-functions regression from 2.95 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG rth said at http://gcc.gnu.org/ml/gcc/2002-05/msg00989.html he would not raise the priority for 3.1.1. But this is a regression and I hope maybe something can be done about it. Maybe a fix based on a #define one must explicitly turn on when building GCC. I do not see why a fix cannot go in (in some form). If a C++ user asks for an alignment of `1' then give it to them -- since when has C/C++ been about not letting the user shoot their foot off? Or, can't the fix take into account that I am compiling C and not C++? This regression is still causing us problems in FreeBSD's boot code due to the larger size the code produces. I'm sure this could be an issue for some embedded users. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Thu Jun 27 13:28:20 2002 Delivered-To: freebsd-audit@freebsd.org Received: from vexpert.dbai.tuwien.ac.at (vexpert.dbai.tuwien.ac.at [128.130.111.12]) by hub.freebsd.org (Postfix) with ESMTP id 2D75737B401; Thu, 27 Jun 2002 13:28:17 -0700 (PDT) Received: from naos (naos [128.130.111.28]) by vexpert.dbai.tuwien.ac.at (8.11.6/8.11.6) with ESMTP id g5RKSDC04351; Thu, 27 Jun 2002 22:28:13 +0200 (MET DST) Date: Thu, 27 Jun 2002 22:28:10 +0200 (CEST) From: Gerald Pfeifer To: gcc-gnats@gcc.gnu.org, Cc: "David O'Brien" , , , Subject: Re: optimization/6627: -fno-align-functions regression from 2.95 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This *is* a regression (even if it may be hard to fix on the release branch), so I'm raising it's priority. Gerald To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sat Jun 29 5:37:54 2002 Delivered-To: freebsd-audit@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id 02D1937B400; Sat, 29 Jun 2002 05:37:48 -0700 (PDT) Date: Sat, 29 Jun 2002 05:37:47 -0700 From: Juli Mallett To: audit@FreeBSD.ORG, current@FreeBSD.ORG Cc: Poul-Henning Kamp , Kirk McKusick Subject: libufs, a library for dealing with UFS from userland. Message-ID: <20020629053747.A68232@FreeBSD.ORG> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Organisation: The FreeBSD Project X-Alternate-Addresses: , , , X-Affiliated-Projects: FreeBSD, xMach, ircd-hybrid-7 X-Towel: Yes X-LiveJournal: flata X-Negacore: Yes Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I'm trying to get review of something phk@ talked me into having a go at, libufs, which is a library to un-duplicate code for dealing with UFS on a raw disk device. Currently it defines a generic structure for UFS on any disk that one might want to refer to from the userland, including the UFS superblock, version, and the name and file descriptor for the device used to work with the disk. That structure is then used by implementations of block read/write (bread/bwrite), functions to read and write the superblock in a uufsd structure (sbread/sbwrite) and a function to get the inode structure for a given file. Here's a shell archive: http://people.freebsd.org/~jmallett/libufs.shar And here's diffs to dumpfs and tunefs: http://people.freebsd.org/~jmallett/libufs-dumpfs.diff http://people.freebsd.org/~jmallett/libufs-tunefs.diff To build (e.g. tunefs) with libufs, do something like: cd libufs make co /home/ncvs/src/sbin/tunefs.c,v cc tunefs.c -o libufs-tunefs -L. -lufs I get identical output from dumpfs and libufs-dumpfs currently and I can toggle softdep flags fine with tunefs. I'd like to commit this by the coming Tuesday as I will be out of town from Tuesday morning and will not have any way to further work on this, etc. Further functionality may/will be added to libufs, however this is a good "milestone" of abstraction, in my opinion, as it can replace code in a number of utilities, namely dump, dumpfs, tunefs, ffsinfo, growfs, and possibly one or two others, if I recall correctly. Architectural review, comments, and "feel free to commit" welcome :) Thanks, juli. -- Juli Mallett | FreeBSD: The Power To Serve Taking over the FreeBSD negaverse. | FreeBSD Negacore Team Will break world for fulltime employment. | finger jmallett@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sat Jun 29 6: 9:13 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 994B837B400; Sat, 29 Jun 2002 06:09:09 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6056843E06; Sat, 29 Jun 2002 06:09:09 -0700 (PDT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 26B91AE03F; Sat, 29 Jun 2002 06:09:09 -0700 (PDT) Date: Sat, 29 Jun 2002 06:09:09 -0700 From: Alfred Perlstein To: Juli Mallett Cc: audit@FreeBSD.ORG, current@FreeBSD.ORG, Poul-Henning Kamp , Kirk McKusick Subject: Re: libufs, a library for dealing with UFS from userland. Message-ID: <20020629130909.GF97638@elvis.mu.org> References: <20020629053747.A68232@FreeBSD.ORG> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020629053747.A68232@FreeBSD.ORG> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Juli Mallett [020629 05:38] wrote: > > I get identical output from dumpfs and libufs-dumpfs currently and I can > toggle softdep flags fine with tunefs. I'd like to commit this by the > coming Tuesday as I will be out of town from Tuesday morning and will not > have any way to further work on this, etc. The work is really nice, but the timing sounds rather bad, is there a way you can either commit it earlier or after you return from hiatus? -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sat Jun 29 6:31:28 2002 Delivered-To: freebsd-audit@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id 6612737B400; Sat, 29 Jun 2002 06:31:25 -0700 (PDT) Date: Sat, 29 Jun 2002 06:31:25 -0700 From: Juli Mallett To: Alfred Perlstein Cc: audit@FreeBSD.ORG, current@FreeBSD.ORG, Poul-Henning Kamp , Kirk McKusick Subject: Re: libufs, a library for dealing with UFS from userland. Message-ID: <20020629063125.A77565@FreeBSD.ORG> References: <20020629053747.A68232@FreeBSD.ORG> <20020629130909.GF97638@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020629130909.GF97638@elvis.mu.org>; from bright@mu.org on Sat, Jun 29, 2002 at 06:09:09AM -0700 Organisation: The FreeBSD Project X-Alternate-Addresses: , , , X-Affiliated-Projects: FreeBSD, xMach, ircd-hybrid-7 X-Towel: Yes X-LiveJournal: flata X-Negacore: Yes Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Alfred Perlstein escriuréres > The work is really nice, but the timing sounds rather bad, is there Thanks. > a way you can either commit it earlier or after you return from > hiatus? I can commit it a few weeks from now, or I can commit it five minutes from now. I just don't want it going in with any architectural deficiency hanging over its head, and so I wanted to give adequate time for review, if such seems necessary. Really I can commit while out of town, but if any changes need made because of said review, I wouldn't want to commit, as (as mentioned) I'll be unable to test (outside of compiles). Thanks again. -- Juli Mallett | FreeBSD: The Power To Serve Will break world for fulltime employment. | finger jmallett@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sat Jun 29 20:27:45 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A267D37B400; Sat, 29 Jun 2002 20:27:40 -0700 (PDT) Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1652D43E09; Sat, 29 Jun 2002 20:27:40 -0700 (PDT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.12.1/8.12.1) with ESMTP id g5U3RcwA152984; Sat, 29 Jun 2002 23:27:38 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20020629053747.A68232@FreeBSD.ORG> References: <20020629053747.A68232@FreeBSD.ORG> Date: Sat, 29 Jun 2002 23:27:37 -0400 To: Juli Mallett , audit@FreeBSD.ORG, current@FreeBSD.ORG From: Garance A Drosihn Subject: Re: libufs, a library for dealing with UFS from userland. Cc: Poul-Henning Kamp , Kirk McKusick Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang) Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 5:37 AM -0700 6/29/02, Juli Mallett wrote: >I get identical output from dumpfs and libufs-dumpfs currently >and I can toggle softdep flags fine with tunefs. I'd like to >commit this by the coming Tuesday as I will be out of town >from Tuesday morning and will not have any way to further >work on this, etc. When do you get back into town? If anyone asks for review on a Saturday, then I would hope that they'd wait until at least Monday evening before doing the commit. And I don't think the project should be too comfortable with the idea of developers making a commit just before they head out of town. Also, there was the big KSE commit this weekend, and it might be prudent to let that settle in for a few days. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sat Jun 29 20:36:46 2002 Delivered-To: freebsd-audit@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id 35F8137B400; Sat, 29 Jun 2002 20:36:42 -0700 (PDT) Date: Sat, 29 Jun 2002 20:36:42 -0700 From: Juli Mallett To: Garance A Drosihn Cc: audit@FreeBSD.ORG, current@FreeBSD.ORG, Poul-Henning Kamp , Kirk McKusick Subject: Re: libufs, a library for dealing with UFS from userland. Message-ID: <20020629203642.A9605@FreeBSD.ORG> References: <20020629053747.A68232@FreeBSD.ORG> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from drosih@rpi.edu on Sat, Jun 29, 2002 at 11:27:37PM -0400 Organisation: The FreeBSD Project X-Alternate-Addresses: , , , X-Affiliated-Projects: FreeBSD, xMach, ircd-hybrid-7 X-Towel: Yes X-LiveJournal: flata X-Negacore: Yes X-Warning: If you make me read stupid email, don't be surprised if I respond. If you don't want me to reply to something, don't send it to me. Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Garance A Drosihn escriuréres > At 5:37 AM -0700 6/29/02, Juli Mallett wrote: > >I get identical output from dumpfs and libufs-dumpfs currently > >and I can toggle softdep flags fine with tunefs. I'd like to > >commit this by the coming Tuesday as I will be out of town > >from Tuesday morning and will not have any way to further > >work on this, etc. > > When do you get back into town? Unknown. > If anyone asks for review on a Saturday, then I would hope > that they'd wait until at least Monday evening before doing > the commit. And I don't think the project should be too > comfortable with the idea of developers making a commit just > before they head out of town. Something which merely abstracts an interface out to a library is not too likely to cause problems beyond buildworld stuff, which is what I am concerned about having time in tree to spot. Aside from that, I want architectural comments, as that is the only thing where I feel improvement could be made. > Also, there was the big KSE commit this weekend, and it might > be prudent to let that settle in for a few days. I'm sure the two are orhtogonal. -- Juli Mallett | FreeBSD: The Power To Serve Will break world for fulltime employment. | finger jmallett@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message