Dan Sugalski <[EMAIL PROTECTED]> writes:
>At 07:32 PM 8/29/00 +0000, Nick Ing-Simmons wrote:
>>David L . Nicol <[EMAIL PROTECTED]> writes:
>> >
>> >Did I not just describe how a .so or a DLL works currently?
>>
>>And behind the scenes that does something akin to:
>>
>>int fd = open("file_of_posn_indepenant_byte_code",O_RDONLY);
>>struct stat st;
>>fstat(fd,&st);
>>code_t *code = mmap(NULL,st.st_len,PROT_READ,MAP_SHARED,fd,0);
>>close(fd);
>
>Don't forget the fixup work that needs to be done afterwards. Loading the
>library into memory's only the first part--after that the loader needs to
>twiddle with transfer vectors and such so the unresolved calls into the
>routines in the newly loaded library get resolved.
I finessed the "fixup work" by saying "position independant byte code".
The fixups break the shareability of the pages which is why you compile
shared libs -fPIC. So we should strive to have minimal fixups and
collect them in one place (which vtables do very nicely).
--
Nick Ing-Simmons
- Re: the C JIT David L. Nicol
- Re: the C JIT Ken Fox
- Re: the C JIT David L. Nicol
- Re: the C JIT Ken Fox
- Re: the C JIT David L. Nicol
- Re: the C JIT Uri Guttman
- Re: the C JIT John Porter
- Re: the C JIT John Porter
- Re: the C JIT John Porter
- Re: RFC 155 - Remove geometric functions from core Russ Allbery
- Re: RFC 155 - Remove geometric functions from core Nick Ing-Simmons
- Re: RFC 155 - Remove geometric functions from core Sam Tregar
- Re: RFC 155 - Remove geometric functions from core Nick Ing-Simmons
- Re: RFC 155 - Remove geometric functions from core Tom Christiansen
- Re: RFC 155 - Remove geometric functions from core Uri Guttman
- Re: RFC 155 - Remove geometric functions from core Jarkko Hietaniemi
- Re: RFC 155 - Remove geometric functions from core Tom Christiansen
- Re: RFC 155 - Remove geometric functions from core Jarkko Hietaniemi
- Re: RFC 155 - Remove geometric functions from core Uri Guttman
- Re: RFC 155 - Remove geometric functions from core Jarkko Hietaniemi
- Re: RFC 155 - Remove geometric functions from core Tom Christiansen
