On Mon, 07 Dec 2009 15:24:51 +0100, Oleg Nesterov wrote: > But. &raise_sigusr2 is not equal to the "actual" address of &raise_sigusr2(), > this value points to the "thunk" (I do not know the correct English term)
ppc64 calls it "function descriptor" (GDB ppc64_linux_convert_from_func_ptr_addr): For PPC64, a function descriptor is a TOC entry, in a data section, which contains three words: the first word is the address of the function, the second word is the TOC pointer (r2), and the third word is the static chain value. (gdb) x/8gx 0x805b6f6258 0x805b6f6258 <open>: 0x000000805b65cf68 0x000000805b702ac0 0x805b6f6268 <open64>: 0x000000805b65d010 0x000000805b702ac0 (gdb) x/20i 0x000000805b65cf68 0x805b65cf68 <.__GI___open>: lwz r10,-30432(r13) 0x805b65cf6c <.__GI___open+4>: cmpwi r10,0 0x805b65cf70 <.__GI___open+8>: bne- 0x805b65cf84 <.__GI___open+28> (gdb) info sym 0x000000805b702ac0 last_nip in section .bss I was not aware there is any "third word" before and I do not see it there. Regards, Jan