diff --git a/articles/20220816-riscv-syscall-part4-vdso-implementation.md b/articles/20220816-riscv-syscall-part4-vdso-implementation.md index c71d482fcd0d1b4f1c3f6d789d8e33c4624ba70b..7a4d79aaa25d8561432834212ca93bd21b7fe977 100644 --- a/articles/20220816-riscv-syscall-part4-vdso-implementation.md +++ b/articles/20220816-riscv-syscall-part4-vdso-implementation.md @@ -717,7 +717,8 @@ struct link_map {...} 在 `_dl_sysdep_parse_arguments` 函数中,找到辅助向量的位置并作为参数传递给 `_dl_parse_auxv`。 -![auxvec memory layout][4] +![auxvec memory layout](images/riscv_syscall/auxvec.png) +(图片源自 LWN.net) 辅助向量在内存中的位置如上图所示,所以只要从栈顶开始,越过 argv(命令行参数)和 environ(环境变量)就能找到辅助向量的地址。 diff --git a/articles/images/riscv_syscall/auxvec.png b/articles/images/riscv_syscall/auxvec.png new file mode 100644 index 0000000000000000000000000000000000000000..bc3f1e8b1f9140d7024a96168087545488c2aadc Binary files /dev/null and b/articles/images/riscv_syscall/auxvec.png differ