某些Unix共享库在从命令行调用时提供输出,就像它们是可执行文件一样.例如:
$ /lib/libc.so.6
GNU C Library stable release version 2.13, by Roland McGrath et al.
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.5.2.
Compiled on a Linux 2.6.37 system on 2011-01-18.
[...]
Run Code Online (Sandbox Code Playgroud)
在我用C语言编写的共享库中,如何提供此输出?我现在已经执行了一个我刚刚创建的库,并且我遇到了一个段错误.
注意:我之前在unix.stackechange.com上问过这个问题 https://unix.stackexchange.com/questions/7066/executing-a-shared-library