IFUNC question (MIPS)

Jack Carter Jack.Carter@imgtec.com
Thu Aug 1 17:52:00 GMT 2013


I have gotten ifunc to work for MIPS o32 and don't like the overhead of my solution.

My assumption is that the calls and references in the "resolver" function can be external to the a.out or dso that the "resolver" function resides. Is this true, or do we restrict what can be in the "resolver" function?

I currently make all ifunc entry points in the .dynsym be the .iplt stubs. This makes got and multigot work without any change and I don't have to worry about liblist order when the "resolver" routine is called. My fixed up real address is stored in the .ipltgot which is referenced by the iplt stub.

Let's say I am ifuncing memcpy(). The problem with this approach is that I have to go through the stub 
(currently 8 instructions) for every call to memcpy. It seems to be harsh overhead penalty.

When I put the resolver function address in the .dynsym and the resolver called functions external to its dso, the dynamic linker would sometimes error out because at symbol resolution time the defining dso may not have been loaded yet. If indeed we restrict all call references in the resolver routines to be local, then I could avoid the iplt most of the time, I think :-)

Am I missing something obvious here?

Thanks,

Jack



More information about the Binutils mailing list