1# SPDX-License-Identifier: GPL-2.0 2# 3# Makefile for the linux kernel. 4# 5 6ifdef CONFIG_FUNCTION_TRACER 7 8# Do not trace tracer code 9CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE) 10 11# Do not trace early setup code 12CFLAGS_REMOVE_early.o = $(CC_FLAGS_FTRACE) 13CFLAGS_REMOVE_rethook.o = $(CC_FLAGS_FTRACE) 14CFLAGS_REMOVE_stacktrace.o = $(CC_FLAGS_FTRACE) 15CFLAGS_REMOVE_unwind_bc.o = $(CC_FLAGS_FTRACE) 16 17endif 18 19GCOV_PROFILE_early.o := n 20KCOV_INSTRUMENT_early.o := n 21UBSAN_SANITIZE_early.o := n 22KASAN_SANITIZE_ipl.o := n 23KASAN_SANITIZE_machine_kexec.o := n 24 25# 26# Passing null pointers is ok for smp code, since we access the lowcore here. 27# 28CFLAGS_smp.o := -Wno-nonnull 29 30# 31# Disable tailcall optimizations for stack / callchain walking functions 32# since this might generate broken code when accessing register 15 and 33# passing its content to other functions. 34# 35CFLAGS_stacktrace.o += -fno-optimize-sibling-calls 36CFLAGS_dumpstack.o += -fno-optimize-sibling-calls 37CFLAGS_unwind_bc.o += -fno-optimize-sibling-calls 38 39obj-y := head64.o traps.o time.o process.o early.o setup.o idle.o vtime.o 40obj-y += processor.o syscall.o ptrace.o signal.o cpcmd.o ebcdic.o nmi.o 41obj-y += debug.o irq.o ipl.o dis.o diag.o vdso.o cpufeature.o 42obj-y += sysinfo.o lgr.o os_info.o ctlreg.o 43obj-y += runtime_instr.o cache.o fpu.o dumpstack.o guarded_storage.o sthyi.o 44obj-y += entry.o reipl.o kdebugfs.o alternative.o 45obj-y += nospec-branch.o ipl_vmparm.o machine_kexec_reloc.o unwind_bc.o 46obj-y += smp.o text_amode31.o stacktrace.o abs_lowcore.o facility.o uv.o wti.o 47 48extra-y += vmlinux.lds 49 50obj-$(CONFIG_SYSFS) += nospec-sysfs.o 51CFLAGS_REMOVE_nospec-branch.o += $(CC_FLAGS_EXPOLINE) 52 53obj-$(CONFIG_SYSFS) += cpacf.o 54obj-$(CONFIG_MODULES) += module.o 55obj-$(CONFIG_SCHED_TOPOLOGY) += topology.o hiperdispatch.o 56obj-$(CONFIG_NUMA) += numa.o 57obj-$(CONFIG_AUDIT) += audit.o 58compat-obj-$(CONFIG_AUDIT) += compat_audit.o 59obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o 60obj-$(CONFIG_COMPAT) += $(compat-obj-y) 61obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 62obj-$(CONFIG_KPROBES) += kprobes.o 63obj-$(CONFIG_KPROBES) += mcount.o 64obj-$(CONFIG_RETHOOK) += rethook.o 65obj-$(CONFIG_FUNCTION_TRACER) += ftrace.o 66obj-$(CONFIG_FUNCTION_TRACER) += mcount.o 67obj-$(CONFIG_CRASH_DUMP) += crash_dump.o 68obj-$(CONFIG_KEXEC_CORE) += machine_kexec.o relocate_kernel.o 69obj-$(CONFIG_VMCORE_INFO) += vmcore_info.o 70obj-$(CONFIG_UPROBES) += uprobes.o 71obj-$(CONFIG_JUMP_LABEL) += jump_label.o 72 73obj-$(CONFIG_KEXEC_FILE) += machine_kexec_file.o kexec_image.o 74obj-$(CONFIG_KEXEC_FILE) += kexec_elf.o 75obj-$(CONFIG_CERT_STORE) += cert_store.o 76obj-$(CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT) += ima_arch.o 77 78obj-$(CONFIG_PERF_EVENTS) += perf_event.o 79obj-$(CONFIG_PERF_EVENTS) += perf_cpum_cf.o perf_cpum_sf.o 80obj-$(CONFIG_PERF_EVENTS) += perf_cpum_cf_events.o perf_regs.o 81obj-$(CONFIG_PERF_EVENTS) += perf_pai_crypto.o perf_pai_ext.o 82 83obj-$(CONFIG_TRACEPOINTS) += trace.o 84 85# vdso 86obj-y += vdso64/ 87obj-$(CONFIG_COMPAT) += vdso32/ 88