Archived

This topic is now archived and is closed to further replies.

Kaellaar

Assembly Question

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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....

Share this post


Link to post
Share on other sites