Hello everyone,
I have a doubt reagarding these trampolines, When i was going through the details in an atricle named GCC-INTERNALS, It said that we have a macro with the following name TRAMPOLINE_ADJUST_ADDRESS (addr). The explaination to it said that this is used mainly to perform any machine-specific adjustment in the address of the trampoline. addr holds the address that was passed to INITIALIZE_TRAMPOLINE. In case the address to be used for a function call should be different from the address in which the template was stored, the different address should be assigned to addr. If this macro is not defined, addr will be used for function calls. If this macro is not defined, by default the trampoline is allocated as a stack slot. This default is right for most machines. The exceptions are machines where it is impossible to execute instructions in the stack area. On such machines, you may have to implement a separate stack, using this macro in conjunction with TARGET_ASM_FUNCTION_PROLOGUE and TARGET_ASM_FUNCTION_EPILOGUE. Now, the problem is with the lines in bold , that when TRAMPOLINE_INITIALIZE is used then at that time, where is the trampoline allocated. From whatever i understood, i> First the initialisation macro is used ii> then the tramp..._adjust_addr... is used. What if we dont define ii> then in that case during initialisation where would it be by default ? Also, these trampolines are doing two jobs, loading of the static chain regs jump to real addr of nested funcs This code is present on the stack by default. Can I have the pleasure to have a look at that piece of code at run time, ya this code is generated by gcc, any suggestions for getting to the code which is responsible for generating the code for these trampolines. -- Regards, Sandeep A candle loses nothing if it is used to light another one!