annotate lld/test/ELF/as-needed-weak.s @ 192:d7606dcf6fce

Added tag llvm10 for changeset 0572611fdcc8
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 14 Dec 2020 18:01:34 +0900
parents 1d019706d866
children 5f17cb93ff66
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 # REQUIRES: x86
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 # RUN: echo '.globl foo; .type foo, @function; foo:' | \
anatofuz
parents:
diff changeset
4 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o %t1.o
anatofuz
parents:
diff changeset
5 # RUN: ld.lld -shared -o %t1.so -soname libfoo %t1.o
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t2.o
anatofuz
parents:
diff changeset
8 # RUN: ld.lld -o %t.exe %t2.o --as-needed %t1.so
anatofuz
parents:
diff changeset
9 # RUN: llvm-readelf -dynamic-table -dyn-symbols %t.exe | FileCheck %s
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 # CHECK-NOT: libfoo
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 # CHECK: Symbol table '.dynsym' contains 2 entries:
anatofuz
parents:
diff changeset
14 # CHECK-NEXT: Num: Value Size Type Bind Vis Ndx Name
anatofuz
parents:
diff changeset
15 # CHECK-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
anatofuz
parents:
diff changeset
16 # CHECK-NEXT: 1: 0000000000000000 0 FUNC WEAK DEFAULT UND foo
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 .globl _start
anatofuz
parents:
diff changeset
19 .weak foo
anatofuz
parents:
diff changeset
20
anatofuz
parents:
diff changeset
21 _start:
anatofuz
parents:
diff changeset
22 mov $foo, %eax
anatofuz
parents:
diff changeset
23 callq foo