Files
clang-p2996/lld/test/ELF/weak-undef-lib.s
Rui Ueyama 6de1e858a1 Fix an issue that weak bit is dropped when there's a lazy object symbol.
Previously, we accidentally dropped STB_WEAK bit from an undefined symbol
if there is a lazy object symbol with the same name. That caused a
compatibility issue with GNU gold.

llvm-svn: 325316
2018-02-16 04:27:46 +00:00

20 lines
507 B
ArmAsm

# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
# RUN: echo -e '.globl foo\nfoo: ret' | \
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux - -o %t2.o
# RUN: ld.lld -shared -o %t.so %t1.o --start-lib %t2.o
# RUN: llvm-readobj -dyn-symbols %t.so | FileCheck %s
# CHECK: Name: foo
# CHECK-NEXT: Value: 0x0
# CHECK-NEXT: Size: 0
# CHECK-NEXT: Binding: Weak
# CHECK-NEXT: Type: None
# CHECK-NEXT: Other: 0
# CHECK-NEXT: Section: Undefined
.weak foo
.data
.quad foo