Re: Baby X is bor nagain

Liste des GroupesRevenir à cl c  
Sujet : Re: Baby X is bor nagain
De : bc (at) *nospam* freeuk.com (bart)
Groupes : comp.lang.c
Date : 28. Jun 2024, 15:36:23
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v5mhp6$3cgtg$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Mozilla Thunderbird
On 28/06/2024 14:48, Scott Lurndal wrote:
bart <bc@freeuk.com> writes:
On 28/06/2024 04:30, Kaz Kylheku wrote:
On 2024-06-27, bart <bc@freeuk.com> wrote:
For most, PIC isn't a necessity.
>
Only because they use a virtual memory operating system which allows
every executable to be mapped to the same fixed address in its own
address space.
>
PIC never seemed to be a requirement during the 1980s and half the 90s.
But then OSes only ran one program a time.
 Interactive operating systems in 1967 (e.g. TSS8) were running
multiple programs at a time.
 
>
And when virtual addressing came along, and multiple programs could
co-exist at the same address, PIC wasn't really needed either.
 Virtual addressing has been part of computer systems since the 1960s.
 PIC is obviously necessary for any kind of shared code (shared object
or DLL) that gets loaded at different base addressses in different
processes.
I wouldn't call that PIC. On Windows, DLLs need base-relocation tables.
That means that if a line of code uses an absolute address, it will still be an absolute address after relocation, but the address is changed. (Although it can't turn a 32-bit address into a 64-bit one if the relocation is large.)
True PIC wouldn't need those relocation tables; it would avoid absolute addresses.
I'm not sure that different processes see DLLs at different addresses either. A new process using an existing DLL might as well use it at the same address.
Relocation is only needed if there is a clash: the process's start-up segments overlap the DLLs existing address, or it is loaded at a later point (via dlopen etc) when the address might be used for heap data by the new process.

Date Sujet#  Auteur
28 Jun 24 * Re: Baby X is bor nagain7Kaz Kylheku
28 Jun 24 +- Re: Baby X is bor nagain1Michael S
28 Jun 24 `* Re: Baby X is bor nagain5bart
28 Jun 24  +* Re: Baby X is bor nagain2bart
28 Jun 24  i`- Re: Baby X is bor nagain1bart
28 Jun 24  `* Re: Baby X is bor nagain2bart
28 Jun 24   `- Re: Baby X is bor nagain1Michael S

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal