1 ; RUN: llc -march=bpfel -filetype=obj -o %t.el < %s
2 ; RUN: llvm-readelf -r %t.el | FileCheck %s
3 ; RUN: llc -march=bpfeb -filetype=obj -o %t.eb < %s
4 ; RUN: llvm-readelf -r %t.eb | FileCheck %s
7 ; int g() { return 0; }
8 ; struct t { ptr p; } gbl = { g };
10 ; clang -target bpf -O2 -emit-llvm -S test.c
12 %struct.t = type { ptr }
14 @gbl = dso_local local_unnamed_addr global %struct.t { ptr @g }, align 8
17 ; CHECK: 0000000000000000 0000000200000002 R_BPF_64_ABS64 0000000000000000 g
19 ; Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress
20 define dso_local i32 @g() #0 {
25 attributes #0 = { nofree norecurse nosync nounwind readnone willreturn mustprogress "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }