From owner-freebsd-current Mon Apr 5 18:59: 0 1999 Delivered-To: freebsd-current@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id 8CA151557C for ; Mon, 5 Apr 1999 18:58:58 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id SAA84557; Mon, 5 Apr 1999 18:56:56 -0700 (PDT) (envelope-from dillon) Date: Mon, 5 Apr 1999 18:56:56 -0700 (PDT) From: Matthew Dillon Message-Id: <199904060156.SAA84557@apollo.backplane.com> To: Brian Feldman Cc: current@FreeBSD.ORG Subject: Re: EGCS breaks what(1) References: Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG : Okay, let me be a little clearer ;) What(1) on the kernel no longer works :because previously, the :char sccs[] = { '@', '(', '#', ')' }; :char version[] = blahhhfoooooo; :Was contiguous. However, nowadays, nice EGCS pads 4 bytes (WHY?!?!) between :those. So it appears "@(#)\0\0\0\0FreeBSD....." in the binary. Of course, :strings are null-terminated... :P I don't know why EGCS does this! : : Brian Feldman _ __ ___ ____ ___ ___ ___ : green@unixhelp.org _ __ ___ | _ ) __| \ : FreeBSD: The Power to Serve! _ __ | _ \__ \ |) | : http://www.freebsd.org _ |___/___/___/ 'what' is broken. C does not impose any sort of address ordering restriction on globals or autos that are declared next to each other. While it is true that programmers regularly make assumptions in regards to the placement and alignment of fields in structures and the placement and alignment of arguments to procedures, it does not follow that programmers can make assumptions in regards to the placement and alignment of globals. EGCS is trying to optimize access to the array by aligning it, in order to reduce cache line burst-from-meory inefficiencies. It happens to break bad assumptions made in 'what'. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message