From mint-bounce@lists.fishpool.fi Sun Oct 31 01:30:03 2004 X-Original-To: fnaumann@mail.boerde.de Delivered-To: fnaumann@mail.boerde.de From: Henk Robbers To: mint@fishpool.com Subject: Re: [MiNT] Shareable/loadable libraries: a preliminary document Date: Sun, 31 Oct 2004 02:13:38 +0200 User-Agent: KMail/1.5.1 References: <20041029210939.1d32bc21.mandin.patrice@wanadoo.fr> <20041030211600.422fdada.mandin.patrice@wanadoo.fr> <0322B8A2-2AB7-11D9-91AD-00039357F826@epfl.ch> In-Reply-To: <0322B8A2-2AB7-11D9-91AD-00039357F826@epfl.ch> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200410310213.39127.h.robbers@chello.nl> X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-To: mint-bounce@lists.fishpool.fi X-original-sender: h.robbers@chello.nl Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: X-Virus-Scanned: by amavisd-new at relay.boerde.de X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on relay.boerde.de X-Spam-Status: Yes, hits=6.2 tagged_above=-50.5 required=3.8 tests=AWL, BAYES_00, RAZOR2_CF_RANGE_51_100, RAZOR2_CHECK, RCVD_IN_SORBS X-Spam-Level: ****** X-Spam-Flag: YES On Saturday 30 October 2004 23:02, Philipp Donzé wrote: Hi Philipp PC relative addressing is only used by PC for jumps and calls, which you have to switch off anyhow for larger programs. For text, data and bss, it uses the 'area' concept. An area is a piece of memory that can not be split further due to the use of displacements without fix up information. Functions are each put in their own area. Constant data, anonymous data (literals) normal data and bss can be put in any number of areas. Addressing of data and bss is done by loading the address of the area in a register und use d(An) mode to access its parts. The loading of the address is done by using long absolute mode, in the object file accompanied by a fixup pointing to its name or internal identification. The function of the linker is to pick up all referenced areas and put them together in their target segment (TEXT, DATA BSS) Then all fixable references are fixed up. In a paged envireonment the loader can of course fill up pages with areas of the same target. It is this 'area' concept that eliminates the need for a difference between a object file and a library in Pure C. I like it :-) > To avoid this problem you can simply forbidd the usage of PC relative > addressing modes. IMO a bad solution! Within a single text area PC relative can be maintained. -- Groeten; Regards. Henk Robbers. mailto:h.robbers@chello.nl http://members.ams.chello.nl/h.robbers/Home.html Interactive disassembler: TT-Digger; http://digger.atari.org A Home Cooked teXt editor: AHCX