23,125
社区成员
发帖
与我相关
我的任务
分享
$ cat o.c
#include<stdio.h>
int f(){
printf("hello\n");
return 2;
}
gcc -o o.o -c o.c
ar rc libmyobject.a o.o
cp libmyobject.a libmyobject.a.keep
ranlib libmyobject.a
-rw-rw-r-- 1 a a 1626 Oct 3 12:03 libmyobject.a.keep
-rw-rw-r-- 1 a a 1626 Oct 3 12:06 libmyobject.a
DESCRIPTION
ranlib generates an index to the contents of an archive and stores it in the archive. The index lists each symbol defined by a member of an archive that is a relocatable object file.