From owner-freebsd-current Sun Mar 31 0: 2:44 2002 Delivered-To: freebsd-current@freebsd.org Received: from gull.prod.itd.earthlink.net (gull.mail.pas.earthlink.net [207.217.120.84]) by hub.freebsd.org (Postfix) with ESMTP id 08CE337B41C; Sun, 31 Mar 2002 00:02:37 -0800 (PST) Received: from pool0142.cvx22-bradley.dialup.earthlink.net ([209.179.198.142] helo=mindspring.com) by gull.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16raIL-00066T-00; Sun, 31 Mar 2002 00:02:34 -0800 Message-ID: <3CA6C280.F41FBB55@mindspring.com> Date: Sun, 31 Mar 2002 00:02:08 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Kris Kennaway Cc: "M. Warner Losh" , current@FreeBSD.org, peter@FreeBSD.org Subject: Re: stdout changes break some ports References: <20020324173513.A75429@xor.obsecurity.org> <20020324.184313.30925676.imp@village.org> <20020324175436.A75804@xor.obsecurity.org> <20020330224648.A93819@xor.obsecurity.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Kris Kennaway wrote: > How does one fix this in a library? I've been moving the > initialization to main() for applications. Use assembly glue to put it in a linker set that gets pulled in by the .init code. This will only work for user space code, since it depends in the crt0 treating it like a C++ binary (linker sets are a C++ feature which FreeBSD uses all over anyway). I'm not totally convinced this is really the way to fix this, since I'm not totally convinced that this isn't an introduced problem, rather than a real problem (e.g. perhaps the stdio changes were not completely and totally well thought out, if how to handle this problem wasn't part of the changes). If it's now a requirement, it's very tempting to put the code in the entry code, before it even calls "main" (e.g. in crt0 proper, rather than in a linker set crt0 knows about). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message