|
From: | hjl.tools at gmail dot com |
Subject: | [Bug gold/31830] New: error: y.o: multiple definition of 'foo' |
Date: | Fri, 31 May 2024 19:29:03 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=31830 Bug ID: 31830 Summary: error: y.o: multiple definition of 'foo' Product: binutils Version: 2.43 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gold Assignee: ccoutant at gmail dot com Reporter: hjl.tools at gmail dot com CC: ian at airs dot com Target Milestone: --- [hjl@gnu-tgl-3 gold-1]$ cat x.c extern __inline __attribute__((__gnu_inline__)) void foo(void) {} __attribute__((__symver__("foo@GLIBC_2.2.5"))) int __collector_foo_2_2(void) {} [hjl@gnu-tgl-3 gold-1]$ cat y.c void foo(void) {} [hjl@gnu-tgl-3 gold-1]$ cat x.t GLIBC_2.2.5 { global: foo; }; [hjl@gnu-tgl-3 gold-1]$ make gcc -B./ -O2 -fPIC -c -o x.o x.c gcc -B./ -O2 -fPIC -c -o y.o y.c ./ld --version-script=x.t -shared -o x.so x.o y.o ./ld: error: y.o: multiple definition of 'foo' ./ld: x.o: previous definition here make: *** [Makefile:13: x.so] Error 1 [hjl@gnu-tgl-3 gold-1]$ -- You are receiving this mail because: You are on the CC list for the bug.
[Prev in Thread] | Current Thread | [Next in Thread] |