From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] dhog the corruptor! From: David Gordon Hogan MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-llsoepiuwxhceqitysoqwozpdu" Message-Id: <20011113230455.25131199B9@mail.cse.psu.edu> Date: Tue, 13 Nov 2001 18:04:46 -0500 Topicbox-Message-UUID: 21ac6fd6-eaca-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-llsoepiuwxhceqitysoqwozpdu Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Brucee's implementation just patches the call to point to the correct destination. You don't have to walk any machine code. The (modified) linker emits a known call instruction, and relocation information which says where it is and what symbol to patch it with. Symbol lookup is done in a highly controlled way. --upas-llsoepiuwxhceqitysoqwozpdu Content-Type: message/rfc822 Content-Disposition: inline Received: from mail.cse.psu.edu ([130.203.4.6]) by plan9; Tue Nov 13 18:00:21 EST 2001 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.23.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 1F21519A3A; Tue, 13 Nov 2001 18:00:12 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from guardian.apnic.net (guardian.apnic.net [203.37.255.100]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id B015D199DD for <9fans@cse.psu.edu>; Tue, 13 Nov 2001 17:59:34 -0500 (EST) Received: from hadrian.staff.apnic.net (hadrian.staff.apnic.net [192.168.1.1]) by guardian.apnic.net (8.9.3/8.9.3) with ESMTP id IAA11552 for <9fans@cse.psu.edu>; Wed, 14 Nov 2001 08:59:32 +1000 (EST) Received: from apnic.net (localhost [127.0.0.1]) by hadrian.staff.apnic.net (8.9.3/8.9.3) with ESMTP id IAA24455 for <9fans@cse.psu.edu>; Wed, 14 Nov 2001 08:59:29 +1000 (EST) X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: 9fans@cse.psu.edu Subject: Re: [9fans] dhog the corruptor! In-Reply-To: Message from anothy@cosym.net of "Tue, 13 Nov 2001 17:53:45 EST." <20011113225401.E945C199B9@mail.cse.psu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <24453.1005692369@apnic.net> From: George Michaelson Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.7 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Help: List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Wed, 14 Nov 2001 08:59:29 +1000 One thing I've often wondered about is why dynamic linking methods leave the indirect call around. I discussed this with a smarter person and he seemed to think the cost of walking the machinecode to find out the base call, and write in the binary the direct references was too high. But surely for inner-loop code, or critical frequent call code, it would be worth avoiding call(indirect-lookup(real-function-name(args...))) all the time? So would a plan9 with dynamic linkage live with stacks of indirection or does it straight-path to the real code? cheers -George -- George Michaelson | APNIC Email: ggm@apnic.net | PO Box 2131 Milton QLD 4064 Phone: +61 7 3367 0490 | Australia Fax: +61 7 3367 0482 | http://www.apnic.net --upas-llsoepiuwxhceqitysoqwozpdu--