1; RUN: llc -mtriple=bpfel -filetype=obj -o %t.el < %s 2; RUN: llvm-readelf -r %t.el | FileCheck %s 3; RUN: llc -mtriple=bpfeb -filetype=obj -o %t.eb < %s 4; RUN: llvm-readelf -r %t.eb | FileCheck %s 5 6; source code: 7; int g() { return 0; } 8; struct t { ptr p; } gbl = { g }; 9; compilation flag: 10; clang -target bpf -O2 -emit-llvm -S test.c 11 12%struct.t = type { ptr } 13 14@gbl = dso_local local_unnamed_addr global %struct.t { ptr @g }, align 8 15 16; CHECK: '.rel.data' 17; CHECK: 0000000000000000 0000000200000002 R_BPF_64_ABS64 0000000000000000 g 18 19; Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress 20define dso_local i32 @g() #0 { 21entry: 22 ret i32 0 23} 24 25attributes #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" } 26