xref: /aosp_15_r20/external/llvm/test/Object/Inputs/elfver.S (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker# Compile with:
2*9880d681SAndroid Build Coastguard Worker#   ARGS="-shared -nostdlib -Wl,--version-script=elfver.script"
3*9880d681SAndroid Build Coastguard Worker#   clang $ARGS -m32 elfver.S -lc -o elf-versioning-test.i386
4*9880d681SAndroid Build Coastguard Worker#   clang $ARGS -m64 elfver.S -lc -o elf-versioning-test.x86_64
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker# Also, strip off non-dynamic symbols:
7*9880d681SAndroid Build Coastguard Worker#   strip elf-versioning-test.i386
8*9880d681SAndroid Build Coastguard Worker#   strip elf-versioning-test.x86_64
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker#ifdef __i386__
11*9880d681SAndroid Build Coastguard Worker.symver _puts, puts@GLIBC_2.0
12*9880d681SAndroid Build Coastguard Worker#else
13*9880d681SAndroid Build Coastguard Worker.symver _puts, puts@GLIBC_2.2.5
14*9880d681SAndroid Build Coastguard Worker#endif
15*9880d681SAndroid Build Coastguard Workercall _puts@PLT
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard Worker.symver foo1, foo@VER1
18*9880d681SAndroid Build Coastguard Worker.globl foo1
19*9880d681SAndroid Build Coastguard Worker.type foo1, @function
20*9880d681SAndroid Build Coastguard Workerfoo1:
21*9880d681SAndroid Build Coastguard Worker  ret
22*9880d681SAndroid Build Coastguard Worker
23*9880d681SAndroid Build Coastguard Worker.symver foo2, foo@@VER2
24*9880d681SAndroid Build Coastguard Worker.globl foo2
25*9880d681SAndroid Build Coastguard Worker.type foo2, @function
26*9880d681SAndroid Build Coastguard Workerfoo2:
27*9880d681SAndroid Build Coastguard Worker  ret
28*9880d681SAndroid Build Coastguard Worker
29*9880d681SAndroid Build Coastguard Worker.globl unversioned_define
30*9880d681SAndroid Build Coastguard Worker.type unversioned_define, @function
31*9880d681SAndroid Build Coastguard Workerunversioned_define:
32