Thread: why does c++ do function calls like this?

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    4

    why does c++ do function calls like this?

    I've just started playing around with a debugger and I've noticed that it c++ does function calls like this:

    00401052 call @ILT+0(function1) (00401005)

    @ILT+0(?function1@@YAXXZ):
    00401005 jmp function1 (004010a0)

    I was just wondering what the point of this is, i believe its called a jump table or something. Also what does "ILT" mean.

    Thanks,

    Simon

  2. #2
    Registered User
    Join Date
    Jun 2003
    Posts
    70
    It is called 'Name Mangling'.

    C++ compiler has to do it because to provide "Function Overloading". C++ allows different function having same names. So compile convert it to such above mentioned(in above post) names to identify each fuctions differently
    Chintan R Naik

  3. #3
    Registered User
    Join Date
    Nov 2002
    Posts
    4
    Visual C++ 6 and its just a completely normal function call from main(). I was just wondering why it calls the function in such an indirect way.

  4. #4
    Registered User
    Join Date
    Jun 2003
    Posts
    70

    >Visual C++ 6 and its just a completely normal function call from main().


    Hey.....man, sorry to say that I can't understand what do you want to say ?

    Can you please explain agian?
    Chintan R Naik

  5. #5
    Registered User
    Join Date
    Jul 2005
    Posts
    1
    ILT is the "Incremental Link Table" - you get this extra level of indirection when you have the "Link Incremantally" option set in the project settings. You won't get this in release builds or where you have this feature turned off.

  6. #6
    ---
    Join Date
    May 2004
    Posts
    1,379
    Quote Originally Posted by cr_naik

    Hey.....man, sorry to say that I can't understand what do you want to say ?

    Can you please explain agian?
    You are both as bad as each other

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Accurately detecting function calls
    By Mole42 in forum C Programming
    Replies: 5
    Last Post: 05-17-2009, 04:01 AM
  2. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  3. <Gulp>
    By kryptkat in forum Windows Programming
    Replies: 7
    Last Post: 01-14-2006, 01:03 PM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  5. C++ compilation issues
    By Rupan in forum C++ Programming
    Replies: 1
    Last Post: 08-22-2005, 05:45 AM