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.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to