From: Gerd Stolpmann <gerd@gerd-stolpmann.de>
To: John Max Skaller <skaller@ozemail.com.au>, fabrice.le_fessant@inria.fr
Cc: Vitaly Lugovsky <vsl@ontil.ihep.su>, caml-list@inria.fr
Subject: Re: Dynamic loading. Again.
Date: Thu, 30 Nov 2000 21:55:31 +0100 [thread overview]
Message-ID: <00113022255301.00625@ice> (raw)
In-Reply-To: <3A25FB93.AD27098B@ozemail.com.au>
On Thu, 30 Nov 2000, John Max Skaller wrote:
>Fabrice Le Fessant wrote:
>>
>> Last year, Mark Hayden and I did some work on dynamic linking of
>> native code for Linux. It worked, with few modifications in the
>> compiler to generate relocatable code in the ELF format, but the code
>> was really big (something like twice the normal size) and really slow
>> (about twice slower).
>
> Do you know why it was slower??
>
> Normally, static and load time linkage produce identical code,
>and the code doesn't have to be position independent: any code can
>be shared, and have distinct per process data at the same virtual
>address. Absolute addresses are relocated by patching once at load time.
As far as I know, ELF executables do not patch the code directly because this
would have the disadvantage that the text segments could not be shared by
several processes (it is unlikely that two processes load the same library at
the same start address). There are several sections at the beginning of the
library containing the addresses of the resolved symbols; only these sections
are patched. As far as I remember one of these special sections contains small
stubs implementing jumps and calls to other libraries, and another section is a
table of addresses of foreign variables. The text segment must be
position-independent.
>What's usually required is segmentation (splitting the code into
>executable
>and data segments).
>
>{I think all this stinks, and is a result of using a stupid language
>like C
>for systems programming .. but that's another story]
It's assembly language.
Gerd
--
----------------------------------------------------------------------------
Gerd Stolpmann Telefon: +49 6151 997705 (privat)
Viktoriastr. 100
64293 Darmstadt EMail: gerd@gerd-stolpmann.de
Germany
----------------------------------------------------------------------------
next prev parent reply other threads:[~2000-12-03 22:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-26 0:09 Vitaly Lugovsky
2000-11-28 1:27 ` John Max Skaller
2000-11-29 16:42 ` Fabrice Le Fessant
2000-11-30 7:02 ` John Max Skaller
2000-11-30 16:08 ` Fabrice Le Fessant
2000-12-01 12:59 ` John Max Skaller
2000-12-01 14:24 ` Fabrice Le Fessant
2000-12-01 16:49 ` John Max Skaller
2000-12-04 21:06 ` Gerd Stolpmann
2000-11-30 18:00 ` Chris Hecker
2000-12-01 13:34 ` John Max Skaller
2000-11-30 20:55 ` Gerd Stolpmann [this message]
2000-11-28 11:14 Ken Wakita
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=00113022255301.00625@ice \
--to=gerd@gerd-stolpmann.de \
--cc=caml-list@inria.fr \
--cc=fabrice.le_fessant@inria.fr \
--cc=skaller@ozemail.com.au \
--cc=vsl@ontil.ihep.su \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox