|
From: Tom H. <to...@co...> - 2011-08-11 23:31:51
|
On 11/08/11 20:27, Julian Seward wrote: > So my question: is it actually necessary to redirect ifunc functions? > Couldn't we just add normal redirections for all possible target addresses > that an ifunc could point at? Would that work? There surely can't > be more than a handful of (eg) strlen implementations in libc, can there? Obviously that would work, at least as long as the alternate functions that the ifunc selects from remain in the symbol table. The only issues are really those which Jakub pointed out to do with potentially increased maintenance in having to add new symbols, and the risk that the functions might disappear from the symbol table altogether some day. I wonder if maybe the answer is to go with your plan, but also to include you previous scheme of intercepting the ifunc call and directing it to a routine which returns the address of our replacement routine. Once you separate the defining of the replacement routines from the declaration of the mapping it might be easy to have a version of the macro that handles the declaration which also generates a simple wrapper routine which the ifunc can be redirected to? Tom -- Tom Hughes (to...@co...) http://compton.nu/ |