summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/ARM
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-08-19 06:17:30 +0000
committerFangrui Song <maskray@google.com>2019-08-19 06:17:30 +0000
commit38426c114f6e50f8638bdd656f2f423151bc8eca (patch)
tree378fd850c1275e140d0662509282f3facf79b1dc /llvm/test/MC/ARM
parentebb7ddc6330b28b8c7e53d4c68d3684c127a41c1 (diff)
downloadbcm5719-llvm-38426c114f6e50f8638bdd656f2f423151bc8eca.tar.gz
bcm5719-llvm-38426c114f6e50f8638bdd656f2f423151bc8eca.zip
[MC] Don't emit .symver redirected symbols to the symbol table
GNU as keeps the original symbol in the symbol table for defined @ and @@, but suppresses it in other cases (@@@ or undefined). The original symbol is usually undesired: In a shared object, the original symbol can be localized with a version script, but it is hard to remove/localize in an archive: 1) a post-processing step removes the undesired original symbol 2) consumers (executable) of the archive are built with the version script Moreover, it can cause linker issues like binutils PR/18703 if the original symbol name and the base name of the versioned symbol is the same (both ld.bfd and gold have some code to work around defined @ and @@). In lld, if it sees f and f@v1: --version-script =(printf 'v1 {};') => f and f@v1 --version-script =(printf 'v1 { f; };') => f@v1 and f@@v1 It can be argued that @@@ added on 2000-11-13 corrected the @ and @@ mistake. This patch catches some more multiple version errors (defined @ and @@), and consistently suppress the original symbol. This addresses all the problems listed above. If the user wants other aliases to the versioned symbol, they can copy the original symbol to other symbol names with .set directive, e.g. .symver f, f@v1 # emit f@v1 but not f into .symtab .set f_impl, f # emit f_impl into .symtab llvm-svn: 369233
Diffstat (limited to 'llvm/test/MC/ARM')
-rw-r--r--llvm/test/MC/ARM/arm-elf-symver.s27
1 files changed, 0 insertions, 27 deletions
diff --git a/llvm/test/MC/ARM/arm-elf-symver.s b/llvm/test/MC/ARM/arm-elf-symver.s
index 83313c103a1..e1f45459766 100644
--- a/llvm/test/MC/ARM/arm-elf-symver.s
+++ b/llvm/test/MC/ARM/arm-elf-symver.s
@@ -60,24 +60,6 @@ global1:
@ CHECK-NEXT: Section: .text
@ CHECK-NEXT: }
@ CHECK-NEXT: Symbol {
-@ CHECK-NEXT: Name: defined1
-@ CHECK-NEXT: Value: 0x0
-@ CHECK-NEXT: Size: 0
-@ CHECK-NEXT: Binding: Local (0x0)
-@ CHECK-NEXT: Type: None (0x0)
-@ CHECK-NEXT: Other: 0
-@ CHECK-NEXT: Section: .text
-@ CHECK-NEXT: }
-@ CHECK-NEXT: Symbol {
-@ CHECK-NEXT: Name: defined2
-@ CHECK-NEXT: Value: 0x0
-@ CHECK-NEXT: Size: 0
-@ CHECK-NEXT: Binding: Local (0x0)
-@ CHECK-NEXT: Type: None (0x0)
-@ CHECK-NEXT: Other: 0
-@ CHECK-NEXT: Section: .text
-@ CHECK-NEXT: }
-@ CHECK-NEXT: Symbol {
@ CHECK-NEXT: Name: .text (0)
@ CHECK-NEXT: Value: 0x0
@ CHECK-NEXT: Size: 0
@@ -113,13 +95,4 @@ global1:
@ CHECK-NEXT: Other: 0
@ CHECK-NEXT: Section: .text
@ CHECK-NEXT: }
-@ CHECK-NEXT: Symbol {
-@ CHECK-NEXT: Name: global1
-@ CHECK-NEXT: Value: 0x14
-@ CHECK-NEXT: Size: 0
-@ CHECK-NEXT: Binding: Global (0x1)
-@ CHECK-NEXT: Type: None (0x0)
-@ CHECK-NEXT: Other: 0
-@ CHECK-NEXT: Section: .text
-@ CHECK-NEXT: }
@ CHECK-NEXT: ]
OpenPOWER on IntegriCloud