ld --wrap and zcat

Shaun Jackman sjackman@bcgsc.ca
Tue Aug 25 00:15:00 GMT 2009


fstream::open in libstdc++ calls fopen in libc. I'd like to use ld 
--wrap to hook the fopen call to call popen to decompress a .gz file 
using zcat. Is this possible with ld --wrap? From my experimentation, 
it seems not. Is this possible using LD_PRELOAD and dlsym?

Thanks,
Shaun



More information about the Binutils mailing list