Blog

寒暑易节,始一反焉。—— 《愚公移山》

这里是我写技术博客的地方。


Code Models and Relocation Types

本文主要探讨 code models, relocation 与 relocation types。文章首先解释不同的 code models 如何影响编译器的代码生成,然后介绍 relocation 这一机制和常见的 relocation type。文章结合多个代码示例说明在不同场景下(如不同 code models 下的函数调用、全局变量访问)生成的汇编代码以及所使用的 relocation types。

C++26 Hazard Pointers

Hazard pointers 一直在我的 todo list 上,但是一直没有时间和机会深入研究。最近听了 Maged M. Michael 关于 hazard pointers 的分享,正好趁此机会学习下 hazard pointers,整理成一篇博客。

Learn Relocation by Debugging a HWASAN Linker Error

笔者在 Linux/AArch64 环境下使用 HWASAN 时,遇到一 “relocation R_AARCH64_ADR_PREL_PG_HI21 out of range” 链接错误,在分析解决该链接错误过程中对 linker relocation 以及 HWASAN 都有了更深的理解,因此将分析解决该链接错误的过程梳理总结形成此文。