|
发表于 2007-12-12 20:16:14
|
显示全部楼层
我提供个clue阿
zlibc就是实现了你说的这种方式,它是用重写了系统的某些函数,然后指定所有的文件打开的操作都先调用它的实现方法。
主要是这个东西:LD_PRELOAD
see the following statement:
This package overrides the "open" function (and other similar system call functions) of the C library. this package uses the LD_PRELOAD variable to redirect the dynamic linker to use the relevant functions of uncompress.o instead of the shared library. |
|