From owner-freebsd-audit Wed Jul 3 10:16: 1 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 13A8837B400 for ; Wed, 3 Jul 2002 10:15:58 -0700 (PDT) Received: from storm.FreeBSD.org.uk (storm.FreeBSD.org.uk [194.242.139.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08AD943E42 for ; Wed, 3 Jul 2002 10:15:53 -0700 (PDT) (envelope-from mark@grimreaper.grondar.org) Received: from storm.FreeBSD.org.uk (uucp@localhost [127.0.0.1]) by storm.FreeBSD.org.uk (8.12.5/8.12.5) with ESMTP id g63HFpCE079121 for ; Wed, 3 Jul 2002 18:15:51 +0100 (BST) (envelope-from mark@grimreaper.grondar.org) Received: (from uucp@localhost) by storm.FreeBSD.org.uk (8.12.5/8.12.5/Submit) with UUCP id g63HFpGa079120 for audit@FreeBSD.ORG; Wed, 3 Jul 2002 18:15:51 +0100 (BST) Received: from grimreaper.grondar.org (localhost [127.0.0.1]) by grimreaper.grondar.org (8.12.5/8.12.5) with ESMTP id g63HAjii001037 for ; Wed, 3 Jul 2002 18:10:45 +0100 (BST) (envelope-from mark@grimreaper.grondar.org) Message-Id: <200207031710.g63HAjii001037@grimreaper.grondar.org> To: audit@FreeBSD.ORG Subject: Re: lib/csu cleanup #2 - review please (commit candidate) References: <20020703095956.A8415@dragon.nuxi.com> In-Reply-To: <20020703095956.A8415@dragon.nuxi.com> ; from "David O'Brien" "Wed, 03 Jul 2002 09:59:56 PDT." Date: Wed, 03 Jul 2002 18:10:44 +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 > On Sun, Jun 30, 2002 at 08:24:21PM +0100, Mark Murray wrote: > > In response to some useful comments from Bruce and David, I've > > cleaned this up, tested it on i386-elf (on my laptop) and extended > > it to the other architectures a lot more (limited testing, so > > please help out!). > > But you didn't answer these questions: > > > 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. That would violate lint(1) POLA. I guess an option could be added at some stage to do this. > > -_start(char *arguments, ...) > > +_start(char *ap, ...) > > Why do we need to rename "arguments"? To make it the same as all the others. > > +extern int _DYNAMIC; > > +#pragma weak _DYNAMIC > > Why? IMO #pragma's should come as early as possible. > (#also sorts before `e'xtern) I put these in the same place in all files. Which way round they came, and exactly where they came was pot luck, really. > New questions: > > > -_start(char **ap, > > - void (*cleanup)(void), /* from shared loader */ > > - struct Struct_Obj_Entry *obj __unused, /* from shared loader */ > > - struct ps_strings *ps_strings __unused) > > +_start(char **ap, void (*cleanup)(void), ...) > > Why take a more exact prototype and definition to a lesser one? Because I could see no reason to clutter the file with unused structure declarations, just so that unused arguments could be instantiated. Call it a code cleanup. The code has been verified to work in a make world. > > - fptr rtld_cleanup; > > + fptr cleanup; > ... > > - rtld_cleanup = get_rtld_cleanup(); > > + cleanup = get_rtld_cleanup(); > > Why do we need to rename this? (you also have a ^I above) The ^I's have been fixed. The rtld_cleanup's were renamed to be the same as a similarly used variable in all the other files. > > diffs in i386-elf/crt1.c (Which I will commit separately; it > > has 4-space indents instead of tabs, and I'd like to fix that). > > Why? This is not abandoned code. Our practice is to leave existing > style alone when making small changes. Oops. Sorry. I already did this, as I thought it was uncontested. I can do the cleanups if you like. As I said in the explanation, I was reducing the diffs between all the versions of crt1.c as far as was sane/reasonable. I also discussed this with you in SF last time I was there. M -- o Mark Murray \_ O.\_ Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message