Don't skip weak symbols during ar creation
``` $ echo 'int __attribute__((__weak__)) f(void) { return 4; }' > w.c $ tcc -c w.c -o w.o $ tcc-old -ar rc w.a w.o; nm -s w.a # previous behaviour, not indexed w.o: 0000000000000000 W f $ ar rc w.a w.o; nm -s w.a # GNU binutils behaviour, indexed Archive index: f in w.o 0000000000000000 W f $ tcc-new rc w.a w.o; nm -s w.a # new behaviour, indexed Archive index: f in w.o 0000000000000000 W f ```
Please register or sign in to comment