@@ -49,7 +49,7 @@ hostprogs-y += xdpsock
49
49
hostprogs-y += xdp_fwd
50
50
51
51
# Libbpf dependencies
52
- LIBBPF := ../../tools/lib/bpf/bpf.o ../../tools/lib/bpf/nlattr.o
52
+ LIBBPF := ../../tools/lib/bpf/libbpf.a
53
53
CGROUP_HELPERS := ../../tools/testing/selftests/bpf/cgroup_helpers.o
54
54
TRACE_HELPERS := ../../tools/testing/selftests/bpf/trace_helpers.o
55
55
@@ -74,10 +74,10 @@ offwaketime-objs := bpf_load.o $(LIBBPF) offwaketime_user.o $(TRACE_HELPERS)
74
74
spintest-objs := bpf_load.o $(LIBBPF ) spintest_user.o $(TRACE_HELPERS )
75
75
map_perf_test-objs := bpf_load.o $(LIBBPF ) map_perf_test_user.o
76
76
test_overhead-objs := bpf_load.o $(LIBBPF ) test_overhead_user.o
77
- test_cgrp2_array_pin-objs := $(LIBBPF ) test_cgrp2_array_pin.o
78
- test_cgrp2_attach-objs := $(LIBBPF ) test_cgrp2_attach.o
79
- test_cgrp2_attach2-objs := $(LIBBPF ) test_cgrp2_attach2.o $(CGROUP_HELPERS )
80
- test_cgrp2_sock-objs := $(LIBBPF ) test_cgrp2_sock.o
77
+ test_cgrp2_array_pin-objs := test_cgrp2_array_pin.o $(LIBBPF )
78
+ test_cgrp2_attach-objs := test_cgrp2_attach.o $(LIBBPF )
79
+ test_cgrp2_attach2-objs := test_cgrp2_attach2.o $(LIBBPF ) $(CGROUP_HELPERS )
80
+ test_cgrp2_sock-objs := test_cgrp2_sock.o $(LIBBPF )
81
81
test_cgrp2_sock2-objs := bpf_load.o $(LIBBPF ) test_cgrp2_sock2.o
82
82
xdp1-objs := bpf_load.o $(LIBBPF ) xdp1_user.o
83
83
# reuse xdp1 source intentionally
@@ -91,7 +91,7 @@ tc_l2_redirect-objs := bpf_load.o $(LIBBPF) tc_l2_redirect_user.o
91
91
lwt_len_hist-objs := bpf_load.o $(LIBBPF ) lwt_len_hist_user.o
92
92
xdp_tx_iptunnel-objs := bpf_load.o $(LIBBPF ) xdp_tx_iptunnel_user.o
93
93
test_map_in_map-objs := bpf_load.o $(LIBBPF ) test_map_in_map_user.o
94
- per_socket_stats_example-objs := $(LIBBPF ) cookie_uid_helper_example.o
94
+ per_socket_stats_example-objs := cookie_uid_helper_example.o $(LIBBPF )
95
95
xdp_redirect-objs := bpf_load.o $(LIBBPF ) xdp_redirect_user.o
96
96
xdp_redirect_map-objs := bpf_load.o $(LIBBPF ) xdp_redirect_map_user.o
97
97
xdp_redirect_cpu-objs := bpf_load.o $(LIBBPF ) xdp_redirect_cpu_user.o
@@ -165,6 +165,8 @@ HOSTCFLAGS += -I$(srctree)/tools/lib/ -I$(srctree)/tools/include
165
165
HOSTCFLAGS += -I$(srctree ) /tools/perf
166
166
167
167
HOSTCFLAGS_bpf_load.o += -I$(objtree ) /usr/include -Wno-unused-variable
168
+ HOSTLOADLIBES_test_lru_dist += -lelf
169
+ HOSTLOADLIBES_sock_example += -lelf
168
170
HOSTLOADLIBES_fds_example += -lelf
169
171
HOSTLOADLIBES_sockex1 += -lelf
170
172
HOSTLOADLIBES_sockex2 += -lelf
@@ -176,6 +178,10 @@ HOSTLOADLIBES_tracex4 += -lelf -lrt
176
178
HOSTLOADLIBES_tracex5 += -lelf
177
179
HOSTLOADLIBES_tracex6 += -lelf
178
180
HOSTLOADLIBES_tracex7 += -lelf
181
+ HOSTLOADLIBES_test_cgrp2_array_pin += -lelf
182
+ HOSTLOADLIBES_test_cgrp2_attach += -lelf
183
+ HOSTLOADLIBES_test_cgrp2_attach2 += -lelf
184
+ HOSTLOADLIBES_test_cgrp2_sock += -lelf
179
185
HOSTLOADLIBES_test_cgrp2_sock2 += -lelf
180
186
HOSTLOADLIBES_load_sock_ops += -lelf
181
187
HOSTLOADLIBES_test_probe_write_user += -lelf
@@ -195,6 +201,7 @@ HOSTLOADLIBES_tc_l2_redirect += -l elf
195
201
HOSTLOADLIBES_lwt_len_hist += -l elf
196
202
HOSTLOADLIBES_xdp_tx_iptunnel += -lelf
197
203
HOSTLOADLIBES_test_map_in_map += -lelf
204
+ HOSTLOADLIBES_per_socket_stats_example += -lelf
198
205
HOSTLOADLIBES_xdp_redirect += -lelf
199
206
HOSTLOADLIBES_xdp_redirect_map += -lelf
200
207
HOSTLOADLIBES_xdp_redirect_cpu += -lelf
@@ -226,7 +233,7 @@ clean:
226
233
@rm -f * ~
227
234
228
235
$(LIBBPF ) : FORCE
229
- $(MAKE ) -C $(dir $@ ) $( notdir $@ )
236
+ $(MAKE ) -C $(dir $@ )
230
237
231
238
$(obj ) /syscall_nrs.s : $(src ) /syscall_nrs.c
232
239
$(call if_changed_dep,cc_s_c)
0 commit comments