https://sourceware.org/bugzilla/show_bug.cgi?id=23591
H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |NEW CC| |hjl.tools at gmail dot com Version|unspecified |2.32 (HEAD) Target Milestone|--- |2.32 --- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> --- [hjl@gnu-cfl-1 pr23591]$ cat foo.S .section __sancov_cntrs,"aG",%progbits,foo1,comdat .long 0 .section .text,"axG",%progbits,foo1,comdat .globl foo1 .type foo1, @function foo1: .long 0 .section __sancov_cntrs,"aG",%progbits,foo2,comdat .long 1 .section .text,"axG",%progbits,foo2,comdat .globl foo2 .type foo2, @function foo2: .long 1 [hjl@gnu-cfl-1 pr23591]$ cat foo-auto.S .section .text,"axG",%progbits,foo1,comdat .globl foo1 .type foo1, @function foo1: .byte 0 [hjl@gnu-cfl-1 pr23591]$ cat x.c extern int __start___sancov_cntrs; int bar (void) { int* ap = &__start___sancov_cntrs; return ap[0]; } [hjl@gnu-cfl-1 pr23591]$ cat y.S .hidden __start___sancov_cntrs [hjl@gnu-cfl-1 pr23591]$ make gcc -B../ -fPIC -O2 -g -c -o x.o x.c gcc -B../ -fPIC -O2 -g -c -o y.o y.S gcc -B../ -fPIC -O2 -g -c -o foo-auto.o foo-auto.S gcc -B../ -fPIC -O2 -g -c -o foo.o foo.S ./ld -shared -o x.so x.o y.o foo-auto.o foo.o ./ld: x.o: in function `bar': /export/home/hjl/bugs/binutils/pr23591/x.c:7: undefined reference to `__start___sancov_cntrs' make: *** [Makefile:12: x.so] Error 1 [hjl@gnu-cfl-1 pr23591]$ make LD=ld.gold ld.gold -shared -o x.so x.o y.o foo-auto.o foo.o [hjl@gnu-cfl-1 pr23591]$ -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils