[llvm-bugs] [Bug 48820] New: .symver foo, foo at v1 is mishandled

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jan 20 08:04:21 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=48820

            Bug ID: 48820
           Summary: .symver foo, foo at v1 is mishandled
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: hjl.tools at gmail.com
                CC: i at maskray.me, llvm-bugs at lists.llvm.org,
                    smithp352 at googlemail.com

Created attachment 24403
  --> https://bugs.llvm.org/attachment.cgi?id=24403&action=edit
A testcase

[hjl at gnu-cfl-2 pr27210]$ make
gcc -g   -c -o main.o main.c
gcc -g -fPIC   -c -o bad.o bad.c
gcc  -shared -o libbad.so bad.o -Wl,--version-script=bad.v
gcc -g -fPIC   -c -o foo.o foo.c
gcc  -shared -o libfoo.so foo.o -Wl,--version-script=foo.v
gcc  -o x main.o libbad.so libfoo.so -Wl,-R,.
./x
[hjl at gnu-cfl-2 pr27210]$ make clean
rm -f *.o *.so foo
[hjl at gnu-cfl-2 pr27210]$ make LDFLAGS=-fuse-ld=lld
gcc -g   -c -o main.o main.c
gcc -g -fPIC   -c -o bad.o bad.c
gcc -fuse-ld=lld -shared -o libbad.so bad.o -Wl,--version-script=bad.v
gcc -g -fPIC   -c -o foo.o foo.c
gcc -fuse-ld=lld -shared -o libfoo.so foo.o -Wl,--version-script=foo.v
gcc -fuse-ld=lld -o x main.o libbad.so libfoo.so -Wl,-R,.
./x
make: *** [Makefile:7: all] Aborted (core dumped)
[hjl at gnu-cfl-2 pr27210]$ make clean
rm -f *.o *.so foo
[hjl at gnu-cfl-2 pr27210]$ make LDFLAGS=-fuse-ld=gold
gcc -g   -c -o main.o main.c
gcc -g -fPIC   -c -o bad.o bad.c
gcc -fuse-ld=gold -shared -o libbad.so bad.o -Wl,--version-script=bad.v
gcc -g -fPIC   -c -o foo.o foo.c
gcc -fuse-ld=gold -shared -o libfoo.so foo.o -Wl,--version-script=foo.v
gcc -fuse-ld=gold -o x main.o libbad.so libfoo.so -Wl,-R,.
./x
[hjl at gnu-cfl-2 pr27210]$

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210120/d98339c0/attachment.html>


More information about the llvm-bugs mailing list