[[email protected] gwan]# file gwan
gwan: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, stripped
[[email protected] gwan]# ldd gwan
not a dynamic executable
[[email protected] gwan]# du -csh gwan
208K gwan
208K total
gwan是怎么做到的?不需要任何库的可执行文件,甚至libc?
作为一个Web服务器,它需要做套接字编程和许多其他繁重的工作,所有这些工作都需要与libc链接,但gwan似乎不是这样。这怎么可能?
你注意到它的尺寸有多小? –
@Je Rog:静态链接不是关于嵌入整个库,而只是使用的函数。 –
208K看起来很丰富,坦白地说,如果你遗漏了这个垃圾。托管第一个UNIX系统的PDP-7的最大RAM容量为144K。 –