#134309 - silent_code - Thu Jul 12, 2007 12:49 pm
hi there!
i was wondering what i need to implement dynamic code loading. what i mean by dcl is e.g. ai routines, that don't have to be in memory all the time when the corresponding agents aren't in use and won't be for a long time (like when they aren't in a certain level).
i guess i have to use some relocation code (does the nds have a mmu? i remember the gba had one, but i'm not sure and too short on inet time for checking) etc.
but my biggest problem is: how can i generate a file that will contain executable code to be loaded on runtime? are these .elf or .o files? i really have next to no idea about compilers. i understand them and languages in general and how to use them in a way to get my stuff done, but that's it - i have no special knowledge about e.g. gcc.
furthermore, how can i access and alter (relocate) symbols?
you're welcome to give me tips and hints, it doesn't matter if it applies to c or c++ (just make a note to *what* i applies). alternatively you could also post a link to a tutorial or some online book or (legal) ebook (no money for real books atm) to read up on the topic.
otherwise i had to implement an interpreter, but i'd rather chose the way of native code.
thank you very much!
and remember, only a respectful post is a very good post, that can help a lot! ;^D
i was wondering what i need to implement dynamic code loading. what i mean by dcl is e.g. ai routines, that don't have to be in memory all the time when the corresponding agents aren't in use and won't be for a long time (like when they aren't in a certain level).
i guess i have to use some relocation code (does the nds have a mmu? i remember the gba had one, but i'm not sure and too short on inet time for checking) etc.
but my biggest problem is: how can i generate a file that will contain executable code to be loaded on runtime? are these .elf or .o files? i really have next to no idea about compilers. i understand them and languages in general and how to use them in a way to get my stuff done, but that's it - i have no special knowledge about e.g. gcc.
furthermore, how can i access and alter (relocate) symbols?
you're welcome to give me tips and hints, it doesn't matter if it applies to c or c++ (just make a note to *what* i applies). alternatively you could also post a link to a tutorial or some online book or (legal) ebook (no money for real books atm) to read up on the topic.
otherwise i had to implement an interpreter, but i'd rather chose the way of native code.
thank you very much!
and remember, only a respectful post is a very good post, that can help a lot! ;^D