[PATCH] D44615: [test] Add test for version scripts with extern C++ and GNU ABI tags.

Christopher James Halse Rogers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 21 18:23:18 PDT 2018


RAOF updated this revision to Diff 139405.
RAOF added a comment.

Updated test case to match review.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D44615

Files:
  test/ELF/linkerscript/cxx11-tag-version.s


Index: test/ELF/linkerscript/cxx11-tag-version.s
===================================================================
--- /dev/null
+++ test/ELF/linkerscript/cxx11-tag-version.s
@@ -0,0 +1,26 @@
+# REQUIRES: x86
+
+# RUN: echo 'VER1 { global: extern "C++" { returns_string*; accepts_string*; global*; }; local: *; };' > %t.script
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
+# RUN: ld.lld --version-script %t.script -shared %t.o -o %t.so
+# RUN: llvm-readobj -dyn-symbols %t.so | FileCheck %s
+
+# CHECK:      Name: _Z14accepts_stringRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@@VER1
+# CHECK:      Name: _Z14returns_stringB5cxx11v@@VER1
+# CHECK:      Name: _Z6globalB5cxx11@@VER1
+
+.text
+.globl	_Z14returns_stringB5cxx11v
+.type	_Z14returns_stringB5cxx11v, at function
+_Z14returns_stringB5cxx11v:
+
+.text
+.globl	_Z14accepts_stringRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
+.type	_Z14accepts_stringRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, at function
+_Z14accepts_stringRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
+
+.bss
+.type	_Z6globalB5cxx11, at object
+.globl	_Z6globalB5cxx11
+_Z6globalB5cxx11:
+


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44615.139405.patch
Type: text/x-patch
Size: 1171 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180322/a877c0b7/attachment.bin>


More information about the llvm-commits mailing list