[llvm-bugs] [Bug 28342] Make a symbol in two versions an error again

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Sep 13 00:10:36 PDT 2019


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

Fangrui Song <i at maskray.me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |i at maskray.me
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Fangrui Song <i at maskray.me> ---
After D64549/D64550/D65716

test/ELF/version-script-reassign.s summaries the linker differences.

# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
# RUN: echo '{ global: foo; };' > %tg.ver
# RUN: echo '{ local: foo; };' > %tl.ver
# RUN: echo '{ global: foo; local: *; };' > %tgl.ver
# RUN: echo 'V1 { global: foo; };' > %t1.ver
# RUN: echo 'V2 { global: foo; };' > %t2.ver
# RUN: echo 'V2 { global: notexist; local: f*; };' > %t2w.ver

## Note, ld.bfd errors on these cases.
# RUN: ld.lld -shared %t.o --version-script %tl.ver --version-script %t1.ver \
# RUN:   -o %t.so 2>&1 | FileCheck --check-prefix=LOCAL %s
# RUN: llvm-readelf --dyn-syms %t.so | FileCheck --check-prefix=LOCAL-SYM %s
# RUN: ld.lld -shared %t.o --version-script %tg.ver --version-script %t1.ver \
# RUN:   -o %t.so 2>&1 | FileCheck --check-prefix=GLOBAL %s
# RUN: llvm-readelf --dyn-syms %t.so | FileCheck --check-prefix=GLOBAL-SYM %s
# RUN: ld.lld -shared %t.o --version-script %tgl.ver --version-script %t1.ver \
# RUN:   -o %t.so 2>&1 | FileCheck --check-prefix=GLOBAL %s
# RUN: llvm-readelf --dyn-syms %t.so | FileCheck --check-prefix=GLOBAL-SYM %s

## Note, ld.bfd silently accepts this case.
# RUN: ld.lld -shared %t.o --version-script %t1.ver --version-script %t2.ver \
# RUN:   -o %t.so 2>&1 | FileCheck --check-prefix=V1-WARN %s
# RUN: llvm-readelf --dyn-syms %t.so | FileCheck --check-prefix=V1-SYM %s


I think it is probably not bad to consistently warn in these cases.

-- 
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/20190913/e10191b2/attachment.html>


More information about the llvm-bugs mailing list