llvm-project/lld/test/ELF/progname.s
Fangrui Song 0e79890d9b [ELF][test] Improve tests
Add file-level comments
Delete insignificant addresses to make them more tolerant to layout changes
Simplify test output

Delete weak-undef-val.s - covered by relocation-undefined-weak.s
Delete weak-undef-export.s - covered by additional test added to weak-undef.s
Delete version-undef-sym.s - covered by undefined-versioned-symbol.s => version-symbol-undef.s
Delete symbol-ordering-file2.s - covered by symbol-ordering-file.s
Delete gotpcrelx.s - covered by gotpc-relax-und-dso.s => x86-64-gotpc-relax-und-dso.s

llvm-svn: 371299
2019-09-07 10:42:11 +00:00

32 lines
1.1 KiB
ArmAsm

// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
// 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
// RUN: llvm-readobj --dyn-syms %t | FileCheck %s
// RUN: echo "VER_1 { global: bar; };" > %t.script
// RUN: echo '.globl bar; bar: .quad __progname@GOT' | llvm-mc -filetype=obj -triple=x86_64 - -o %t-ver.o
// RUN: ld.lld -shared -o %t.so -version-script %t.script %t-ver.o
// RUN: ld.lld -o %t %t.o %t.so
// RUN: llvm-readobj --dyn-syms %t | FileCheck %s
// RUN: echo "{ _start; };" > %t.dynlist
// RUN: ld.lld -dynamic-list %t.dynlist -o %t %t.o %t.so
// RUN: llvm-readobj --dyn-syms %t | FileCheck %s
// CHECK: Name: __progname
// CHECK-NEXT: Value:
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Global (0x1)
// CHECK-NEXT: Type: None (0x0)
// CHECK-NEXT: Other: 0
// CHECK-NEXT: Section: .text
// CHECK-NEXT: }
.global _start, __progname
_start:
__progname:
nop