@ -29,9 +29,7 @@ __attribute__((noinline)) int field_global() {
return set_output ( __builtin_preserve_access_index ( s . b ) ) ;
}
SEC ( " uprobe/field " ) int field ( void * ctx ) {
return field_global ( ) ;
}
SEC ( " uprobe " ) int field ( void * ctx ) { return field_global ( ) ; }
struct relocated_struct_with_pointer {
struct relocated_struct_with_pointer * first ;
@ -46,9 +44,7 @@ __attribute__((noinline)) int pointer_global() {
return set_output ( ( __u64 ) __builtin_preserve_access_index ( s . first ) ) ;
}
SEC ( " uprobe/pointer " ) int pointer ( void * ctx ) {
return pointer_global ( ) ;
}
SEC ( " uprobe " ) int pointer ( void * ctx ) { return pointer_global ( ) ; }
__attribute__ ( ( noinline ) ) int struct_flavors_global ( ) {
struct relocated_struct_with_scalars s = { 1 , 2 , 3 } ;
@ -59,9 +55,7 @@ __attribute__((noinline)) int struct_flavors_global() {
}
}
SEC ( " uprobe/struct_flavors " ) int struct_flavors ( void * ctx ) {
return struct_flavors_global ( ) ;
}
SEC ( " uprobe " ) int struct_flavors ( void * ctx ) { return struct_flavors_global ( ) ; }
enum relocated_enum_unsigned_32 { U32 = 0xAAAAAAAA } ;
@ -69,8 +63,7 @@ __attribute__((noinline)) int enum_unsigned_32_global() {
return set_output ( bpf_core_enum_value ( enum relocated_enum_unsigned_32 , U32 ) ) ;
}
SEC ( " uprobe/enum_unsigned_32 " )
int enum_unsigned_32 ( void * ctx ) {
SEC ( " uprobe " ) int enum_unsigned_32 ( void * ctx ) {
return enum_unsigned_32_global ( ) ;
}
@ -80,9 +73,7 @@ __attribute__((noinline)) int enum_signed_32_global() {
return set_output ( bpf_core_enum_value ( enum relocated_enum_signed_32 , S32 ) ) ;
}
SEC ( " uprobe/enum_signed_32 " ) int enum_signed_32 ( void * ctx ) {
return enum_signed_32_global ( ) ;
}
SEC ( " uprobe " ) int enum_signed_32 ( void * ctx ) { return enum_signed_32_global ( ) ; }
enum relocated_enum_unsigned_64 { U64 = 0xAAAAAAAABBBBBBBB } ;
@ -90,8 +81,7 @@ __attribute__((noinline)) int enum_unsigned_64_global() {
return set_output ( bpf_core_enum_value ( enum relocated_enum_unsigned_64 , U64 ) ) ;
}
SEC ( " uprobe/enum_unsigned_64 " )
int enum_unsigned_64 ( void * ctx ) {
SEC ( " uprobe " ) int enum_unsigned_64 ( void * ctx ) {
return enum_unsigned_64_global ( ) ;
}
@ -101,6 +91,4 @@ __attribute__((noinline)) int enum_signed_64_global() {
return set_output ( bpf_core_enum_value ( enum relocated_enum_signed_64 , u64 ) ) ;
}
SEC ( " uprobe/enum_signed_64 " ) int enum_signed_64 ( void * ctx ) {
return enum_signed_64_global ( ) ;
}
SEC ( " uprobe " ) int enum_signed_64 ( void * ctx ) { return enum_signed_64_global ( ) ; }