Welcome! Log In Create A New Profile


Dynamic Linker

Posted by Alex 
Dynamic Linker
September 26, 2008 05:38AM
Well, I am going to try and make a Dynamic Linker, or what Microsoft calls, a "DLL", a "Dynamic Link Library". I think this will really keep apps small, and more tightly coded. I would appreciate some help, but I'll still try without. But I need to ask a question first:

Is there a function in the FAT library to just read a file directly, WITHOUT loading the entire file into RAM?

EDIT: fseek may do the trick, but does it load the entire file into RAM? I really don't want it to do that...

Edited 1 time(s). Last edit at 09/26/2008 06:20AM by Alex.
Re: Dynamic Linker
September 26, 2008 10:22AM
No, it doesn't automatically load the file into memory.

When you do fopen(), you get a file handle. Then you use fread() pointing to a buffer, and indicating how many bytes you want to read from the file. So you could open a file, only read the first 10 bytes and close it again
Re: Dynamic Linker
September 27, 2008 04:54AM
OK, well, I'm going to write a basic kernel for wii to make a Dynamic Loader, huh? Well, I'll take a look, and if it seems feasible and practical, I'll work on it. Also, will anybody actually use a Dynamic Loader?
Re: Dynamic Linker
September 27, 2008 05:35AM
Yeah, I would at least look into using it. It has to be end-user friendly though.
Re: Dynamic Linker
September 27, 2008 06:05AM
If the method was executed well (as pinball Wizard said, "end-user friendly") I'd probably use it. C++ support for classes, inheritance, etc. would be nice too :)
I guess the best thing to do would be to implement the standard dlfcn.h
Re: Dynamic Linker
September 27, 2008 10:45AM
I do not think that c++ will need any special attention here.
Re: Dynamic Linker
September 27, 2008 06:32PM
Hmmm... ok, I'll work on it. It'll take a while to do. Either I'm going to completely strip down the Linux kernel, or I'm going to make my own, to save space and mem. Anyway, I'll give you the progress as I go! Right now, I'm just deciding how to go about the kernel.
Re: Dynamic Linker
September 27, 2008 10:18PM
This ought to be interesting once it is finished.
Re: Dynamic Linker
September 28, 2008 08:36PM
YAY! Good news. I wqs mislead. Somebody told me I needed a kernel to be able to make a Dynamic Linker. But they were wrong! YAY!!!!! So, hopefully this won't take nearly as long...
Re: Dynamic Linker
October 03, 2008 02:32PM
Sounds like it's time to sit down with a good book. E.g.

Sorry, only registered users may post in this forum.

Click here to login