[PATCH] D40253: [ELF] Make tests with undefined symbols more explicit.
Igor Kudrin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 23 22:43:14 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL318939: [ELF] Make tests with undefined symbols more explicit. (authored by ikudrin).
Changed prior to commit:
https://reviews.llvm.org/D40253?vs=123592&id=124127#toc
Repository:
rL LLVM
https://reviews.llvm.org/D40253
Files:
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
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/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/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/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/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
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:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40253.124127.patch
Type: text/x-patch
Size: 2849 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171124/4d5bc1bb/attachment.bin>
More information about the llvm-commits
mailing list