Advertisement

Assembly Question

Started by October 05, 2000 10:37 PM
3 comments, last by Kaellaar 24 years, 3 months ago
Hello, This question is for someone whos is familiar with pentium assembly language (specifically instructions generated by ms vc++). When the compiler replaces the function call w/ the call instruction it calls an area in memory refered to as @ILT+0(or another displacement) Then if you go look at the memory location of @ILT it has a jmp to the area where the actual function code is. My question is what is "&ILT+XX". Thanks. Kaellaar ps I can post code examples if necessary
well I can''t tell you exacly what it is but it looks like some
sort of call to a system service... if your wanting to know exactly what that call is the exact out put will help greatly =)

The Great Milenko
The Great Milenko"Don't stick a pretzel up your ass, it might get stuck in there.""Computer Programming is findding the right wrench to hammer in the correct screw."
Advertisement
Hello.

That has nothing to do with the Pentium or Assemnly language, it is called a "jump table". I am not sure about how else it is used, but it at least is unsed in the case of DLLs you link to your application at compile time (using the DLLs respective .lib, instead of using "GetProcAddress").

The compiler tells the linker the applciation wants to call some functions in the DLL. The linker comverts thos calls to jumps to this "jump table" (which are actually pointing somewhere in space), where each function in the DLL has it''s own entry. At run time, the EXE loader updates the "jump table" to point to the correct addresses when the desired DLL is mapped onto the application memory map. In this way the EXE loader only has to setup the function addresses in on point instead hf having to scan the whole executable to setup the function addresses wherever they may be called.

Topgoro


We emphasize "gotoless" programming in this company, so constructs like "goto hell" are strictly forbidden.
We emphasize "gotoless" programming in this company, so constructs like "goto hell" are strictly forbidden.
are you sure it''s not just a regular old label? Since you can have a million functions, i''m sure the assembler assigns all kinds of weird lables to certain memory locations, maybe in numerical or in alphabetical order etc etc.
Yes, probably a jump table. Some compilers will optimize switch() statements into jump tables. Which might explain its existence if you haven''t specifically coded a jump table into the program....

This topic is closed to new replies.

Advertisement