![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ld
小刚真的皮
这个作者很懒,什么都没留下…
展开
-
链接,装载与库--“最小的程序“在64位系统下运行
在阅读《程序员的自我修养–链接装载与库》的第四章 静态链接 4.6.2最小的程序时,发现代码是基于linux32位系统的程序,无法在64位系统上编译和运行。 正确的64位程序应该为 代码 char *str = "Hello world!\n"; void print(){ asm("movq $13,%%rdx \n\t" "movq %0,%%rsi \n\t" ...原创 2019-08-27 21:40:06 · 205 阅读 · 0 评论 -
简单可执行文件
最小的可执行文件 使用write系统调用。 TinyHelloWorld.c char *str = "Hello world!\n"; void print(){char *str = "Hello world!\n"; void print(){ /* asm为嵌入式汇编关键词 syscall表示进行系统调用 rex表示系统调用号,1号为write调用 in...原创 2019-08-29 10:50:47 · 249 阅读 · 0 评论