[lld] 72ffc14 - [ELF][test] Delete unneeded binding directive (.weak or .globl)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 25 23:36:09 PDT 2020


Author: Fangrui Song
Date: 2020-03-25T23:34:46-07:00
New Revision: 72ffc14e13b85fd95c1ffeec22e050b27249264d

URL: https://github.com/llvm/llvm-project/commit/72ffc14e13b85fd95c1ffeec22e050b27249264d
DIFF: https://github.com/llvm/llvm-project/commit/72ffc14e13b85fd95c1ffeec22e050b27249264d.diff

LOG: [ELF][test] Delete unneeded binding directive (.weak or .globl)

Future MC may error for a changed symbol binding.
This may be a preferred resolution to https://bugs.llvm.org/show_bug.cgi?id=38921

See https://sourceware.org/pipermail/binutils/2020-March/110399.html

Added: 
    

Modified: 
    lld/test/ELF/Inputs/copy-rel.s
    lld/test/ELF/lazy-arch-conflict.s
    lld/test/ELF/relocation-relative-weak.s
    lld/test/ELF/znotext-weak-undef.s

Removed: 
    


################################################################################
diff  --git a/lld/test/ELF/Inputs/copy-rel.s b/lld/test/ELF/Inputs/copy-rel.s
index e6714943019c..bcfc7a58a33f 100644
--- a/lld/test/ELF/Inputs/copy-rel.s
+++ b/lld/test/ELF/Inputs/copy-rel.s
@@ -1,4 +1,4 @@
-.globl foo, bar
+.globl foo
 .type foo, @object
 .size foo, 4
 foo:

diff  --git a/lld/test/ELF/lazy-arch-conflict.s b/lld/test/ELF/lazy-arch-conflict.s
index e17c301798f1..991476c5d6ec 100644
--- a/lld/test/ELF/lazy-arch-conflict.s
+++ b/lld/test/ELF/lazy-arch-conflict.s
@@ -1,6 +1,6 @@
 # REQUIRES: x86
 
-# RUN: echo '.globl foo; .weak foo; .quad foo;' | llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o %t64.o
+# RUN: echo '.weak foo; .quad foo;' | llvm-mc -filetype=obj -triple=x86_64 - -o %t64.o
 # RUN: echo '.globl foo; foo:' | llvm-mc -filetype=obj -triple=i686-pc-linux - -o %t32.o
 # RUN: not ld.lld %t64.o --start-lib %t32.o --end-lib -o /dev/null 2>&1 | FileCheck %s
 

diff  --git a/lld/test/ELF/relocation-relative-weak.s b/lld/test/ELF/relocation-relative-weak.s
index 5ae5d1df7f74..18dcb0530a9c 100644
--- a/lld/test/ELF/relocation-relative-weak.s
+++ b/lld/test/ELF/relocation-relative-weak.s
@@ -12,6 +12,5 @@
 .globl _start
 _start:
 
-.globl w
 .weak w
 call w at PLT

diff  --git a/lld/test/ELF/znotext-weak-undef.s b/lld/test/ELF/znotext-weak-undef.s
index d1e1e209ef0e..ad9fb9e2b337 100644
--- a/lld/test/ELF/znotext-weak-undef.s
+++ b/lld/test/ELF/znotext-weak-undef.s
@@ -8,8 +8,6 @@
 # EXE:      Relocations [
 # EXE-NEXT: ]
 
-.text
-.global foo
 .weak foo
 
 _start:


        


More information about the llvm-commits mailing list