|
From: | hjl.tools at gmail dot com |
Subject: | [Bug ld/23079] Multiple PREVAILING_DEF_IRONLY for a same symbol in an archive |
Date: | Thu, 19 Apr 2018 03:41:03 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=23079 --- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> --- Gold works only because it treats COMMON symbol like definition: address@hidden nolto]$ cat main.c #include <stdio.h> int igt_subtest_jmpbuf; int main () { printf ("igt_subtest_jmpbuf: %d\n", igt_subtest_jmpbuf); return 0; } address@hidden nolto]$ cat x.i int igt_subtest_jmpbuf = -1; address@hidden nolto]$ cat y.i int igt_subtest_jmpbuf = -2; address@hidden nolto]$ make gcc -c -o main.o main.c gcc -c -o x.o x.i gcc -c -o y.o y.i ar rcu -o libx.a x.o y.o gcc -o x main.o libx.a gcc -fuse-ld=gold -o y main.o libx.a ./x igt_subtest_jmpbuf: -1 address@hidden nolto]$ ./y igt_subtest_jmpbuf: 0 address@hidden nolto]$ -- You are receiving this mail because: You are on the CC list for the bug.
[Prev in Thread] | Current Thread | [Next in Thread] |