专栏名称: dotNET跨平台
专注于.NET Core的技术传播。在这里你可以谈微软.NET,Mono的跨平台开发技术。在这里可以让你的.NET项目有新的思路,不局限于微软的技术栈,横跨Windows,Linux 主流平台
今天看啥  ›  专栏  ›  dotNET跨平台

Rust musl/.NET-Glibc简析

dotNET跨平台  · 公众号  ·  · 2024-09-02 07:50
    

文章预览

点击上方 蓝字 江湖评谈 设为关注/星标 前言 先看下rust-glibc/musl再看下.net-glibc。 rust-glibc 从linux内核态到用户态的第一个函数: // https://elixir.bootlin.com/glibc/glibc-2.35/source/sysdeps/x86_64/start.S ENTRY (_start) /* Clearing frame pointer is insufficient, use CFI. */ cfi_undefined (rip) /* Clear the frame pointer. The ABI suggests this be done, to mark the outermost frame obviously. */   xorl %ebp, %ebp mov %RDX_LP, %R9_LP /* Address of the shared library termination function. */ # ifdef __ILP32__ mov (%rsp), %esi /* Simulate popping 4-byte argument count. */ add $ 4 , %esp # else popq %rsi /* Pop the argument count. */ # endif /* argv starts just at the current stack top. */ mov %RSP_LP, %RDX_LP /* Align the stack to a 16 byte boundary to follow the ABI. */ and $~ 15 , %RSP_LP /* Push garbage because we push 8 more bytes. */ pushq %rax /* Provide the highest stack ………………………………

原文地址:访问原文地址
快照地址: 访问文章快照
总结与预览地址:访问总结与预览