[lld] r318939 - [ELF] Make tests with undefined symbols more explicit.
Igor Kudrin via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 23 22:42:32 PST 2017
Author: ikudrin
Date: Thu Nov 23 22:42:32 2017
New Revision: 318939
URL: http://llvm.org/viewvc/llvm-project?rev=318939&view=rev
Log:
[ELF] Make tests with undefined symbols more explicit.
Differential Revision: https://reviews.llvm.org/D40253
Modified:
lld/trunk/test/ELF/Inputs/shared3.s
lld/trunk/test/ELF/gnu-hash-table.s
lld/trunk/test/ELF/lto/shlib-undefined.ll
lld/trunk/test/ELF/progname.s
lld/trunk/test/ELF/undef-version-script.s
lld/trunk/test/ELF/weak-undef.s
Modified: lld/trunk/test/ELF/Inputs/shared3.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/shared3.s?rev=318939&r1=318938&r2=318939&view=diff
==============================================================================
--- lld/trunk/test/ELF/Inputs/shared3.s (original)
+++ lld/trunk/test/ELF/Inputs/shared3.s Thu Nov 23 22:42:32 2017
@@ -1,3 +1,3 @@
.global baz
-.type barz, @function
+.type baz, @function
baz:
Modified: lld/trunk/test/ELF/gnu-hash-table.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/gnu-hash-table.s?rev=318939&r1=318938&r2=318939&view=diff
==============================================================================
--- lld/trunk/test/ELF/gnu-hash-table.s (original)
+++ lld/trunk/test/ELF/gnu-hash-table.s Thu Nov 23 22:42:32 2017
@@ -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 @@ foo:
bar:
.weak zed
.global xyz
+.data
+ .dc.a baz
Modified: lld/trunk/test/ELF/lto/shlib-undefined.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/lto/shlib-undefined.ll?rev=318939&r1=318938&r2=318939&view=diff
==============================================================================
--- lld/trunk/test/ELF/lto/shlib-undefined.ll (original)
+++ lld/trunk/test/ELF/lto/shlib-undefined.ll Thu Nov 23 22:42:32 2017
@@ -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
Modified: lld/trunk/test/ELF/progname.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/progname.s?rev=318939&r1=318938&r2=318939&view=diff
==============================================================================
--- lld/trunk/test/ELF/progname.s (original)
+++ lld/trunk/test/ELF/progname.s Thu Nov 23 22:42:32 2017
@@ -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
Modified: lld/trunk/test/ELF/undef-version-script.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/undef-version-script.s?rev=318939&r1=318938&r2=318939&view=diff
==============================================================================
--- lld/trunk/test/ELF/undef-version-script.s (original)
+++ lld/trunk/test/ELF/undef-version-script.s Thu Nov 23 22:42:32 2017
@@ -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
Modified: lld/trunk/test/ELF/weak-undef.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/weak-undef.s?rev=318939&r1=318938&r2=318939&view=diff
==============================================================================
--- lld/trunk/test/ELF/weak-undef.s (original)
+++ lld/trunk/test/ELF/weak-undef.s Thu Nov 23 22:42:32 2017
@@ -28,3 +28,6 @@
.globl _start
_start:
+
+.data
+ .dc.a foo
More information about the llvm-commits
mailing list