blob: c1a9be6a4b9fab24e0b0c8c4a50c3a73f40f6eab [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Alexei Starovoitovf89b7752014-10-23 18:41:08 -07002obj-y := core.o
Ard Biesheuvel080b6f42020-10-28 18:15:05 +01003ifneq ($(CONFIG_BPF_JIT_ALWAYS_ON),y)
4# ___bpf_prog_run() needs GCSE disabled on x86; see 3193c0836f203 for details
5cflags-nogcse-$(CONFIG_X86)$(CONFIG_CC_IS_GCC) := -fno-gcse
6endif
7CFLAGS_core.o += $(call cc-disable-warning, override-init) $(cflags-nogcse-yy)
Daniel Borkmannb2197752015-10-29 14:58:09 +01008
Alexei Starovoitova228a642020-07-01 18:10:18 -07009obj-$(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
Joanne Koong93309862021-10-27 16:45:00 -070010obj-$(CONFIG_BPF_SYSCALL) += hashtab.o arraymap.o percpu_freelist.o bpf_lru_list.o lpm_trie.o map_in_map.o bloom_filter.o
Andrii Nakryiko457f4432020-05-29 00:54:20 -070011obj-$(CONFIG_BPF_SYSCALL) += local_storage.o queue_stack_maps.o ringbuf.o
Song Liua10787e2021-02-25 15:43:14 -080012obj-$(CONFIG_BPF_SYSCALL) += bpf_local_storage.o bpf_task_storage.o
KP Singh8ea63682020-08-25 20:29:17 +020013obj-${CONFIG_BPF_LSM} += bpf_inode_storage.o
Jakub Kicinskif4ac7e02017-10-09 10:30:12 -070014obj-$(CONFIG_BPF_SYSCALL) += disasm.o
Alexei Starovoitovfec56f52019-11-14 10:57:04 -080015obj-$(CONFIG_BPF_JIT) += trampoline.o
Martin KaFai Lau69b693f2018-04-18 15:55:57 -070016obj-$(CONFIG_BPF_SYSCALL) += btf.o
Björn Töpel75ccbef2019-12-13 18:51:08 +010017obj-$(CONFIG_BPF_JIT) += dispatcher.o
John Fastabend546ac1f2017-07-17 09:28:56 -070018ifeq ($(CONFIG_NET),y)
John Fastabend6bdc9c42017-08-16 15:02:32 -070019obj-$(CONFIG_BPF_SYSCALL) += devmap.o
Jesper Dangaard Brouer6710e112017-10-16 12:19:28 +020020obj-$(CONFIG_BPF_SYSCALL) += cpumap.o
Jakub Kicinskiab3f0062017-11-03 13:56:17 -070021obj-$(CONFIG_BPF_SYSCALL) += offload.o
Jakub Sitnickib27f7bb2020-05-31 10:28:37 +020022obj-$(CONFIG_BPF_SYSCALL) += net_namespace.o
John Fastabend5f103c52018-01-03 17:57:56 -080023endif
Alexei Starovoitovd5a3b1f2016-02-17 19:58:58 -080024ifeq ($(CONFIG_PERF_EVENTS),y)
25obj-$(CONFIG_BPF_SYSCALL) += stackmap.o
26endif
Daniel Mack30070982016-11-23 16:52:26 +010027obj-$(CONFIG_CGROUP_BPF) += cgroup.o
Martin KaFai Lau5dc4c4b2018-08-08 01:01:24 -070028ifeq ($(CONFIG_INET),y)
29obj-$(CONFIG_BPF_SYSCALL) += reuseport_array.o
30endif
Andrii Nakryiko341dfcf2019-08-12 11:39:47 -070031ifeq ($(CONFIG_SYSFS),y)
32obj-$(CONFIG_DEBUG_INFO_BTF) += sysfs_btf.o
33endif
Martin KaFai Lau27ae79972020-01-08 16:35:03 -080034ifeq ($(CONFIG_BPF_JIT),y)
35obj-$(CONFIG_BPF_SYSCALL) += bpf_struct_ops.o
KP Singhfc611f42020-03-29 01:43:49 +010036obj-${CONFIG_BPF_LSM} += bpf_lsm.o
Martin KaFai Lau27ae79972020-01-08 16:35:03 -080037endif
Alexei Starovoitovd71fa5c2020-08-18 21:27:58 -070038obj-$(CONFIG_BPF_PRELOAD) += preload/
Alexei Starovoitov29db4be2021-12-01 10:10:26 -080039
40obj-$(CONFIG_BPF_SYSCALL) += relo_core.o
41$(obj)/relo_core.o: $(srctree)/tools/lib/bpf/relo_core.c FORCE
42 $(call if_changed_rule,cc_o_c)