From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <56a297000601310506p25f569c2x2a23d1c99b3b38bd@mail.gmail.com> Date: Tue, 31 Jan 2006 22:06:31 +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: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <6a1747e8e1b545a6b23612bdb1f8d776@vitanuova.com> Topicbox-Message-UUID: ed00120e-ead0-11e9-9d60-3106f5b1d025 Cool. Can you send me the fix via private mail? After reading the 9fans responses, I have a better handle on the problem. After a reading of a.out(10.6) I realized that I might have to use a bootstrap loader. Right now I'm just reading the rom directly from text(the GBA typically runs all of it's programs from rom) and there's no header(the gba needs a special rom header starting from 0x0, otherwise it won't boot). It makes it to main just fine, but no header is causing havoc with the data and bss sections. How are edata and end defined by the linker? You can't redefine them from your code, but given the current state of my code, if I could just intuit and change where the program thinks the data and bss are, it would be easy enough to memcpy them from rom where they need to go. Regarding the program and memory, I'm looking at: ksize igba.gba 359928t + 90992d + 54936b =3D 505856 igba.gba which should halfway work. Noah On 1/31/06, Charles Forsyth wrote: > > on the ARM, though, the compiler could > > put strings in the text segment easily enough > > i really meant the linker, but never mind. it misses a trick and doesn't= do it > by default. the -t option enables it, but in the Inferno 5l that does th= umb > as well, that sadly enables some debugging (`t'humb). silly oversight. > fixed. > >