From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <56a297000601302135j778614c3r1ba9751ffa557cff@mail.gmail.com> Date: Tue, 31 Jan 2006 14:35:30 +0900 From: Noah Evans To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] Data segment vs BSS In-Reply-To: <98cca1d3171d88afdc40c9a1c4ff0e62@plan9.bell-labs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <98cca1d3171d88afdc40c9a1c4ff0e62@plan9.bell-labs.com> Topicbox-Message-UUID: ecb93e7e-ead0-11e9-9d60-3106f5b1d025 Hmmmmm... it will require a lot of work understanding the linker, but if I end up running out of memory, I might see if I can get the const keyword to throw those variables in the text section and avoid the problem altogether. What do you think? Noah On 1/31/06, jmk@plan9.bell-labs.com wrote: > The normal Plan 9 binary format assumes the BSS starts immediately > after the data, there is no place in the header to specify otherwise. > So, you want to use a different header format, e.g. ELF or one of > the machine-specific boot formats, see /sys/src/cmd/?l/asm.c for > examples. There may be one there already that suits, or you can easily > add another for your particular environment. > > But how do you separate out the constant data? > > On Mon Jan 30 23:36:55 EST 2006, noah.evans@gmail.com wrote: > > Hey, quick 2l question. Is there any way to keep constant values in > > ROM? If possible I'd like to keep the data section entirely in ROM > > and only keep the BSS section in RAM. However, both sections seem to > > be inextricably linked. > > > > What's the proper way to deal with this? > > > > Noah >