Index: lld/trunk/test/ELF/Inputs/shared3.s =================================================================== --- lld/trunk/test/ELF/Inputs/shared3.s +++ lld/trunk/test/ELF/Inputs/shared3.s @@ -1,3 +1,3 @@ .global baz -.type barz, @function +.type baz, @function baz: Index: lld/trunk/test/ELF/gnu-hash-table.s =================================================================== --- lld/trunk/test/ELF/gnu-hash-table.s +++ lld/trunk/test/ELF/gnu-hash-table.s @@ -1,6 +1,6 @@ # REQUIRES: x86,ppc -# RUN: echo ".globl foo" > %te.s +# RUN: echo ".globl foo; .data; .dc.a foo" > %te.s # RUN: llvm-mc -filetype=obj -triple=i386-pc-linux %te.s -o %te-i386.o # RUN: llvm-mc -filetype=obj -triple=i386-pc-linux %s -o %t-i386.o # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t-x86_64.o @@ -244,3 +244,5 @@ bar: .weak zed .global xyz +.data + .dc.a baz Index: lld/trunk/test/ELF/lto/shlib-undefined.ll =================================================================== --- lld/trunk/test/ELF/lto/shlib-undefined.ll +++ lld/trunk/test/ELF/lto/shlib-undefined.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: echo .global __progname > %t2.s +; RUN: echo ".global __progname; .data; .dc.a __progname" > %t2.s ; RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %t2.s -o %t2.o ; RUN: ld.lld -shared %t2.o -o %t2.so ; RUN: ld.lld -o %t %t.o %t2.so Index: lld/trunk/test/ELF/progname.s =================================================================== --- lld/trunk/test/ELF/progname.s +++ lld/trunk/test/ELF/progname.s @@ -1,6 +1,6 @@ // REQUIRES: x86 // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o -// RUN: echo .global __progname > %t2.s +// RUN: echo ".global __progname; .data; .dc.a __progname" > %t2.s // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %t2.s -o %t2.o // RUN: ld.lld -shared %t2.o -o %t2.so // RUN: ld.lld -o %t %t.o %t2.so Index: lld/trunk/test/ELF/undef-version-script.s =================================================================== --- lld/trunk/test/ELF/undef-version-script.s +++ lld/trunk/test/ELF/undef-version-script.s @@ -3,9 +3,6 @@ # RUN: ld.lld --version-script %t.script -shared %t.o -o %t.so # RUN: llvm-readobj -dyn-symbols %t.so | FileCheck %s -# This does not match gold's behavior because gold does not create undefined -# symbols in dynsym without an appropriate (e.g. PLT) relocation in the input. - # CHECK: DynamicSymbols [ # CHECK-NEXT: Symbol { # CHECK-NEXT: Name: @ @@ -38,3 +35,6 @@ .global foo .weak bar +.data + .dc.a foo + .dc.a bar Index: lld/trunk/test/ELF/weak-undef.s =================================================================== --- lld/trunk/test/ELF/weak-undef.s +++ lld/trunk/test/ELF/weak-undef.s @@ -28,3 +28,6 @@ .globl _start _start: + +.data + .dc.a foo