From owner-freebsd-hackers Sun May 19 22:21:53 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from 12-234-96-171.client.attbi.com (12-234-96-171.client.attbi.com [12.234.96.171]) by hub.freebsd.org (Postfix) with ESMTP id 7E63337B40E for ; Sun, 19 May 2002 22:21:50 -0700 (PDT) Received: by 12-234-96-171.client.attbi.com (Postfix, from userid 1000) id 42097A900; Sun, 19 May 2002 22:20:48 -0700 (PDT) Date: Sun, 19 May 2002 22:20:48 -0700 From: Jonathan Mini To: "E.B. Dreger" Cc: freebsd-hackers@freebsd.org Subject: Re: any file --> symbol in .o file Message-ID: <20020519222048.L25907@stylus.haikugeek.com> Mail-Followup-To: "E.B. Dreger" , freebsd-hackers@freebsd.org References: <20020519214105.K25907@stylus.haikugeek.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from eddy+public+spam@noc.everquick.net on Mon, May 20, 2002 at 04:54:41AM +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG E.B. Dreger [eddy+public+spam@noc.everquick.net] wrote : > I guess I'll run with that for now. Off the top of my head, the > only feature file2c can't provide is user-specified data > alignment. (Unless, of course, someone corrects me and alerts me > to a C preprocessor directive similar to assembly's ".align".) > How about putting the aligned data into a structure? gcc will align the fields of the structure intelligenetly, at least. You'll need to put padding on the end of the structure so that each struct will be properly aligned, but that's no big deal. Gcc will do the right thing when it sees a large const like that, and align the whole thing in .data. If you want specific aligment, you could then use gcc's __alignment__((n)) attribute. It's not portable, but the same alignment doesn't always make sense on different platforms anyways. -- Jonathan Mini http://www.haikugeek.com "He who is not aware of his ignorance will be only misled by his knowledge." -- Richard Whatley To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message