xref: /linux/arch/arm/kernel/Makefile (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
21da177e4SLinus Torvalds#
31da177e4SLinus Torvalds# Makefile for the linux kernel.
41da177e4SLinus Torvalds#
51da177e4SLinus Torvalds
651b563fcSSam RavnborgCPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET)
79d4f13e5SRussell KingAFLAGS_head.o        := -DTEXT_OFFSET=$(TEXT_OFFSET)
81da177e4SLinus Torvalds
9376cfa87STim Birdifdef CONFIG_FUNCTION_TRACER
10014c257cSAbhishek SagarCFLAGS_REMOVE_ftrace.o = -pg
11d82227cfSRabin VincentCFLAGS_REMOVE_insn.o = -pg
12b21d55e9SRabin VincentCFLAGS_REMOVE_patch.o = -pg
13538b9265SArd BiesheuvelCFLAGS_REMOVE_unwind.o = -pg
14014c257cSAbhishek Sagarendif
15014c257cSAbhishek Sagar
164bf1fa5aSUwe Kleine-KönigCFLAGS_REMOVE_return_address.o = -pg
174bf1fa5aSUwe Kleine-König
181da177e4SLinus Torvalds# Object file lists.
191da177e4SLinus Torvalds
204477ca45SUwe Kleine-Königobj-y		:= elf.o entry-common.o irq.o opcodes.o \
213e3f354bSArnd Bergmann		   process.o ptrace.o reboot.o io.o \
22574e2b51SVictor Kamensky		   setup.o signal.o sigreturn_codes.o \
23574e2b51SVictor Kamensky		   stacktrace.o sys_arm.o time.o traps.o
241da177e4SLinus Torvalds
254d576cabSArd BiesheuvelKASAN_SANITIZE_stacktrace.o := n
264d576cabSArd BiesheuvelKASAN_SANITIZE_traps.o := n
274d576cabSArd Biesheuvel
28fb033c95SBen Dooksifneq ($(CONFIG_ARM_UNWIND),y)
29fb033c95SBen Dooksobj-$(CONFIG_FRAME_POINTER)	+= return_address.o
30fb033c95SBen Dooksendif
31fb033c95SBen Dooks
32bd51e2f5SNicolas Pitreobj-$(CONFIG_ATAGS)		+= atags_parse.o
33bd51e2f5SNicolas Pitreobj-$(CONFIG_ATAGS_PROC)	+= atags_proc.o
34aa783b6fSNicolas Pitreobj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += atags_compat.o
3573a65b3fSUwe Kleine-König
364477ca45SUwe Kleine-Königifeq ($(CONFIG_CPU_V7M),y)
376a7d2c62SUwe Kleine-Königobj-y		+= entry-v7m.o v7m.o
384477ca45SUwe Kleine-Königelse
394477ca45SUwe Kleine-Königobj-y		+= entry-armv.o
404477ca45SUwe Kleine-Königendif
414477ca45SUwe Kleine-König
42a5b9177fSRussell Kingobj-$(CONFIG_MMU)		+= bugs.o
43e1689795SRobert Leeobj-$(CONFIG_CPU_IDLE)		+= cpuidle.o
44065909b9SRussell Kingobj-$(CONFIG_ISA_DMA_API)	+= dma.o
45dc2eb928SDave Martinobj-$(CONFIG_FIQ)		+= fiq.o fiqasm.o
468478132aSRussell Kingobj-$(CONFIG_MODULES)		+= armksyms.o module.o
477d485f64SArd Biesheuvelobj-$(CONFIG_ARM_MODULE_PLTS)	+= module-plts.o
48863dab45SRussell Kingobj-$(CONFIG_PCI)		+= bios32.o isa.o
491fdb24e9SLinus Torvaldsobj-$(CONFIG_ARM_CPU_SUSPEND)	+= sleep.o suspend.o
50603fb42aSSebastian Capellaobj-$(CONFIG_HIBERNATION)	+= hibernate.o
518006b4d1SJonathan Austinobj-$(CONFIG_SMP)		+= smp.o
528006b4d1SJonathan Austinifdef CONFIG_MMU
538006b4d1SJonathan Austinobj-$(CONFIG_SMP)		+= smp_tlb.o
548006b4d1SJonathan Austinendif
55a8cbcd92SRussell Kingobj-$(CONFIG_HAVE_ARM_SCU)	+= smp_scu.o
56f32f4ce2SRussell Kingobj-$(CONFIG_HAVE_ARM_TWD)	+= smp_twd.o
57022c03a2SMarc Zyngierobj-$(CONFIG_ARM_ARCH_TIMER)	+= arch_timer.o
5882112379SRussell Kingobj-$(CONFIG_FUNCTION_TRACER)	+= entry-ftrace.o
595a735583SPeter Zijlstraobj-$(CONFIG_DYNAMIC_FTRACE)	+= ftrace.o insn.o patch.o
605a735583SPeter Zijlstraobj-$(CONFIG_FUNCTION_GRAPH_TRACER)	+= ftrace.o insn.o patch.o
6109f05d85SRabin Vincentobj-$(CONFIG_JUMP_LABEL)	+= jump_label.o insn.o patch.o
62dccf78d3SBaoquan Heobj-$(CONFIG_KEXEC_CORE)	+= machine_kexec.o relocate_kernel.o
63*199da871SBaoquan Heobj-$(CONFIG_VMCORE_INFO)	+= vmcore_info.o
64fca08f32SWang Nan# Main staffs in KPROBES are in arch/arm/probes/ .
650dc016dbSWang Nanobj-$(CONFIG_KPROBES)		+= patch.o insn.o
66687ad019SNicolas Pitreobj-$(CONFIG_OABI_COMPAT)	+= sys_oabi-compat.o
67d7f864beSCatalin Marinasobj-$(CONFIG_ARM_THUMBEE)	+= thumbee.o
6823a4e405SDoug Andersonobj-$(CONFIG_KGDB)		+= kgdb.o patch.o
69adf8b37bSCatalin Marinasobj-$(CONFIG_ARM_UNWIND)	+= unwind.o
70bc581770SLinus Walleijobj-$(CONFIG_HAVE_TCM)		+= tcm.o
719eb8f674SGrant Likelyobj-$(CONFIG_OF)		+= devtree.o
7267742c81SMika Westerbergobj-$(CONFIG_CRASH_DUMP)	+= crash_dump.o
7364d2dc38SLeif Lindholmobj-$(CONFIG_SWP_EMULATE)	+= swp_emulate.o
7419852e59SWill Deaconobj-$(CONFIG_HAVE_HW_BREAKPOINT)	+= hw_breakpoint.o
751da177e4SLinus Torvalds
76afe4b25eSLennert Buytenhekobj-$(CONFIG_CPU_XSCALE)	+= xscale-cp0.o
77afe4b25eSLennert Buytenhekobj-$(CONFIG_CPU_XSC3)		+= xscale-cp0.o
7840305a58SEric Miaoobj-$(CONFIG_CPU_MOHAWK)	+= xscale-cp0.o
79afe4b25eSLennert Buytenhekobj-$(CONFIG_IWMMXT)		+= iwmmxt.o
80d39976f0SMark Rutlandobj-$(CONFIG_PERF_EVENTS)	+= perf_regs.o perf_callchain.o
811da177e4SLinus TorvaldsAFLAGS_iwmmxt.o			:= -Wa,-mcpu=iwmmxt
82c9018aabSVincent Guittotobj-$(CONFIG_ARM_CPU_TOPOLOGY)  += topology.o
83e5b61debSNathan Lynchobj-$(CONFIG_VDSO)		+= vdso.o
84da58fb65SArd Biesheuvelobj-$(CONFIG_EFI)		+= efi.o
8502c2433bSStefano Stabelliniobj-$(CONFIG_PARAVIRT)	+= paravirt.o
861da177e4SLinus Torvalds
8732164845SMasahiro Yamadaobj-y			+= head$(MMUEXT).o
881da177e4SLinus Torvaldsobj-$(CONFIG_DEBUG_LL)	+= debug.o
8993fd03a8SCatalin Marinasobj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
90eae78e1aSArd Biesheuvelobj-$(CONFIG_ARM_PATCH_PHYS_VIRT)	+= phys2virt.o
911da177e4SLinus Torvalds
92ca8b5d97SNicolas Pitre# This is executed very early using a temporary stack when no memory allocator
93ca8b5d97SNicolas Pitre# nor global data is available. Everything has to be allocated on the stack.
94ca8b5d97SNicolas PitreCFLAGS_head-inflate-data.o := $(call cc-option,-Wframe-larger-than=10240)
95ca8b5d97SNicolas Pitreobj-$(CONFIG_XIP_DEFLATED_DATA) += head-inflate-data.o
96ca8b5d97SNicolas Pitre
9780c59dafSDave Martinobj-$(CONFIG_ARM_VIRT_EXT)	+= hyp-stub.o
9805774088SStefano Stabelliniifeq ($(CONFIG_ARM_PSCI),y)
9905774088SStefano Stabelliniobj-$(CONFIG_SMP)		+= psci_smp.o
10005774088SStefano Stabelliniendif
10180c59dafSDave Martin
102b329f95dSJens Wiklanderobj-$(CONFIG_HAVE_ARM_SMCCC)	+= smccc-call.o
103b329f95dSJens Wiklander
1049dd78194SRussell King (Oracle)obj-$(CONFIG_GENERIC_CPU_VULNERABILITIES) += spectre.o
1059dd78194SRussell King (Oracle)
10632164845SMasahiro Yamadaextra-y := vmlinux.lds
107