Skip to content

Commit 962508a

Browse files
committed
remove new syscall variable
1 parent 4d4bd53 commit 962508a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

runtime/syscall-server/syscall_context.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@
5555

5656
#if __linux__ && !BPFTIME_BUILD_WITH_LIBBPF
5757
#define offsetofend(type, member) (offsetof(type, member) + sizeof(((type *)0)->member))
58-
static void *libc_handle = dlopen(LIBC_SO, RTLD_LAZY);
59-
static auto libc_syscall =
60-
reinterpret_cast<decltype(&::syscall)>(dlsym(libc_handle, "syscall"));
61-
6258
static inline __u64 ptr_to_u64(const void *ptr)
6359
{
6460
return (__u64) (unsigned long) ptr;
@@ -75,7 +71,7 @@ inline int bpf_obj_get_info_by_fd(int bpf_fd, void *info, __u32 *info_len)
7571
attr.info.info_len = *info_len;
7672
attr.info.info = ptr_to_u64(info);
7773

78-
err = libc_syscall(__NR_bpf, BPF_OBJ_GET_INFO_BY_FD, &attr, attr_sz);
74+
err = this->orig_syscall_fn(__NR_bpf, BPF_OBJ_GET_INFO_BY_FD, &attr, attr_sz);
7975
if (!err)
8076
*info_len = attr.info.info_len;
8177
// no-op stub

0 commit comments

Comments
 (0)