1 # SPDX-License-Identifier: GPL-2.0 << 2 # 1 # 3 # Makefile for the Linux/SuperH kernel. !! 2 # Makefile for the linux kernel. 4 # 3 # 5 4 6 extra-y := vmlinux.lds !! 5 extra-y := head.o init_task.o vmlinux.lds.s 7 6 8 ifdef CONFIG_FUNCTION_TRACER !! 7 obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \ 9 # Do not profile debug and lowlevel utilities !! 8 ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \ 10 CFLAGS_REMOVE_ftrace.o = -pg !! 9 pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \ 11 endif !! 10 doublefault.o 12 << 13 CFLAGS_REMOVE_return_address.o = -pg << 14 << 15 obj-y := head_32.o debugtraps.o dumpstack.o << 16 idle.o io.o irq.o irq_32.o kdebugfs << 17 machvec.o nmi_debug.o process.o << 18 process_32.o ptrace.o ptrace_32.o << 19 reboot.o return_address.o << 20 setup.o signal_32.o sys_sh.o << 21 syscalls_32.o time.o topology.o tra << 22 traps_32.o unwinder.o << 23 << 24 ifndef CONFIG_GENERIC_IOMAP << 25 obj-y += iomap.o << 26 obj-$(CONFIG_HAS_IOPORT_MAP) += ioport.o << 27 endif << 28 11 29 obj-y += sys_sh32.o << 30 obj-y += cpu/ 12 obj-y += cpu/ 31 obj-$(CONFIG_VSYSCALL) += vsyscall/ !! 13 obj-y += timers/ 32 obj-$(CONFIG_SMP) += smp.o !! 14 obj-$(CONFIG_ACPI_BOOT) += acpi/ 33 obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o !! 15 obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o 34 obj-$(CONFIG_KGDB) += kgdb.o !! 16 obj-$(CONFIG_MCA) += mca.o 35 obj-$(CONFIG_MODULES) += sh_ksyms_32 !! 17 obj-$(CONFIG_X86_MSR) += msr.o 36 obj-$(CONFIG_KEXEC_CORE) += machine_kex !! 18 obj-$(CONFIG_X86_CPUID) += cpuid.o 37 obj-$(CONFIG_VMCORE_INFO) += vmcore_info !! 19 obj-$(CONFIG_MICROCODE) += microcode.o 38 obj-$(CONFIG_CRASH_DUMP) += crash_dump. !! 20 obj-$(CONFIG_APM) += apm.o 39 obj-$(CONFIG_STACKTRACE) += stacktrace. !! 21 obj-$(CONFIG_X86_SMP) += smp.o smpboot.o 40 obj-$(CONFIG_IO_TRAPPED) += io_trapped. !! 22 obj-$(CONFIG_X86_TRAMPOLINE) += trampoline.o 41 obj-$(CONFIG_KPROBES) += kprobes.o !! 23 obj-$(CONFIG_X86_MPPARSE) += mpparse.o 42 obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o !! 24 obj-$(CONFIG_X86_LOCAL_APIC) += apic.o nmi.o 43 obj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o !! 25 obj-$(CONFIG_X86_IO_APIC) += io_apic.o 44 obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace. !! 26 obj-$(CONFIG_X86_NUMAQ) += numaq.o 45 obj-$(CONFIG_DUMP_CODE) += disassemble !! 27 obj-$(CONFIG_X86_SUMMIT) += summit.o 46 obj-$(CONFIG_HIBERNATION) += swsusp.o !! 28 obj-$(CONFIG_EDD) += edd.o 47 obj-$(CONFIG_DWARF_UNWINDER) += dwarf.o !! 29 obj-$(CONFIG_MODULES) += module.o 48 obj-$(CONFIG_PERF_EVENTS) += perf_event. !! 30 obj-y += sysenter.o vsyscall.o 49 obj-$(CONFIG_DMA_NONCOHERENT) += dma-coheren !! 31 obj-$(CONFIG_ACPI_SRAT) += srat.o 50 obj-$(CONFIG_HAVE_HW_BREAKPOINT) !! 32 obj-$(CONFIG_HPET_TIMER) += time_hpet.o >> 33 >> 34 EXTRA_AFLAGS := -traditional >> 35 >> 36 obj-$(CONFIG_SCx200) += scx200.o >> 37 >> 38 # vsyscall.o contains the vsyscall DSO images as __initdata. >> 39 # We must build both images before we can assemble it. >> 40 # Note: kbuild does not track this dependency due to usage of .incbin >> 41 $(obj)/vsyscall.o: $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so >> 42 targets += $(foreach F,int80 sysenter,vsyscall-$F.o vsyscall-$F.so) >> 43 >> 44 # The DSO images are built using a special linker script. >> 45 quiet_cmd_syscall = SYSCALL $@ >> 46 cmd_syscall = $(CC) -nostdlib $(SYSCFLAGS_$(@F)) \ >> 47 -Wl,-T,$(filter-out FORCE,$^) -o $@ >> 48 >> 49 vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 >> 50 SYSCFLAGS_vsyscall-sysenter.so = $(vsyscall-flags) >> 51 SYSCFLAGS_vsyscall-int80.so = $(vsyscall-flags) >> 52 >> 53 $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so: \ >> 54 $(obj)/vsyscall-%.so: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE >> 55 $(call if_changed,syscall) >> 56 >> 57 # We also create a special relocatable object that should mirror the symbol >> 58 # table and layout of the linked DSO. With ld -R we can then refer to >> 59 # these symbols in the kernel code rather than hand-coded addresses. >> 60 extra-y += vsyscall-syms.o >> 61 $(obj)/built-in.o: $(obj)/vsyscall-syms.o >> 62 $(obj)/built-in.o: ld_flags += -R $(obj)/vsyscall-syms.o >> 63 >> 64 SYSCFLAGS_vsyscall-syms.o = -r >> 65 $(obj)/vsyscall-syms.o: $(src)/vsyscall.lds $(obj)/vsyscall-sysenter.o FORCE >> 66 $(call if_changed,syscall)
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.