1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 2f89b7755SAlexei Starovoitovobj-y := core.o 3080b6f40SArd Biesheuvelifneq ($(CONFIG_BPF_JIT_ALWAYS_ON),y) 4080b6f40SArd Biesheuvel# ___bpf_prog_run() needs GCSE disabled on x86; see 3193c0836f203 for details 5080b6f40SArd Biesheuvelcflags-nogcse-$(CONFIG_X86)$(CONFIG_CC_IS_GCC) := -fno-gcse 6080b6f40SArd Biesheuvelendif 7080b6f40SArd BiesheuvelCFLAGS_core.o += $(call cc-disable-warning, override-init) $(cflags-nogcse-yy) 8b2197755SDaniel Borkmann 99f883612SDmitrii Dolgovobj-$(CONFIG_BPF_SYSCALL) += syscall.o verifier.o inode.o helpers.o tnum.o bpf_iter.o map_iter.o task_iter.o prog_iter.o link_iter.o 109330986cSJoanne Koongobj-$(CONFIG_BPF_SYSCALL) += hashtab.o arraymap.o percpu_freelist.o bpf_lru_list.o lpm_trie.o map_in_map.o bloom_filter.o 11457f4436SAndrii Nakryikoobj-$(CONFIG_BPF_SYSCALL) += local_storage.o queue_stack_maps.o ringbuf.o 12a10787e6SSong Liuobj-$(CONFIG_BPF_SYSCALL) += bpf_local_storage.o bpf_task_storage.o 138ea63684SKP Singhobj-${CONFIG_BPF_LSM} += bpf_inode_storage.o 14f4ac7e0bSJakub Kicinskiobj-$(CONFIG_BPF_SYSCALL) += disasm.o 15fec56f58SAlexei Starovoitovobj-$(CONFIG_BPF_JIT) += trampoline.o 167c8199e2SAlexei Starovoitovobj-$(CONFIG_BPF_SYSCALL) += btf.o memalloc.o 1775ccbef6SBjörn Töpelobj-$(CONFIG_BPF_JIT) += dispatcher.o 18546ac1ffSJohn Fastabendifeq ($(CONFIG_NET),y) 196bdc9c4cSJohn Fastabendobj-$(CONFIG_BPF_SYSCALL) += devmap.o 206710e112SJesper Dangaard Brouerobj-$(CONFIG_BPF_SYSCALL) += cpumap.o 21ab3f0063SJakub Kicinskiobj-$(CONFIG_BPF_SYSCALL) += offload.o 22b27f7bb5SJakub Sitnickiobj-$(CONFIG_BPF_SYSCALL) += net_namespace.o 235f103c5dSJohn Fastabendendif 24d5a3b1f6SAlexei Starovoitovifeq ($(CONFIG_PERF_EVENTS),y) 25d5a3b1f6SAlexei Starovoitovobj-$(CONFIG_BPF_SYSCALL) += stackmap.o 26d5a3b1f6SAlexei Starovoitovendif 27d4ccaf58SHao Luoifeq ($(CONFIG_CGROUPS),y) 28c4bcfb38SYonghong Songobj-$(CONFIG_BPF_SYSCALL) += cgroup_iter.o bpf_cgrp_storage.o 29d4ccaf58SHao Luoendif 3030070984SDaniel Mackobj-$(CONFIG_CGROUP_BPF) += cgroup.o 315dc4c4b7SMartin KaFai Lauifeq ($(CONFIG_INET),y) 325dc4c4b7SMartin KaFai Lauobj-$(CONFIG_BPF_SYSCALL) += reuseport_array.o 335dc4c4b7SMartin KaFai Lauendif 34341dfcf8SAndrii Nakryikoifeq ($(CONFIG_SYSFS),y) 35341dfcf8SAndrii Nakryikoobj-$(CONFIG_DEBUG_INFO_BTF) += sysfs_btf.o 36341dfcf8SAndrii Nakryikoendif 3727ae7997SMartin KaFai Lauifeq ($(CONFIG_BPF_JIT),y) 3827ae7997SMartin KaFai Lauobj-$(CONFIG_BPF_SYSCALL) += bpf_struct_ops.o 39*516f4d33SDavid Vernetobj-$(CONFIG_BPF_SYSCALL) += cpumask.o 40fc611f47SKP Singhobj-${CONFIG_BPF_LSM} += bpf_lsm.o 4127ae7997SMartin KaFai Lauendif 42d71fa5c9SAlexei Starovoitovobj-$(CONFIG_BPF_PRELOAD) += preload/ 4329db4beaSAlexei Starovoitov 4429db4beaSAlexei Starovoitovobj-$(CONFIG_BPF_SYSCALL) += relo_core.o 4529db4beaSAlexei Starovoitov$(obj)/relo_core.o: $(srctree)/tools/lib/bpf/relo_core.c FORCE 4629db4beaSAlexei Starovoitov $(call if_changed_rule,cc_o_c) 47