With PA-RISC version linker provides the +afs flag to alias function symbols and GCC provides the -wrap option.
I am looking for a similar wrapper hook methodology to for HPUX 11iv3 Itanium. Any recommendation
HPUX 11iv3 does support the PA Risc linker option +afs, it is undocumented in 11iv3 so if you want to try it look at the PA Risc man pages.
There is a difference.
On IPF, if the definition is in the same translation unit as the reference, then binding is at compile time by default. This is the reverse case on PA (SOM and ELF).
When something is bound at compile time, the instruction sequence differs and binding does not take linkage table route. Probably this is the reason why +afs is undocumented on IPF.
But, if we use "-Bextern=symbol" compiler option then the compiler behavior is as on PA i.e. all references to the symbol will be through the linkage table and above test case will work on IPF as well.
But performance penalty will occur if -Bextern is applied to a symbol that is resolved in the same load module.