Date: Mon, 5 Apr 1999 18:56:56 -0700 (PDT) From: Matthew Dillon <dillon@apollo.backplane.com> To: Brian Feldman <green@unixhelp.org> Cc: current@FreeBSD.ORG Subject: Re: EGCS breaks what(1) Message-ID: <199904060156.SAA84557@apollo.backplane.com> References: <Pine.BSF.4.05.9904052133460.42766-100000@janus.syracuse.net>
next in thread | previous in thread | raw e-mail | index | archive | help
: 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 <dillon@backplane.com> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904060156.SAA84557>