zookeeper 的应用场景
zookeeper 是一个开源的分布式协调服务框架,为分布式系统提供一致性服务
一、数据发布/订阅
当某些数据由几个机器共享,且这些信息经常变化、数据量小的时候,这些数据就适合存储在 zookeeper 中
- 数据存储:将数据存储到 Zookeeper 上的一个数据节点
- 数据获取:应用在启动初始化时,从 Zookeeper 数据节点读取数据,并在该节点上注册一个 Watcher 用来监听数据变更
ELF文件解析:
1 | https://www.cnblogs.com/jiqingwu/p/elf_format_research_01.html |
Linux 动态链接为什么要用 PLT 和 GOT 表:https://www.zhihu.com/question/21249496
dlsym 内部可能使用 calloc 分配内存。如果 hook calloc 的时候,使用 dlsym 可能会导致出现死循环。
如下是一种解决方案:
1 | /** |
hook so库:https://github.com/esrrhs/hookso
hook framework 库:https://github.com/asLody/whale
linux 下 got 表 hook:https://github.com/smartdone/linux_x86_got_hook
xhook android 平台 ELF 和 PLT 的 hook 库:
1 | https://github.com/iqiyi/xHook |
malloc_hook 方法:
1 | https://stackoverflow.com/questions/17803456/an-alternative-for-the-deprecated-malloc-hook-functionality-of-glibc/17850402#17850402 |
获取函数的返回地址或帧地址:https://gcc.gnu.org/onlinedocs/gcc/Return-Address.html
MEM_debug:https://github.com/itaych/MEM_debug
hook 库
1 | x86/64 hook库: |
微信的 IO hook 的文章:https://github.com/Tencent/matrix/wiki/Matrix-Android-IOCanary
ELF PLT hook 原理简述:https://juejin.cn/post/6914466700159090701