From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <775b8d190601190905i49095f52ga631ff633adde974@mail.gmail.com> Date: Fri, 20 Jan 2006 04:05:42 +1100 From: Bruce Ellis To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] 5a and optimization In-Reply-To: <386F3D23-0B29-4781-B9AC-87DB921101B7@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <386F3D23-0B29-4781-B9AC-87DB921101B7@gmail.com> Topicbox-Message-UUID: e03bd076-ead0-11e9-9d60-3106f5b1d025 the mips compilers (at least 0c and ec etc.) support psuedo instrs (NOSCHED, SCHED i think) which really stops your low level code being screwed with. brucee On 1/20/06, Noah Evans wrote: > Yeah, I put it in l.s(probably should put it in rom.s but who knows). > The linker eats the text if I leave the branch in. So I put the > branch in a WORD and(thanks to Charles' advice) use -E to go to the > initial TEXT _rom section. > > Very true about the rom weirdness. > > Thank you very much for the advice. I really appreciate the support. > > Noah > > On Jan 20, 2006, at 12:49 AM, jmk@plan9.bell-labs.com wrote: > > > One way is to make it TEXT, e.g. the multiboot header and GDT stuff > > in /sys/src/9/pc/l.s. > > > > Agreed, the loaders don't make such things easy to do, but writing > > assembler and making odd format binaries is the exception, not the > > rule. > > > > --jim > > > > On Thu Jan 19 06:31:30 EST 2006, noah.evans@gmail.com wrote: > >> How do you keep the linker from optimizing away your rom headers and > >> other data? I had to put a noop in front of my first text section to > >> keep the linker from putting the main loop in front of it. I also had > >> to code the branch past the rom header in hex to keep the linker from > >> eating the header(it's unreachable). > >> > >> Best, > >> > >> Noah > >