31 lines · plain
1# REQUIRES: x862 3# RUN: echo ".global foo; .type foo, @object; .size foo, 4; foo:; .long 0" > %t.s4# RUN: echo ".global bar; .type bar, @object; .size bar, 4; bar:; .long 0" >> %t.s5# RUN: echo ".global zed; .type zed, @function; zed:" >> %t.s6# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %t.s -o %t1.o7# RUN: ld.lld %t1.o -o %t1.so -shared8 9# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t2.o10# RUN: ld.lld --hash-style=gnu %t2.o %t1.so -o %t211 12# RUN: llvm-readelf --symbols --gnu-hash-table %t2 | FileCheck %s13 14# CHECK: Symbol table '.dynsym' contains 4 entries:15# CHECK-NEXT: Num: Value Size Type Bind Vis Ndx Name16# CHECK-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND17# CHECK-NEXT: 1: 0000000000000000 0 OBJECT GLOBAL DEFAULT UND foo18# CHECK-DAG: : {{.*}} 4 OBJECT GLOBAL DEFAULT {{.*}} bar19# CHECK-DAG: : {{.*}} 0 FUNC GLOBAL DEFAULT UND zed20 21# CHECK: First Hashed Symbol Index: 222 23.global _start24_start:25 26.quad bar27.quad zed28 29.data30.quad foo31