diff options
52 files changed, 188 insertions, 209 deletions
diff --git a/Documentation/early-userspace/README b/Documentation/early-userspace/README index 2c00b072a4c8..1e1057958dd3 100644 --- a/Documentation/early-userspace/README +++ b/Documentation/early-userspace/README | |||
| @@ -66,17 +66,17 @@ early userspace image can be built by an unprivileged user. | |||
| 66 | 66 | ||
| 67 | As a technical note, when directories and files are specified, the | 67 | As a technical note, when directories and files are specified, the |
| 68 | entire CONFIG_INITRAMFS_SOURCE is passed to | 68 | entire CONFIG_INITRAMFS_SOURCE is passed to |
| 69 | scripts/gen_initramfs_list.sh. This means that CONFIG_INITRAMFS_SOURCE | 69 | usr/gen_initramfs_list.sh. This means that CONFIG_INITRAMFS_SOURCE |
| 70 | can really be interpreted as any legal argument to | 70 | can really be interpreted as any legal argument to |
| 71 | gen_initramfs_list.sh. If a directory is specified as an argument then | 71 | gen_initramfs_list.sh. If a directory is specified as an argument then |
| 72 | the contents are scanned, uid/gid translation is performed, and | 72 | the contents are scanned, uid/gid translation is performed, and |
| 73 | usr/gen_init_cpio file directives are output. If a directory is | 73 | usr/gen_init_cpio file directives are output. If a directory is |
| 74 | specified as an argument to scripts/gen_initramfs_list.sh then the | 74 | specified as an argument to usr/gen_initramfs_list.sh then the |
| 75 | contents of the file are simply copied to the output. All of the output | 75 | contents of the file are simply copied to the output. All of the output |
| 76 | directives from directory scanning and file contents copying are | 76 | directives from directory scanning and file contents copying are |
| 77 | processed by usr/gen_init_cpio. | 77 | processed by usr/gen_init_cpio. |
| 78 | 78 | ||
| 79 | See also 'scripts/gen_initramfs_list.sh -h'. | 79 | See also 'usr/gen_initramfs_list.sh -h'. |
| 80 | 80 | ||
| 81 | Where's this all leading? | 81 | Where's this all leading? |
| 82 | ========================= | 82 | ========================= |
diff --git a/Documentation/filesystems/ramfs-rootfs-initramfs.txt b/Documentation/filesystems/ramfs-rootfs-initramfs.txt index b176928e6963..79637d227e85 100644 --- a/Documentation/filesystems/ramfs-rootfs-initramfs.txt +++ b/Documentation/filesystems/ramfs-rootfs-initramfs.txt | |||
| @@ -164,7 +164,7 @@ Documentation/early-userspace/README for more details.) | |||
| 164 | The kernel does not depend on external cpio tools. If you specify a | 164 | The kernel does not depend on external cpio tools. If you specify a |
| 165 | directory instead of a configuration file, the kernel's build infrastructure | 165 | directory instead of a configuration file, the kernel's build infrastructure |
| 166 | creates a configuration file from that directory (usr/Makefile calls | 166 | creates a configuration file from that directory (usr/Makefile calls |
| 167 | scripts/gen_initramfs_list.sh), and proceeds to package up that directory | 167 | usr/gen_initramfs_list.sh), and proceeds to package up that directory |
| 168 | using the config file (by feeding it to usr/gen_init_cpio, which is created | 168 | using the config file (by feeding it to usr/gen_init_cpio, which is created |
| 169 | from usr/gen_init_cpio.c). The kernel's build-time cpio creation code is | 169 | from usr/gen_init_cpio.c). The kernel's build-time cpio creation code is |
| 170 | entirely self-contained, and the kernel's boot-time extractor is also | 170 | entirely self-contained, and the kernel's boot-time extractor is also |
diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt index c54cb7cb9ff4..864e740811da 100644 --- a/Documentation/kbuild/kconfig-language.txt +++ b/Documentation/kbuild/kconfig-language.txt | |||
| @@ -545,7 +545,7 @@ make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.recursion-issue-02 allnoconfig | |||
| 545 | Practical solutions to kconfig recursive issue | 545 | Practical solutions to kconfig recursive issue |
| 546 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 546 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 547 | 547 | ||
| 548 | Developers who run into the recursive Kconfig issue have three options | 548 | Developers who run into the recursive Kconfig issue have two options |
| 549 | at their disposal. We document them below and also provide a list of | 549 | at their disposal. We document them below and also provide a list of |
| 550 | historical issues resolved through these different solutions. | 550 | historical issues resolved through these different solutions. |
| 551 | 551 | ||
| @@ -553,7 +553,6 @@ historical issues resolved through these different solutions. | |||
| 553 | b) Match dependency semantics: | 553 | b) Match dependency semantics: |
| 554 | b1) Swap all "select FOO" to "depends on FOO" or, | 554 | b1) Swap all "select FOO" to "depends on FOO" or, |
| 555 | b2) Swap all "depends on FOO" to "select FOO" | 555 | b2) Swap all "depends on FOO" to "select FOO" |
| 556 | c) Consider the use of "imply" instead of "select" | ||
| 557 | 556 | ||
| 558 | The resolution to a) can be tested with the sample Kconfig file | 557 | The resolution to a) can be tested with the sample Kconfig file |
| 559 | Documentation/kbuild/Kconfig.recursion-issue-01 through the removal | 558 | Documentation/kbuild/Kconfig.recursion-issue-01 through the removal |
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index 766355b1d221..7b6a2b2bdc98 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt | |||
| @@ -680,7 +680,7 @@ Both possibilities are described in the following. | |||
| 680 | 680 | ||
| 681 | Example: | 681 | Example: |
| 682 | #scripts/kconfig/Makefile | 682 | #scripts/kconfig/Makefile |
| 683 | HOSTLOADLIBES_qconf := -L$(QTDIR)/lib | 683 | HOSTLDLIBS_qconf := -L$(QTDIR)/lib |
| 684 | 684 | ||
| 685 | When linking qconf, it will be passed the extra option | 685 | When linking qconf, it will be passed the extra option |
| 686 | "-L$(QTDIR)/lib". | 686 | "-L$(QTDIR)/lib". |
| @@ -440,7 +440,7 @@ KBUILD_CFLAGS_KERNEL := | |||
| 440 | KBUILD_AFLAGS_MODULE := -DMODULE | 440 | KBUILD_AFLAGS_MODULE := -DMODULE |
| 441 | KBUILD_CFLAGS_MODULE := -DMODULE | 441 | KBUILD_CFLAGS_MODULE := -DMODULE |
| 442 | KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds | 442 | KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds |
| 443 | LDFLAGS := | 443 | KBUILD_LDFLAGS := |
| 444 | GCC_PLUGINS_CFLAGS := | 444 | GCC_PLUGINS_CFLAGS := |
| 445 | 445 | ||
| 446 | export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC | 446 | export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC |
| @@ -448,7 +448,7 @@ export CPP AR NM STRIP OBJCOPY OBJDUMP KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS | |||
| 448 | export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE | 448 | export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE |
| 449 | export HOSTCXX KBUILD_HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS | 449 | export HOSTCXX KBUILD_HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS |
| 450 | 450 | ||
| 451 | export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS | 451 | export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS KBUILD_LDFLAGS |
| 452 | export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE | 452 | export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE |
| 453 | export CFLAGS_KASAN CFLAGS_KASAN_NOSANITIZE CFLAGS_UBSAN | 453 | export CFLAGS_KASAN CFLAGS_KASAN_NOSANITIZE CFLAGS_UBSAN |
| 454 | export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE | 454 | export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE |
| @@ -790,8 +790,8 @@ KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once) | |||
| 790 | endif | 790 | endif |
| 791 | 791 | ||
| 792 | ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION | 792 | ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION |
| 793 | KBUILD_CFLAGS_KERNEL += $(call cc-option,-ffunction-sections,) | 793 | KBUILD_CFLAGS_KERNEL += -ffunction-sections -fdata-sections |
| 794 | KBUILD_CFLAGS_KERNEL += $(call cc-option,-fdata-sections,) | 794 | LDFLAGS_vmlinux += --gc-sections |
| 795 | endif | 795 | endif |
| 796 | 796 | ||
| 797 | # arch Makefile may override CC so keep this after arch Makefile is included | 797 | # arch Makefile may override CC so keep this after arch Makefile is included |
| @@ -857,10 +857,6 @@ LDFLAGS_BUILD_ID := $(call ld-option, --build-id) | |||
| 857 | KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) | 857 | KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) |
| 858 | LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) | 858 | LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) |
| 859 | 859 | ||
| 860 | ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION | ||
| 861 | LDFLAGS_vmlinux += $(call ld-option, --gc-sections,) | ||
| 862 | endif | ||
| 863 | |||
| 864 | ifeq ($(CONFIG_STRIP_ASM_SYMS),y) | 860 | ifeq ($(CONFIG_STRIP_ASM_SYMS),y) |
| 865 | LDFLAGS_vmlinux += $(call ld-option, -X,) | 861 | LDFLAGS_vmlinux += $(call ld-option, -X,) |
| 866 | endif | 862 | endif |
| @@ -1024,7 +1020,7 @@ ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink) | |||
| 1024 | 1020 | ||
| 1025 | # Final link of vmlinux with optional arch pass after final link | 1021 | # Final link of vmlinux with optional arch pass after final link |
| 1026 | cmd_link-vmlinux = \ | 1022 | cmd_link-vmlinux = \ |
| 1027 | $(CONFIG_SHELL) $< $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) ; \ | 1023 | $(CONFIG_SHELL) $< $(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_vmlinux) ; \ |
| 1028 | $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true) | 1024 | $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true) |
| 1029 | 1025 | ||
| 1030 | vmlinux: scripts/link-vmlinux.sh autoksyms_recursive $(vmlinux-deps) FORCE | 1026 | vmlinux: scripts/link-vmlinux.sh autoksyms_recursive $(vmlinux-deps) FORCE |
| @@ -1354,16 +1350,12 @@ distclean: mrproper | |||
| 1354 | 1350 | ||
| 1355 | # Packaging of the kernel to various formats | 1351 | # Packaging of the kernel to various formats |
| 1356 | # --------------------------------------------------------------------------- | 1352 | # --------------------------------------------------------------------------- |
| 1357 | # rpm target kept for backward compatibility | ||
| 1358 | package-dir := scripts/package | 1353 | package-dir := scripts/package |
| 1359 | 1354 | ||
| 1360 | %src-pkg: FORCE | 1355 | %src-pkg: FORCE |
| 1361 | $(Q)$(MAKE) $(build)=$(package-dir) $@ | 1356 | $(Q)$(MAKE) $(build)=$(package-dir) $@ |
| 1362 | %pkg: include/config/kernel.release FORCE | 1357 | %pkg: include/config/kernel.release FORCE |
| 1363 | $(Q)$(MAKE) $(build)=$(package-dir) $@ | 1358 | $(Q)$(MAKE) $(build)=$(package-dir) $@ |
| 1364 | rpm: rpm-pkg | ||
| 1365 | @echo " WARNING: \"rpm\" target will be removed after Linux 4.18" | ||
| 1366 | @echo " Please use \"rpm-pkg\" instead." | ||
| 1367 | 1359 | ||
| 1368 | 1360 | ||
| 1369 | # Brief documentation of the typical targets used | 1361 | # Brief documentation of the typical targets used |
diff --git a/arch/arc/Makefile b/arch/arc/Makefile index 6c1b20dd76ad..fb026196aaab 100644 --- a/arch/arc/Makefile +++ b/arch/arc/Makefile | |||
| @@ -95,7 +95,7 @@ KBUILD_CFLAGS_MODULE += -mlong-calls -mno-millicode | |||
| 95 | # Finally dump eveything into kernel build system | 95 | # Finally dump eveything into kernel build system |
| 96 | KBUILD_CFLAGS += $(cflags-y) | 96 | KBUILD_CFLAGS += $(cflags-y) |
| 97 | KBUILD_AFLAGS += $(KBUILD_CFLAGS) | 97 | KBUILD_AFLAGS += $(KBUILD_CFLAGS) |
| 98 | LDFLAGS += $(ldflags-y) | 98 | KBUILD_LDFLAGS += $(ldflags-y) |
| 99 | 99 | ||
| 100 | head-y := arch/arc/kernel/head.o | 100 | head-y := arch/arc/kernel/head.o |
| 101 | 101 | ||
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index ed94cf7e3157..d1516f85f25d 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
| @@ -43,12 +43,12 @@ ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) | |||
| 43 | KBUILD_CPPFLAGS += -mbig-endian | 43 | KBUILD_CPPFLAGS += -mbig-endian |
| 44 | CHECKFLAGS += -D__ARMEB__ | 44 | CHECKFLAGS += -D__ARMEB__ |
| 45 | AS += -EB | 45 | AS += -EB |
| 46 | LDFLAGS += -EB | 46 | KBUILD_LDFLAGS += -EB |
| 47 | else | 47 | else |
| 48 | KBUILD_CPPFLAGS += -mlittle-endian | 48 | KBUILD_CPPFLAGS += -mlittle-endian |
| 49 | CHECKFLAGS += -D__ARMEL__ | 49 | CHECKFLAGS += -D__ARMEL__ |
| 50 | AS += -EL | 50 | AS += -EL |
| 51 | LDFLAGS += -EL | 51 | KBUILD_LDFLAGS += -EL |
| 52 | endif | 52 | endif |
| 53 | 53 | ||
| 54 | # | 54 | # |
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index efe61a2e4b5e..106039d25e2f 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile | |||
| @@ -62,14 +62,14 @@ CHECKFLAGS += -D__AARCH64EB__ | |||
| 62 | AS += -EB | 62 | AS += -EB |
| 63 | # Prefer the baremetal ELF build target, but not all toolchains include | 63 | # Prefer the baremetal ELF build target, but not all toolchains include |
| 64 | # it so fall back to the standard linux version if needed. | 64 | # it so fall back to the standard linux version if needed. |
| 65 | LDFLAGS += -EB $(call ld-option, -maarch64elfb, -maarch64linuxb) | 65 | KBUILD_LDFLAGS += -EB $(call ld-option, -maarch64elfb, -maarch64linuxb) |
| 66 | UTS_MACHINE := aarch64_be | 66 | UTS_MACHINE := aarch64_be |
| 67 | else | 67 | else |
| 68 | KBUILD_CPPFLAGS += -mlittle-endian | 68 | KBUILD_CPPFLAGS += -mlittle-endian |
| 69 | CHECKFLAGS += -D__AARCH64EL__ | 69 | CHECKFLAGS += -D__AARCH64EL__ |
| 70 | AS += -EL | 70 | AS += -EL |
| 71 | # Same as above, prefer ELF but fall back to linux target if needed. | 71 | # Same as above, prefer ELF but fall back to linux target if needed. |
| 72 | LDFLAGS += -EL $(call ld-option, -maarch64elf, -maarch64linux) | 72 | KBUILD_LDFLAGS += -EL $(call ld-option, -maarch64elf, -maarch64linux) |
| 73 | UTS_MACHINE := aarch64 | 73 | UTS_MACHINE := aarch64 |
| 74 | endif | 74 | endif |
| 75 | 75 | ||
diff --git a/arch/c6x/Makefile b/arch/c6x/Makefile index 6ab942e6c534..3fe8a948e94c 100644 --- a/arch/c6x/Makefile +++ b/arch/c6x/Makefile | |||
| @@ -23,8 +23,7 @@ ifdef CONFIG_CPU_BIG_ENDIAN | |||
| 23 | KBUILD_CFLAGS += -mbig-endian | 23 | KBUILD_CFLAGS += -mbig-endian |
| 24 | KBUILD_AFLAGS += -mbig-endian | 24 | KBUILD_AFLAGS += -mbig-endian |
| 25 | LINKFLAGS += -mbig-endian | 25 | LINKFLAGS += -mbig-endian |
| 26 | KBUILD_LDFLAGS += -mbig-endian | 26 | KBUILD_LDFLAGS += -mbig-endian -EB |
| 27 | LDFLAGS += -EB | ||
| 28 | CHECKFLAGS += -D_BIG_ENDIAN | 27 | CHECKFLAGS += -D_BIG_ENDIAN |
| 29 | endif | 28 | endif |
| 30 | 29 | ||
diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile index cc12b162c222..58634e6bae92 100644 --- a/arch/h8300/Makefile +++ b/arch/h8300/Makefile | |||
| @@ -22,7 +22,7 @@ KBUILD_CFLAGS += -mint32 -fno-builtin | |||
| 22 | KBUILD_CFLAGS += -D__linux__ | 22 | KBUILD_CFLAGS += -D__linux__ |
| 23 | KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" | 23 | KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" |
| 24 | KBUILD_AFLAGS += $(aflags-y) | 24 | KBUILD_AFLAGS += $(aflags-y) |
| 25 | LDFLAGS += $(ldflags-y) | 25 | KBUILD_LDFLAGS += $(ldflags-y) |
| 26 | 26 | ||
| 27 | CHECKFLAGS += -msize-long | 27 | CHECKFLAGS += -msize-long |
| 28 | 28 | ||
diff --git a/arch/hexagon/Makefile b/arch/hexagon/Makefile index 2efaa18e995a..4c5858b80f0e 100644 --- a/arch/hexagon/Makefile +++ b/arch/hexagon/Makefile | |||
| @@ -22,9 +22,7 @@ ldflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION}) | |||
| 22 | 22 | ||
| 23 | KBUILD_CFLAGS += $(cflags-y) | 23 | KBUILD_CFLAGS += $(cflags-y) |
| 24 | KBUILD_AFLAGS += $(aflags-y) | 24 | KBUILD_AFLAGS += $(aflags-y) |
| 25 | 25 | KBUILD_LDFLAGS += $(ldflags-y) | |
| 26 | # no KBUILD_LDFLAGS? | ||
| 27 | LDFLAGS += $(ldflags-y) | ||
| 28 | 26 | ||
| 29 | # Thread-info register will be r19. This value is not configureable; | 27 | # Thread-info register will be r19. This value is not configureable; |
| 30 | # it is hard-coded in several files. | 28 | # it is hard-coded in several files. |
diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile index f0dd9fc84002..997c9f20ea0f 100644 --- a/arch/m68k/Makefile +++ b/arch/m68k/Makefile | |||
| @@ -69,7 +69,7 @@ KBUILD_CFLAGS += -D__uClinux__ | |||
| 69 | KBUILD_AFLAGS += -D__uClinux__ | 69 | KBUILD_AFLAGS += -D__uClinux__ |
| 70 | endif | 70 | endif |
| 71 | 71 | ||
| 72 | LDFLAGS := -m m68kelf | 72 | KBUILD_LDFLAGS := -m m68kelf |
| 73 | KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds | 73 | KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds |
| 74 | 74 | ||
| 75 | ifdef CONFIG_SUN3 | 75 | ifdef CONFIG_SUN3 |
diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index 73330360a8e6..4f3ab5707265 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile | |||
| @@ -40,11 +40,11 @@ CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare | |||
| 40 | ifdef CONFIG_CPU_BIG_ENDIAN | 40 | ifdef CONFIG_CPU_BIG_ENDIAN |
| 41 | KBUILD_CFLAGS += -mbig-endian | 41 | KBUILD_CFLAGS += -mbig-endian |
| 42 | KBUILD_AFLAGS += -mbig-endian | 42 | KBUILD_AFLAGS += -mbig-endian |
| 43 | LDFLAGS += -EB | 43 | KBUILD_LDFLAGS += -EB |
| 44 | else | 44 | else |
| 45 | KBUILD_CFLAGS += -mlittle-endian | 45 | KBUILD_CFLAGS += -mlittle-endian |
| 46 | KBUILD_AFLAGS += -mlittle-endian | 46 | KBUILD_AFLAGS += -mlittle-endian |
| 47 | LDFLAGS += -EL | 47 | KBUILD_LDFLAGS += -EL |
| 48 | endif | 48 | endif |
| 49 | 49 | ||
| 50 | CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER)) | 50 | CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER)) |
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 5425df002a6b..d74b3742fa5d 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
| @@ -309,7 +309,7 @@ endif | |||
| 309 | # instead of .eh_frame so we don't discard them. | 309 | # instead of .eh_frame so we don't discard them. |
| 310 | KBUILD_CFLAGS += -fno-asynchronous-unwind-tables | 310 | KBUILD_CFLAGS += -fno-asynchronous-unwind-tables |
| 311 | 311 | ||
| 312 | LDFLAGS += -m $(ld-emul) | 312 | KBUILD_LDFLAGS += -m $(ld-emul) |
| 313 | 313 | ||
| 314 | ifdef CONFIG_MIPS | 314 | ifdef CONFIG_MIPS |
| 315 | CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \ | 315 | CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \ |
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile index abe77add8789..3c453a1f1ff1 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile | |||
| @@ -92,7 +92,7 @@ UIMAGE_LOADADDR = $(VMLINUZ_LOAD_ADDRESS) | |||
| 92 | vmlinuzobjs-y += $(obj)/piggy.o | 92 | vmlinuzobjs-y += $(obj)/piggy.o |
| 93 | 93 | ||
| 94 | quiet_cmd_zld = LD $@ | 94 | quiet_cmd_zld = LD $@ |
| 95 | cmd_zld = $(LD) $(LDFLAGS) -Ttext $(VMLINUZ_LOAD_ADDRESS) -T $< $(vmlinuzobjs-y) -o $@ | 95 | cmd_zld = $(LD) $(KBUILD_LDFLAGS) -Ttext $(VMLINUZ_LOAD_ADDRESS) -T $< $(vmlinuzobjs-y) -o $@ |
| 96 | quiet_cmd_strip = STRIP $@ | 96 | quiet_cmd_strip = STRIP $@ |
| 97 | cmd_strip = $(STRIP) -s $@ | 97 | cmd_strip = $(STRIP) -s $@ |
| 98 | vmlinuz: $(src)/ld.script $(vmlinuzobjs-y) $(obj)/calc_vmlinuz_load_addr | 98 | vmlinuz: $(src)/ld.script $(vmlinuzobjs-y) $(obj)/calc_vmlinuz_load_addr |
diff --git a/arch/mips/lasat/image/Makefile b/arch/mips/lasat/image/Makefile index 9ab1326f57c9..78ce4cff1012 100644 --- a/arch/mips/lasat/image/Makefile +++ b/arch/mips/lasat/image/Makefile | |||
| @@ -38,7 +38,7 @@ $(obj)/rom.bin: $(obj)/rom | |||
| 38 | 38 | ||
| 39 | # Rule to make the bootloader | 39 | # Rule to make the bootloader |
| 40 | $(obj)/rom: $(addprefix $(obj)/,$(OBJECTS)) | 40 | $(obj)/rom: $(addprefix $(obj)/,$(OBJECTS)) |
| 41 | $(LD) $(LDFLAGS) $(LDSCRIPT) -o $@ $^ | 41 | $(LD) $(KBUILD_LDFLAGS) $(LDSCRIPT) -o $@ $^ |
| 42 | 42 | ||
| 43 | $(obj)/%.o: $(obj)/%.gz | 43 | $(obj)/%.o: $(obj)/%.gz |
| 44 | $(LD) -r -o $@ -b binary $< | 44 | $(LD) -r -o $@ -b binary $< |
diff --git a/arch/nds32/Makefile b/arch/nds32/Makefile index 031c676821ff..63f4f173e5f4 100644 --- a/arch/nds32/Makefile +++ b/arch/nds32/Makefile | |||
| @@ -33,12 +33,12 @@ endif | |||
| 33 | ifdef CONFIG_CPU_LITTLE_ENDIAN | 33 | ifdef CONFIG_CPU_LITTLE_ENDIAN |
| 34 | KBUILD_CFLAGS += $(call cc-option, -EL) | 34 | KBUILD_CFLAGS += $(call cc-option, -EL) |
| 35 | KBUILD_AFLAGS += $(call cc-option, -EL) | 35 | KBUILD_AFLAGS += $(call cc-option, -EL) |
| 36 | LDFLAGS += $(call cc-option, -EL) | 36 | KBUILD_LDFLAGS += $(call cc-option, -EL) |
| 37 | CHECKFLAGS += -D__NDS32_EL__ | 37 | CHECKFLAGS += -D__NDS32_EL__ |
| 38 | else | 38 | else |
| 39 | KBUILD_CFLAGS += $(call cc-option, -EB) | 39 | KBUILD_CFLAGS += $(call cc-option, -EB) |
| 40 | KBUILD_AFLAGS += $(call cc-option, -EB) | 40 | KBUILD_AFLAGS += $(call cc-option, -EB) |
| 41 | LDFLAGS += $(call cc-option, -EB) | 41 | KBUILD_LDFLAGS += $(call cc-option, -EB) |
| 42 | CHECKFLAGS += -D__NDS32_EB__ | 42 | CHECKFLAGS += -D__NDS32_EB__ |
| 43 | endif | 43 | endif |
| 44 | 44 | ||
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 8397c7bd5880..11a1acba164a 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
| @@ -76,14 +76,14 @@ endif | |||
| 76 | 76 | ||
| 77 | ifdef CONFIG_CPU_LITTLE_ENDIAN | 77 | ifdef CONFIG_CPU_LITTLE_ENDIAN |
| 78 | KBUILD_CFLAGS += -mlittle-endian | 78 | KBUILD_CFLAGS += -mlittle-endian |
| 79 | LDFLAGS += -EL | 79 | KBUILD_LDFLAGS += -EL |
| 80 | LDEMULATION := lppc | 80 | LDEMULATION := lppc |
| 81 | GNUTARGET := powerpcle | 81 | GNUTARGET := powerpcle |
| 82 | MULTIPLEWORD := -mno-multiple | 82 | MULTIPLEWORD := -mno-multiple |
| 83 | KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-save-toc-indirect) | 83 | KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-save-toc-indirect) |
| 84 | else | 84 | else |
| 85 | KBUILD_CFLAGS += $(call cc-option,-mbig-endian) | 85 | KBUILD_CFLAGS += $(call cc-option,-mbig-endian) |
| 86 | LDFLAGS += -EB | 86 | KBUILD_LDFLAGS += -EB |
| 87 | LDEMULATION := ppc | 87 | LDEMULATION := ppc |
| 88 | GNUTARGET := powerpc | 88 | GNUTARGET := powerpc |
| 89 | MULTIPLEWORD := -mmultiple | 89 | MULTIPLEWORD := -mmultiple |
| @@ -108,7 +108,7 @@ aflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mlittle-endian | |||
| 108 | ifeq ($(HAS_BIARCH),y) | 108 | ifeq ($(HAS_BIARCH),y) |
| 109 | KBUILD_CFLAGS += -m$(BITS) | 109 | KBUILD_CFLAGS += -m$(BITS) |
| 110 | KBUILD_AFLAGS += -m$(BITS) -Wl,-a$(BITS) | 110 | KBUILD_AFLAGS += -m$(BITS) -Wl,-a$(BITS) |
| 111 | LDFLAGS += -m elf$(BITS)$(LDEMULATION) | 111 | KBUILD_LDFLAGS += -m elf$(BITS)$(LDEMULATION) |
| 112 | KBUILD_ARFLAGS += --target=elf$(BITS)-$(GNUTARGET) | 112 | KBUILD_ARFLAGS += --target=elf$(BITS)-$(GNUTARGET) |
| 113 | endif | 113 | endif |
| 114 | 114 | ||
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index 9ddd88bb30b7..61ec42405ec9 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile | |||
| @@ -29,7 +29,7 @@ ifeq ($(CONFIG_ARCH_RV64I),y) | |||
| 29 | KBUILD_CFLAGS += $(call cc-ifversion, -ge, 0500, -DCONFIG_ARCH_SUPPORTS_INT128) | 29 | KBUILD_CFLAGS += $(call cc-ifversion, -ge, 0500, -DCONFIG_ARCH_SUPPORTS_INT128) |
| 30 | 30 | ||
| 31 | KBUILD_MARCH = rv64im | 31 | KBUILD_MARCH = rv64im |
| 32 | LDFLAGS += -melf64lriscv | 32 | KBUILD_LDFLAGS += -melf64lriscv |
| 33 | else | 33 | else |
| 34 | BITS := 32 | 34 | BITS := 32 |
| 35 | UTS_MACHINE := riscv32 | 35 | UTS_MACHINE := riscv32 |
| @@ -37,7 +37,7 @@ else | |||
| 37 | KBUILD_CFLAGS += -mabi=ilp32 | 37 | KBUILD_CFLAGS += -mabi=ilp32 |
| 38 | KBUILD_AFLAGS += -mabi=ilp32 | 38 | KBUILD_AFLAGS += -mabi=ilp32 |
| 39 | KBUILD_MARCH = rv32im | 39 | KBUILD_MARCH = rv32im |
| 40 | LDFLAGS += -melf32lriscv | 40 | KBUILD_LDFLAGS += -melf32lriscv |
| 41 | endif | 41 | endif |
| 42 | 42 | ||
| 43 | KBUILD_CFLAGS += -Wall | 43 | KBUILD_CFLAGS += -Wall |
diff --git a/arch/s390/Makefile b/arch/s390/Makefile index ba6d122526fb..ee65185bbc80 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | # | 11 | # |
| 12 | 12 | ||
| 13 | LD_BFD := elf64-s390 | 13 | LD_BFD := elf64-s390 |
| 14 | LDFLAGS := -m elf64_s390 | 14 | KBUILD_LDFLAGS := -m elf64_s390 |
| 15 | KBUILD_AFLAGS_MODULE += -fPIC | 15 | KBUILD_AFLAGS_MODULE += -fPIC |
| 16 | KBUILD_CFLAGS_MODULE += -fPIC | 16 | KBUILD_CFLAGS_MODULE += -fPIC |
| 17 | KBUILD_AFLAGS += -m64 | 17 | KBUILD_AFLAGS += -m64 |
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 65300193b99f..c521ade2557c 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile | |||
| @@ -122,11 +122,11 @@ endif | |||
| 122 | ifdef CONFIG_CPU_LITTLE_ENDIAN | 122 | ifdef CONFIG_CPU_LITTLE_ENDIAN |
| 123 | ld-bfd := elf32-$(UTS_MACHINE)-linux | 123 | ld-bfd := elf32-$(UTS_MACHINE)-linux |
| 124 | LDFLAGS_vmlinux += --defsym jiffies=jiffies_64 --oformat $(ld-bfd) | 124 | LDFLAGS_vmlinux += --defsym jiffies=jiffies_64 --oformat $(ld-bfd) |
| 125 | LDFLAGS += -EL | 125 | KBUILD_LDFLAGS += -EL |
| 126 | else | 126 | else |
| 127 | ld-bfd := elf32-$(UTS_MACHINE)big-linux | 127 | ld-bfd := elf32-$(UTS_MACHINE)big-linux |
| 128 | LDFLAGS_vmlinux += --defsym jiffies=jiffies_64+4 --oformat $(ld-bfd) | 128 | LDFLAGS_vmlinux += --defsym jiffies=jiffies_64+4 --oformat $(ld-bfd) |
| 129 | LDFLAGS += -EB | 129 | KBUILD_LDFLAGS += -EB |
| 130 | endif | 130 | endif |
| 131 | 131 | ||
| 132 | export ld-bfd BITS | 132 | export ld-bfd BITS |
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile index e32ef20de567..048a033d6102 100644 --- a/arch/sparc/Makefile +++ b/arch/sparc/Makefile | |||
| @@ -21,7 +21,7 @@ ifeq ($(CONFIG_SPARC32),y) | |||
| 21 | # | 21 | # |
| 22 | 22 | ||
| 23 | CHECKFLAGS += -D__sparc__ | 23 | CHECKFLAGS += -D__sparc__ |
| 24 | LDFLAGS := -m elf32_sparc | 24 | KBUILD_LDFLAGS := -m elf32_sparc |
| 25 | export BITS := 32 | 25 | export BITS := 32 |
| 26 | UTS_MACHINE := sparc | 26 | UTS_MACHINE := sparc |
| 27 | 27 | ||
| @@ -40,7 +40,7 @@ else | |||
| 40 | # | 40 | # |
| 41 | 41 | ||
| 42 | CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -D__arch64__ | 42 | CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -D__arch64__ |
| 43 | LDFLAGS := -m elf64_sparc | 43 | KBUILD_LDFLAGS := -m elf64_sparc |
| 44 | export BITS := 64 | 44 | export BITS := 64 |
| 45 | UTS_MACHINE := sparc64 | 45 | UTS_MACHINE := sparc64 |
| 46 | 46 | ||
diff --git a/arch/um/Makefile b/arch/um/Makefile index 44ddc3e8fa66..ab1066c38944 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
| @@ -133,7 +133,7 @@ export LDS_ELF_FORMAT := $(ELF_FORMAT) | |||
| 133 | # The wrappers will select whether using "malloc" or the kernel allocator. | 133 | # The wrappers will select whether using "malloc" or the kernel allocator. |
| 134 | LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc | 134 | LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc |
| 135 | 135 | ||
| 136 | LD_FLAGS_CMDLINE = $(foreach opt,$(LDFLAGS),-Wl,$(opt)) | 136 | LD_FLAGS_CMDLINE = $(foreach opt,$(KBUILD_LDFLAGS),-Wl,$(opt)) |
| 137 | 137 | ||
| 138 | # Used by link-vmlinux.sh which has special support for um link | 138 | # Used by link-vmlinux.sh which has special support for um link |
| 139 | export CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE) | 139 | export CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE) |
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 7e3c07d6ad42..94859241bc3e 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile | |||
| @@ -219,7 +219,7 @@ sha256_ni_instr :=$(call as-instr,sha256msg1 %xmm0$(comma)%xmm1,-DCONFIG_AS_SHA2 | |||
| 219 | KBUILD_AFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) | 219 | KBUILD_AFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) |
| 220 | KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) | 220 | KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) |
| 221 | 221 | ||
| 222 | LDFLAGS := -m elf_$(UTS_MACHINE) | 222 | KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE) |
| 223 | 223 | ||
| 224 | # | 224 | # |
| 225 | # The 64-bit kernel must be aligned to 2MB. Pass -z max-page-size=0x200000 to | 225 | # The 64-bit kernel must be aligned to 2MB. Pass -z max-page-size=0x200000 to |
| @@ -227,7 +227,7 @@ LDFLAGS := -m elf_$(UTS_MACHINE) | |||
| 227 | # by the linker. | 227 | # by the linker. |
| 228 | # | 228 | # |
| 229 | ifdef CONFIG_X86_64 | 229 | ifdef CONFIG_X86_64 |
| 230 | LDFLAGS += $(call ld-option, -z max-page-size=0x200000) | 230 | KBUILD_LDFLAGS += $(call ld-option, -z max-page-size=0x200000) |
| 231 | endif | 231 | endif |
| 232 | 232 | ||
| 233 | # Speed up the build | 233 | # Speed up the build |
diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um index 5296f8c9e7f0..91085a08de6c 100644 --- a/arch/x86/Makefile.um +++ b/arch/x86/Makefile.um | |||
| @@ -4,7 +4,7 @@ core-y += arch/x86/crypto/ | |||
| 4 | ifeq ($(CONFIG_X86_32),y) | 4 | ifeq ($(CONFIG_X86_32),y) |
| 5 | START := 0x8048000 | 5 | START := 0x8048000 |
| 6 | 6 | ||
| 7 | LDFLAGS += -m elf_i386 | 7 | KBUILD_LDFLAGS += -m elf_i386 |
| 8 | ELF_ARCH := i386 | 8 | ELF_ARCH := i386 |
| 9 | ELF_FORMAT := elf32-i386 | 9 | ELF_FORMAT := elf32-i386 |
| 10 | CHECKFLAGS += -D__i386__ | 10 | CHECKFLAGS += -D__i386__ |
| @@ -43,7 +43,7 @@ KBUILD_CFLAGS += -fno-builtin -m64 | |||
| 43 | 43 | ||
| 44 | CHECKFLAGS += -m64 -D__x86_64__ | 44 | CHECKFLAGS += -m64 -D__x86_64__ |
| 45 | KBUILD_AFLAGS += -m64 | 45 | KBUILD_AFLAGS += -m64 |
| 46 | LDFLAGS += -m elf_x86_64 | 46 | KBUILD_LDFLAGS += -m elf_x86_64 |
| 47 | KBUILD_CPPFLAGS += -m64 | 47 | KBUILD_CPPFLAGS += -m64 |
| 48 | 48 | ||
| 49 | ELF_ARCH := i386:x86-64 | 49 | ELF_ARCH := i386:x86-64 |
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index 169c2feda14a..28764dacf018 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile | |||
| @@ -42,16 +42,16 @@ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ | |||
| 42 | GCOV_PROFILE := n | 42 | GCOV_PROFILE := n |
| 43 | UBSAN_SANITIZE :=n | 43 | UBSAN_SANITIZE :=n |
| 44 | 44 | ||
| 45 | LDFLAGS := -m elf_$(UTS_MACHINE) | 45 | KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE) |
| 46 | # Compressed kernel should be built as PIE since it may be loaded at any | 46 | # Compressed kernel should be built as PIE since it may be loaded at any |
| 47 | # address by the bootloader. | 47 | # address by the bootloader. |
| 48 | ifeq ($(CONFIG_X86_32),y) | 48 | ifeq ($(CONFIG_X86_32),y) |
| 49 | LDFLAGS += $(call ld-option, -pie) $(call ld-option, --no-dynamic-linker) | 49 | KBUILD_LDFLAGS += $(call ld-option, -pie) $(call ld-option, --no-dynamic-linker) |
| 50 | else | 50 | else |
| 51 | # To build 64-bit compressed kernel as PIE, we disable relocation | 51 | # To build 64-bit compressed kernel as PIE, we disable relocation |
| 52 | # overflow check to avoid relocation overflow error with a new linker | 52 | # overflow check to avoid relocation overflow error with a new linker |
| 53 | # command-line option, -z noreloc-overflow. | 53 | # command-line option, -z noreloc-overflow. |
| 54 | LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \ | 54 | KBUILD_LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \ |
| 55 | && echo "-z noreloc-overflow -pie --no-dynamic-linker") | 55 | && echo "-z noreloc-overflow -pie --no-dynamic-linker") |
| 56 | endif | 56 | endif |
| 57 | LDFLAGS_vmlinux := -T | 57 | LDFLAGS_vmlinux := -T |
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile index 3a934b72a272..295c120ed099 100644 --- a/arch/xtensa/Makefile +++ b/arch/xtensa/Makefile | |||
| @@ -49,7 +49,7 @@ KBUILD_CFLAGS += $(call cc-option,-mno-serialize-volatile,) | |||
| 49 | KBUILD_AFLAGS += -mlongcalls -mtext-section-literals | 49 | KBUILD_AFLAGS += -mlongcalls -mtext-section-literals |
| 50 | 50 | ||
| 51 | ifneq ($(CONFIG_LD_NO_RELAX),) | 51 | ifneq ($(CONFIG_LD_NO_RELAX),) |
| 52 | LDFLAGS := --no-relax | 52 | KBUILD_LDFLAGS := --no-relax |
| 53 | endif | 53 | endif |
| 54 | 54 | ||
| 55 | ifeq ($(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#"),1) | 55 | ifeq ($(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#"),1) |
diff --git a/arch/xtensa/boot/boot-elf/Makefile b/arch/xtensa/boot/boot-elf/Makefile index 521471981356..12ae1e91cb75 100644 --- a/arch/xtensa/boot/boot-elf/Makefile +++ b/arch/xtensa/boot/boot-elf/Makefile | |||
| @@ -25,7 +25,7 @@ $(obj)/Image.o: vmlinux.bin $(OBJS) | |||
| 25 | $(OBJS) $@ | 25 | $(OBJS) $@ |
| 26 | 26 | ||
| 27 | $(obj)/../Image.elf: $(obj)/Image.o $(obj)/boot.lds | 27 | $(obj)/../Image.elf: $(obj)/Image.o $(obj)/boot.lds |
| 28 | $(Q)$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \ | 28 | $(Q)$(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_vmlinux) \ |
| 29 | -T $(obj)/boot.lds \ | 29 | -T $(obj)/boot.lds \ |
| 30 | --build-id=none \ | 30 | --build-id=none \ |
| 31 | -o $@ $(obj)/Image.o | 31 | -o $@ $(obj)/Image.o |
diff --git a/certs/system_certificates.S b/certs/system_certificates.S index 3918ff7235ed..8f29058adf93 100644 --- a/certs/system_certificates.S +++ b/certs/system_certificates.S | |||
| @@ -5,8 +5,8 @@ | |||
| 5 | __INITRODATA | 5 | __INITRODATA |
| 6 | 6 | ||
| 7 | .align 8 | 7 | .align 8 |
| 8 | .globl VMLINUX_SYMBOL(system_certificate_list) | 8 | .globl system_certificate_list |
| 9 | VMLINUX_SYMBOL(system_certificate_list): | 9 | system_certificate_list: |
| 10 | __cert_list_start: | 10 | __cert_list_start: |
| 11 | #ifdef CONFIG_MODULE_SIG | 11 | #ifdef CONFIG_MODULE_SIG |
| 12 | .incbin "certs/signing_key.x509" | 12 | .incbin "certs/signing_key.x509" |
| @@ -15,21 +15,21 @@ __cert_list_start: | |||
| 15 | __cert_list_end: | 15 | __cert_list_end: |
| 16 | 16 | ||
| 17 | #ifdef CONFIG_SYSTEM_EXTRA_CERTIFICATE | 17 | #ifdef CONFIG_SYSTEM_EXTRA_CERTIFICATE |
| 18 | .globl VMLINUX_SYMBOL(system_extra_cert) | 18 | .globl system_extra_cert |
| 19 | .size system_extra_cert, CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE | 19 | .size system_extra_cert, CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE |
| 20 | VMLINUX_SYMBOL(system_extra_cert): | 20 | system_extra_cert: |
| 21 | .fill CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE, 1, 0 | 21 | .fill CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE, 1, 0 |
| 22 | 22 | ||
| 23 | .align 4 | 23 | .align 4 |
| 24 | .globl VMLINUX_SYMBOL(system_extra_cert_used) | 24 | .globl system_extra_cert_used |
| 25 | VMLINUX_SYMBOL(system_extra_cert_used): | 25 | system_extra_cert_used: |
| 26 | .int 0 | 26 | .int 0 |
| 27 | 27 | ||
| 28 | #endif /* CONFIG_SYSTEM_EXTRA_CERTIFICATE */ | 28 | #endif /* CONFIG_SYSTEM_EXTRA_CERTIFICATE */ |
| 29 | 29 | ||
| 30 | .align 8 | 30 | .align 8 |
| 31 | .globl VMLINUX_SYMBOL(system_certificate_list_size) | 31 | .globl system_certificate_list_size |
| 32 | VMLINUX_SYMBOL(system_certificate_list_size): | 32 | system_certificate_list_size: |
| 33 | #ifdef CONFIG_64BIT | 33 | #ifdef CONFIG_64BIT |
| 34 | .quad __cert_list_end - __cert_list_start | 34 | .quad __cert_list_end - __cert_list_start |
| 35 | #else | 35 | #else |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index f173b5f30dbe..7b75ff6e2fce 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
| @@ -54,8 +54,6 @@ | |||
| 54 | #define LOAD_OFFSET 0 | 54 | #define LOAD_OFFSET 0 |
| 55 | #endif | 55 | #endif |
| 56 | 56 | ||
| 57 | #include <linux/export.h> | ||
| 58 | |||
| 59 | /* Align . to a 8 byte boundary equals to maximum function alignment. */ | 57 | /* Align . to a 8 byte boundary equals to maximum function alignment. */ |
| 60 | #define ALIGN_FUNCTION() . = ALIGN(8) | 58 | #define ALIGN_FUNCTION() . = ALIGN(8) |
| 61 | 59 | ||
diff --git a/include/linux/export.h b/include/linux/export.h index ae072bc5aacf..ce764a5d2ee4 100644 --- a/include/linux/export.h +++ b/include/linux/export.h | |||
| @@ -10,13 +10,6 @@ | |||
| 10 | * hackers place grumpy comments in header files. | 10 | * hackers place grumpy comments in header files. |
| 11 | */ | 11 | */ |
| 12 | 12 | ||
| 13 | #define __VMLINUX_SYMBOL(x) x | ||
| 14 | #define __VMLINUX_SYMBOL_STR(x) #x | ||
| 15 | |||
| 16 | /* Indirect, so macros are expanded before pasting. */ | ||
| 17 | #define VMLINUX_SYMBOL(x) __VMLINUX_SYMBOL(x) | ||
| 18 | #define VMLINUX_SYMBOL_STR(x) __VMLINUX_SYMBOL_STR(x) | ||
| 19 | |||
| 20 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
| 21 | #ifdef MODULE | 14 | #ifdef MODULE |
| 22 | extern struct module __this_module; | 15 | extern struct module __this_module; |
diff --git a/init/Kconfig b/init/Kconfig index 641dd7dd7c8a..1e234e2f1cba 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
| @@ -1097,6 +1097,8 @@ config LD_DEAD_CODE_DATA_ELIMINATION | |||
| 1097 | bool "Dead code and data elimination (EXPERIMENTAL)" | 1097 | bool "Dead code and data elimination (EXPERIMENTAL)" |
| 1098 | depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION | 1098 | depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION |
| 1099 | depends on EXPERT | 1099 | depends on EXPERT |
| 1100 | depends on $(cc-option,-ffunction-sections -fdata-sections) | ||
| 1101 | depends on $(ld-option,--gc-sections) | ||
| 1100 | help | 1102 | help |
| 1101 | Enable this if you want to do dead code and data elimination with | 1103 | Enable this if you want to do dead code and data elimination with |
| 1102 | the linker by compiling with -ffunction-sections -fdata-sections, | 1104 | the linker by compiling with -ffunction-sections -fdata-sections, |
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 7c98f60e2266..c75413d05a63 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
| @@ -163,8 +163,8 @@ cc-ldoption = $(call try-run,\ | |||
| 163 | $(CC) $(1) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2)) | 163 | $(CC) $(1) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2)) |
| 164 | 164 | ||
| 165 | # ld-option | 165 | # ld-option |
| 166 | # Usage: LDFLAGS += $(call ld-option, -X, -Y) | 166 | # Usage: KBUILD_LDFLAGS += $(call ld-option, -X, -Y) |
| 167 | ld-option = $(call try-run, $(LD) $(LDFLAGS) $(1) -v,$(1),$(2),$(3)) | 167 | ld-option = $(call try-run, $(LD) $(KBUILD_LDFLAGS) $(1) -v,$(1),$(2),$(3)) |
| 168 | 168 | ||
| 169 | # ar-option | 169 | # ar-option |
| 170 | # Usage: KBUILD_ARFLAGS := $(call ar-option,D) | 170 | # Usage: KBUILD_ARFLAGS := $(call ar-option,D) |
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 93b8e24b0e15..1c48572223d1 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
| @@ -190,7 +190,7 @@ cmd_modversions_c = \ | |||
| 190 | $(call cmd_gensymtypes_c,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ | 190 | $(call cmd_gensymtypes_c,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ |
| 191 | > $(@D)/.tmp_$(@F:.o=.ver); \ | 191 | > $(@D)/.tmp_$(@F:.o=.ver); \ |
| 192 | \ | 192 | \ |
| 193 | $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ | 193 | $(LD) $(KBUILD_LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ |
| 194 | -T $(@D)/.tmp_$(@F:.o=.ver); \ | 194 | -T $(@D)/.tmp_$(@F:.o=.ver); \ |
| 195 | rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ | 195 | rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ |
| 196 | else \ | 196 | else \ |
| @@ -220,7 +220,7 @@ sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH | |||
| 220 | "$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \ | 220 | "$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \ |
| 221 | "$(if $(CONFIG_64BIT),64,32)" \ | 221 | "$(if $(CONFIG_64BIT),64,32)" \ |
| 222 | "$(OBJDUMP)" "$(OBJCOPY)" "$(CC) $(KBUILD_CFLAGS)" \ | 222 | "$(OBJDUMP)" "$(OBJCOPY)" "$(CC) $(KBUILD_CFLAGS)" \ |
| 223 | "$(LD)" "$(NM)" "$(RM)" "$(MV)" \ | 223 | "$(LD) $(KBUILD_LDFLAGS)" "$(NM)" "$(RM)" "$(MV)" \ |
| 224 | "$(if $(part-of-module),1,0)" "$(@)"; | 224 | "$(if $(part-of-module),1,0)" "$(@)"; |
| 225 | recordmcount_source := $(srctree)/scripts/recordmcount.pl | 225 | recordmcount_source := $(srctree)/scripts/recordmcount.pl |
| 226 | endif # BUILD_C_RECORDMCOUNT | 226 | endif # BUILD_C_RECORDMCOUNT |
| @@ -394,7 +394,7 @@ cmd_modversions_S = \ | |||
| 394 | $(call cmd_gensymtypes_S,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ | 394 | $(call cmd_gensymtypes_S,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ |
| 395 | > $(@D)/.tmp_$(@F:.o=.ver); \ | 395 | > $(@D)/.tmp_$(@F:.o=.ver); \ |
| 396 | \ | 396 | \ |
| 397 | $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ | 397 | $(LD) $(KBUILD_LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ |
| 398 | -T $(@D)/.tmp_$(@F:.o=.ver); \ | 398 | -T $(@D)/.tmp_$(@F:.o=.ver); \ |
| 399 | rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ | 399 | rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ |
| 400 | else \ | 400 | else \ |
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index df0fff252619..61e596650ed3 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
| @@ -162,7 +162,7 @@ a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ | |||
| 162 | cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ | 162 | cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ |
| 163 | $(__cpp_flags) | 163 | $(__cpp_flags) |
| 164 | 164 | ||
| 165 | ld_flags = $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) | 165 | ld_flags = $(KBUILD_LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) |
| 166 | 166 | ||
| 167 | DTC_INCLUDE := $(srctree)/scripts/dtc/include-prefixes | 167 | DTC_INCLUDE := $(srctree)/scripts/dtc/include-prefixes |
| 168 | 168 | ||
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index dd92dbbbaa68..7d4af0d0accb 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost | |||
| @@ -120,7 +120,7 @@ ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink) | |||
| 120 | # Step 6), final link of the modules with optional arch pass after final link | 120 | # Step 6), final link of the modules with optional arch pass after final link |
| 121 | quiet_cmd_ld_ko_o = LD [M] $@ | 121 | quiet_cmd_ld_ko_o = LD [M] $@ |
| 122 | cmd_ld_ko_o = \ | 122 | cmd_ld_ko_o = \ |
| 123 | $(LD) -r $(LDFLAGS) \ | 123 | $(LD) -r $(KBUILD_LDFLAGS) \ |
| 124 | $(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \ | 124 | $(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \ |
| 125 | -o $@ $(filter-out FORCE,$^) ; \ | 125 | -o $@ $(filter-out FORCE,$^) ; \ |
| 126 | $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true) | 126 | $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true) |
diff --git a/scripts/clang-version.sh b/scripts/clang-version.sh index dbf0a31eb111..e65fbc3079d4 100755 --- a/scripts/clang-version.sh +++ b/scripts/clang-version.sh | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | compiler="$*" | 13 | compiler="$*" |
| 14 | 14 | ||
| 15 | if !( $compiler --version | grep -q clang) ; then | 15 | if ! ( $compiler --version | grep -q clang) ; then |
| 16 | echo 0 | 16 | echo 0 |
| 17 | exit 1 | 17 | exit 1 |
| 18 | fi | 18 | fi |
diff --git a/scripts/coccinelle/api/alloc/zalloc-simple.cocci b/scripts/coccinelle/api/alloc/zalloc-simple.cocci index 92b20913055f..d819275b7fde 100644 --- a/scripts/coccinelle/api/alloc/zalloc-simple.cocci +++ b/scripts/coccinelle/api/alloc/zalloc-simple.cocci | |||
| @@ -35,8 +35,7 @@ statement S; | |||
| 35 | 35 | ||
| 36 | * x = (T)\(kmalloc(E1, ...)\|vmalloc(E1)\|dma_alloc_coherent(...,E1,...)\| | 36 | * x = (T)\(kmalloc(E1, ...)\|vmalloc(E1)\|dma_alloc_coherent(...,E1,...)\| |
| 37 | kmalloc_node(E1, ...)\|kmem_cache_alloc(...)\|kmem_alloc(E1, ...)\| | 37 | kmalloc_node(E1, ...)\|kmem_cache_alloc(...)\|kmem_alloc(E1, ...)\| |
| 38 | devm_kmalloc(...,E1,...)\|kvmalloc(E1, ...)\|pci_alloc_consistent(...,E1,...)\| | 38 | devm_kmalloc(...,E1,...)\|kvmalloc(E1, ...)\|kvmalloc_node(E1,...)\); |
| 39 | kvmalloc_node(E1,...)\); | ||
| 40 | if ((x==NULL) || ...) S | 39 | if ((x==NULL) || ...) S |
| 41 | * memset((T2)x,0,E1); | 40 | * memset((T2)x,0,E1); |
| 42 | 41 | ||
| @@ -124,15 +123,6 @@ statement S; | |||
| 124 | - x = (T)kvmalloc(E1,E2); | 123 | - x = (T)kvmalloc(E1,E2); |
| 125 | + x = (T)kvzalloc(E1,E2); | 124 | + x = (T)kvzalloc(E1,E2); |
| 126 | | | 125 | | |
| 127 | - x = pci_alloc_consistent(E2,E1,E3); | ||
| 128 | + x = pci_zalloc_consistent(E2,E1,E3); | ||
| 129 | | | ||
| 130 | - x = (T *)pci_alloc_consistent(E2,E1,E3); | ||
| 131 | + x = pci_zalloc_consistent(E2,E1,E3); | ||
| 132 | | | ||
| 133 | - x = (T)pci_alloc_consistent(E2,E1,E3); | ||
| 134 | + x = (T)pci_zalloc_consistent(E2,E1,E3); | ||
| 135 | | | ||
| 136 | - x = kvmalloc_node(E1,E2,E3); | 126 | - x = kvmalloc_node(E1,E2,E3); |
| 137 | + x = kvzalloc_node(E1,E2,E3); | 127 | + x = kvzalloc_node(E1,E2,E3); |
| 138 | | | 128 | | |
| @@ -389,35 +379,6 @@ msg="WARNING: kvzalloc should be used for %s, instead of kvmalloc/memset" % (x) | |||
| 389 | coccilib.report.print_report(p[0], msg) | 379 | coccilib.report.print_report(p[0], msg) |
| 390 | 380 | ||
| 391 | //----------------------------------------------------------------- | 381 | //----------------------------------------------------------------- |
| 392 | @r8 depends on org || report@ | ||
| 393 | type T, T2; | ||
| 394 | expression x; | ||
| 395 | expression E1,E2,E3; | ||
| 396 | statement S; | ||
| 397 | position p; | ||
| 398 | @@ | ||
| 399 | |||
| 400 | x = (T)pci_alloc_consistent@p(E2,E1,E3); | ||
| 401 | if ((x==NULL) || ...) S | ||
| 402 | memset((T2)x,0,E1); | ||
| 403 | |||
| 404 | @script:python depends on org@ | ||
| 405 | p << r8.p; | ||
| 406 | x << r8.x; | ||
| 407 | @@ | ||
| 408 | |||
| 409 | msg="%s" % (x) | ||
| 410 | msg_safe=msg.replace("[","@(").replace("]",")") | ||
| 411 | coccilib.org.print_todo(p[0], msg_safe) | ||
| 412 | |||
| 413 | @script:python depends on report@ | ||
| 414 | p << r8.p; | ||
| 415 | x << r8.x; | ||
| 416 | @@ | ||
| 417 | |||
| 418 | msg="WARNING: pci_zalloc_consistent should be used for %s, instead of pci_alloc_consistent/memset" % (x) | ||
| 419 | coccilib.report.print_report(p[0], msg) | ||
| 420 | //----------------------------------------------------------------- | ||
| 421 | @r9 depends on org || report@ | 382 | @r9 depends on org || report@ |
| 422 | type T, T2; | 383 | type T, T2; |
| 423 | expression x; | 384 | expression x; |
diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile index 9cac65b7419c..1c943e03eaf2 100644 --- a/scripts/dtc/Makefile +++ b/scripts/dtc/Makefile | |||
| @@ -9,21 +9,11 @@ dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \ | |||
| 9 | dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o | 9 | dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o |
| 10 | 10 | ||
| 11 | # Source files need to get at the userspace version of libfdt_env.h to compile | 11 | # Source files need to get at the userspace version of libfdt_env.h to compile |
| 12 | HOST_EXTRACFLAGS := -I$(src)/libfdt | ||
| 12 | 13 | ||
| 13 | HOSTCFLAGS_DTC := -I$(src) -I$(src)/libfdt | 14 | # Generated files need one more search path to include headers in source tree |
| 14 | 15 | HOSTCFLAGS_dtc-lexer.lex.o := -I$(src) | |
| 15 | HOSTCFLAGS_checks.o := $(HOSTCFLAGS_DTC) | 16 | HOSTCFLAGS_dtc-parser.tab.o := -I$(src) |
| 16 | HOSTCFLAGS_data.o := $(HOSTCFLAGS_DTC) | ||
| 17 | HOSTCFLAGS_dtc.o := $(HOSTCFLAGS_DTC) | ||
| 18 | HOSTCFLAGS_flattree.o := $(HOSTCFLAGS_DTC) | ||
| 19 | HOSTCFLAGS_fstree.o := $(HOSTCFLAGS_DTC) | ||
| 20 | HOSTCFLAGS_livetree.o := $(HOSTCFLAGS_DTC) | ||
| 21 | HOSTCFLAGS_srcpos.o := $(HOSTCFLAGS_DTC) | ||
| 22 | HOSTCFLAGS_treesource.o := $(HOSTCFLAGS_DTC) | ||
| 23 | HOSTCFLAGS_util.o := $(HOSTCFLAGS_DTC) | ||
| 24 | |||
| 25 | HOSTCFLAGS_dtc-lexer.lex.o := $(HOSTCFLAGS_DTC) | ||
| 26 | HOSTCFLAGS_dtc-parser.tab.o := $(HOSTCFLAGS_DTC) | ||
| 27 | 17 | ||
| 28 | # dependencies on generated files need to be listed explicitly | 18 | # dependencies on generated files need to be listed explicitly |
| 29 | $(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h | 19 | $(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h |
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 8d8791069abf..4a7bd2192073 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
| @@ -3,7 +3,8 @@ | |||
| 3 | # Kernel configuration targets | 3 | # Kernel configuration targets |
| 4 | # These targets are used from top-level makefile | 4 | # These targets are used from top-level makefile |
| 5 | 5 | ||
| 6 | PHONY += xconfig gconfig menuconfig config localmodconfig localyesconfig | 6 | PHONY += xconfig gconfig menuconfig config localmodconfig localyesconfig \ |
| 7 | build_menuconfig build_nconfig build_gconfig build_xconfig | ||
| 7 | 8 | ||
| 8 | ifdef KBUILD_KCONFIG | 9 | ifdef KBUILD_KCONFIG |
| 9 | Kconfig := $(KBUILD_KCONFIG) | 10 | Kconfig := $(KBUILD_KCONFIG) |
| @@ -33,6 +34,14 @@ config: $(obj)/conf | |||
| 33 | nconfig: $(obj)/nconf | 34 | nconfig: $(obj)/nconf |
| 34 | $< $(silent) $(Kconfig) | 35 | $< $(silent) $(Kconfig) |
| 35 | 36 | ||
| 37 | build_menuconfig: $(obj)/mconf | ||
| 38 | |||
| 39 | build_nconfig: $(obj)/nconf | ||
| 40 | |||
| 41 | build_gconfig: $(obj)/gconf | ||
| 42 | |||
| 43 | build_xconfig: $(obj)/qconf | ||
| 44 | |||
| 36 | localyesconfig localmodconfig: $(obj)/conf | 45 | localyesconfig localmodconfig: $(obj)/conf |
| 37 | $(Q)perl $(srctree)/$(src)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config | 46 | $(Q)perl $(srctree)/$(src)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config |
| 38 | $(Q)if [ -f .config ]; then \ | 47 | $(Q)if [ -f .config ]; then \ |
| @@ -169,7 +178,7 @@ HOSTLDLIBS_nconf = $(shell . $(obj)/.nconf-cfg && echo $$libs) | |||
| 169 | HOSTCFLAGS_nconf.o = $(shell . $(obj)/.nconf-cfg && echo $$cflags) | 178 | HOSTCFLAGS_nconf.o = $(shell . $(obj)/.nconf-cfg && echo $$cflags) |
| 170 | HOSTCFLAGS_nconf.gui.o = $(shell . $(obj)/.nconf-cfg && echo $$cflags) | 179 | HOSTCFLAGS_nconf.gui.o = $(shell . $(obj)/.nconf-cfg && echo $$cflags) |
| 171 | 180 | ||
| 172 | $(obj)/nconf.o: $(obj)/.nconf-cfg | 181 | $(obj)/nconf.o $(obj)/nconf.gui.o: $(obj)/.nconf-cfg |
| 173 | 182 | ||
| 174 | # mconf: Used for the menuconfig target based on lxdialog | 183 | # mconf: Used for the menuconfig target based on lxdialog |
| 175 | hostprogs-y += mconf | 184 | hostprogs-y += mconf |
| @@ -180,7 +189,8 @@ HOSTLDLIBS_mconf = $(shell . $(obj)/.mconf-cfg && echo $$libs) | |||
| 180 | $(foreach f, mconf.o $(lxdialog), \ | 189 | $(foreach f, mconf.o $(lxdialog), \ |
| 181 | $(eval HOSTCFLAGS_$f = $$(shell . $(obj)/.mconf-cfg && echo $$$$cflags))) | 190 | $(eval HOSTCFLAGS_$f = $$(shell . $(obj)/.mconf-cfg && echo $$$$cflags))) |
| 182 | 191 | ||
| 183 | $(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/.mconf-cfg | 192 | $(obj)/mconf.o: $(obj)/.mconf-cfg |
| 193 | $(addprefix $(obj)/lxdialog/, $(lxdialog)): $(obj)/.mconf-cfg | ||
| 184 | 194 | ||
| 185 | # qconf: Used for the xconfig target based on Qt | 195 | # qconf: Used for the xconfig target based on Qt |
| 186 | hostprogs-y += qconf | 196 | hostprogs-y += qconf |
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index b35cc9303979..7b2b37260669 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c | |||
| @@ -508,6 +508,11 @@ int main(int ac, char **av) | |||
| 508 | input_mode = (enum input_mode)opt; | 508 | input_mode = (enum input_mode)opt; |
| 509 | switch (opt) { | 509 | switch (opt) { |
| 510 | case syncconfig: | 510 | case syncconfig: |
| 511 | /* | ||
| 512 | * syncconfig is invoked during the build stage. | ||
| 513 | * Suppress distracting "configuration written to ..." | ||
| 514 | */ | ||
| 515 | conf_set_message_callback(NULL); | ||
| 511 | sync_kconfig = 1; | 516 | sync_kconfig = 1; |
| 512 | break; | 517 | break; |
| 513 | case defconfig: | 518 | case defconfig: |
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index 4ec8b1f0d42c..703b9b899ee9 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c | |||
| @@ -1011,7 +1011,7 @@ static struct dep_stack { | |||
| 1011 | struct dep_stack *prev, *next; | 1011 | struct dep_stack *prev, *next; |
| 1012 | struct symbol *sym; | 1012 | struct symbol *sym; |
| 1013 | struct property *prop; | 1013 | struct property *prop; |
| 1014 | struct expr *expr; | 1014 | struct expr **expr; |
| 1015 | } *check_top; | 1015 | } *check_top; |
| 1016 | 1016 | ||
| 1017 | static void dep_stack_insert(struct dep_stack *stack, struct symbol *sym) | 1017 | static void dep_stack_insert(struct dep_stack *stack, struct symbol *sym) |
| @@ -1076,31 +1076,42 @@ static void sym_check_print_recursive(struct symbol *last_sym) | |||
| 1076 | fprintf(stderr, "%s:%d:error: recursive dependency detected!\n", | 1076 | fprintf(stderr, "%s:%d:error: recursive dependency detected!\n", |
| 1077 | prop->file->name, prop->lineno); | 1077 | prop->file->name, prop->lineno); |
| 1078 | 1078 | ||
| 1079 | if (stack->expr) { | 1079 | if (sym_is_choice(sym)) { |
| 1080 | fprintf(stderr, "%s:%d:\tsymbol %s %s value contains %s\n", | 1080 | fprintf(stderr, "%s:%d:\tchoice %s contains symbol %s\n", |
| 1081 | prop->file->name, prop->lineno, | 1081 | menu->file->name, menu->lineno, |
| 1082 | sym->name ? sym->name : "<choice>", | 1082 | sym->name ? sym->name : "<choice>", |
| 1083 | prop_get_type_name(prop->type), | ||
| 1084 | next_sym->name ? next_sym->name : "<choice>"); | 1083 | next_sym->name ? next_sym->name : "<choice>"); |
| 1085 | } else if (stack->prop) { | 1084 | } else if (sym_is_choice_value(sym)) { |
| 1085 | fprintf(stderr, "%s:%d:\tsymbol %s is part of choice %s\n", | ||
| 1086 | menu->file->name, menu->lineno, | ||
| 1087 | sym->name ? sym->name : "<choice>", | ||
| 1088 | next_sym->name ? next_sym->name : "<choice>"); | ||
| 1089 | } else if (stack->expr == &sym->dir_dep.expr) { | ||
| 1086 | fprintf(stderr, "%s:%d:\tsymbol %s depends on %s\n", | 1090 | fprintf(stderr, "%s:%d:\tsymbol %s depends on %s\n", |
| 1087 | prop->file->name, prop->lineno, | 1091 | prop->file->name, prop->lineno, |
| 1088 | sym->name ? sym->name : "<choice>", | 1092 | sym->name ? sym->name : "<choice>", |
| 1089 | next_sym->name ? next_sym->name : "<choice>"); | 1093 | next_sym->name ? next_sym->name : "<choice>"); |
| 1090 | } else if (sym_is_choice(sym)) { | 1094 | } else if (stack->expr == &sym->rev_dep.expr) { |
| 1091 | fprintf(stderr, "%s:%d:\tchoice %s contains symbol %s\n", | 1095 | fprintf(stderr, "%s:%d:\tsymbol %s is selected by %s\n", |
| 1092 | menu->file->name, menu->lineno, | 1096 | prop->file->name, prop->lineno, |
| 1093 | sym->name ? sym->name : "<choice>", | 1097 | sym->name ? sym->name : "<choice>", |
| 1094 | next_sym->name ? next_sym->name : "<choice>"); | 1098 | next_sym->name ? next_sym->name : "<choice>"); |
| 1095 | } else if (sym_is_choice_value(sym)) { | 1099 | } else if (stack->expr == &sym->implied.expr) { |
| 1096 | fprintf(stderr, "%s:%d:\tsymbol %s is part of choice %s\n", | 1100 | fprintf(stderr, "%s:%d:\tsymbol %s is implied by %s\n", |
| 1097 | menu->file->name, menu->lineno, | 1101 | prop->file->name, prop->lineno, |
| 1102 | sym->name ? sym->name : "<choice>", | ||
| 1103 | next_sym->name ? next_sym->name : "<choice>"); | ||
| 1104 | } else if (stack->expr) { | ||
| 1105 | fprintf(stderr, "%s:%d:\tsymbol %s %s value contains %s\n", | ||
| 1106 | prop->file->name, prop->lineno, | ||
| 1098 | sym->name ? sym->name : "<choice>", | 1107 | sym->name ? sym->name : "<choice>", |
| 1108 | prop_get_type_name(prop->type), | ||
| 1099 | next_sym->name ? next_sym->name : "<choice>"); | 1109 | next_sym->name ? next_sym->name : "<choice>"); |
| 1100 | } else { | 1110 | } else { |
| 1101 | fprintf(stderr, "%s:%d:\tsymbol %s is selected by %s\n", | 1111 | fprintf(stderr, "%s:%d:\tsymbol %s %s is visible depending on %s\n", |
| 1102 | prop->file->name, prop->lineno, | 1112 | prop->file->name, prop->lineno, |
| 1103 | sym->name ? sym->name : "<choice>", | 1113 | sym->name ? sym->name : "<choice>", |
| 1114 | prop_get_type_name(prop->type), | ||
| 1104 | next_sym->name ? next_sym->name : "<choice>"); | 1115 | next_sym->name ? next_sym->name : "<choice>"); |
| 1105 | } | 1116 | } |
| 1106 | } | 1117 | } |
| @@ -1157,12 +1168,26 @@ static struct symbol *sym_check_sym_deps(struct symbol *sym) | |||
| 1157 | 1168 | ||
| 1158 | dep_stack_insert(&stack, sym); | 1169 | dep_stack_insert(&stack, sym); |
| 1159 | 1170 | ||
| 1171 | stack.expr = &sym->dir_dep.expr; | ||
| 1172 | sym2 = sym_check_expr_deps(sym->dir_dep.expr); | ||
| 1173 | if (sym2) | ||
| 1174 | goto out; | ||
| 1175 | |||
| 1176 | stack.expr = &sym->rev_dep.expr; | ||
| 1160 | sym2 = sym_check_expr_deps(sym->rev_dep.expr); | 1177 | sym2 = sym_check_expr_deps(sym->rev_dep.expr); |
| 1161 | if (sym2) | 1178 | if (sym2) |
| 1162 | goto out; | 1179 | goto out; |
| 1163 | 1180 | ||
| 1181 | stack.expr = &sym->implied.expr; | ||
| 1182 | sym2 = sym_check_expr_deps(sym->implied.expr); | ||
| 1183 | if (sym2) | ||
| 1184 | goto out; | ||
| 1185 | |||
| 1186 | stack.expr = NULL; | ||
| 1187 | |||
| 1164 | for (prop = sym->prop; prop; prop = prop->next) { | 1188 | for (prop = sym->prop; prop; prop = prop->next) { |
| 1165 | if (prop->type == P_CHOICE || prop->type == P_SELECT) | 1189 | if (prop->type == P_CHOICE || prop->type == P_SELECT || |
| 1190 | prop->type == P_IMPLY) | ||
| 1166 | continue; | 1191 | continue; |
| 1167 | stack.prop = prop; | 1192 | stack.prop = prop; |
| 1168 | sym2 = sym_check_expr_deps(prop->visible.expr); | 1193 | sym2 = sym_check_expr_deps(prop->visible.expr); |
| @@ -1170,7 +1195,7 @@ static struct symbol *sym_check_sym_deps(struct symbol *sym) | |||
| 1170 | break; | 1195 | break; |
| 1171 | if (prop->type != P_DEFAULT || sym_is_choice(sym)) | 1196 | if (prop->type != P_DEFAULT || sym_is_choice(sym)) |
| 1172 | continue; | 1197 | continue; |
| 1173 | stack.expr = prop->expr; | 1198 | stack.expr = &prop->expr; |
| 1174 | sym2 = sym_check_expr_deps(prop->expr); | 1199 | sym2 = sym_check_expr_deps(prop->expr); |
| 1175 | if (sym2) | 1200 | if (sym2) |
| 1176 | break; | 1201 | break; |
| @@ -1248,9 +1273,6 @@ struct symbol *sym_check_deps(struct symbol *sym) | |||
| 1248 | sym->flags &= ~SYMBOL_CHECK; | 1273 | sym->flags &= ~SYMBOL_CHECK; |
| 1249 | } | 1274 | } |
| 1250 | 1275 | ||
| 1251 | if (sym2 && sym2 == sym) | ||
| 1252 | sym2 = NULL; | ||
| 1253 | |||
| 1254 | return sym2; | 1276 | return sym2; |
| 1255 | } | 1277 | } |
| 1256 | 1278 | ||
diff --git a/scripts/kconfig/tests/warn_recursive_dep/Kconfig b/scripts/kconfig/tests/err_recursive_dep/Kconfig index a65bfcb7137e..ebdb3ffd8717 100644 --- a/scripts/kconfig/tests/warn_recursive_dep/Kconfig +++ b/scripts/kconfig/tests/err_recursive_dep/Kconfig | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 1 | # depends on itself | 3 | # depends on itself |
| 2 | 4 | ||
| 3 | config A | 5 | config A |
| @@ -31,7 +33,6 @@ config D2 | |||
| 31 | bool | 33 | bool |
| 32 | 34 | ||
| 33 | # depends on and imply | 35 | # depends on and imply |
| 34 | # This is not recursive dependency | ||
| 35 | 36 | ||
| 36 | config E1 | 37 | config E1 |
| 37 | bool "E1" | 38 | bool "E1" |
diff --git a/scripts/kconfig/tests/err_recursive_dep/__init__.py b/scripts/kconfig/tests/err_recursive_dep/__init__.py new file mode 100644 index 000000000000..5f3821b43ce6 --- /dev/null +++ b/scripts/kconfig/tests/err_recursive_dep/__init__.py | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0 | ||
| 2 | """ | ||
| 3 | Detect recursive dependency error. | ||
| 4 | |||
| 5 | Recursive dependency should be treated as an error. | ||
| 6 | """ | ||
| 7 | |||
| 8 | def test(conf): | ||
| 9 | assert conf.oldaskconfig() == 1 | ||
| 10 | assert conf.stderr_contains('expected_stderr') | ||
diff --git a/scripts/kconfig/tests/err_recursive_dep/expected_stderr b/scripts/kconfig/tests/err_recursive_dep/expected_stderr new file mode 100644 index 000000000000..84679b104655 --- /dev/null +++ b/scripts/kconfig/tests/err_recursive_dep/expected_stderr | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | Kconfig:11:error: recursive dependency detected! | ||
| 2 | Kconfig:11: symbol B is selected by B | ||
| 3 | For a resolution refer to Documentation/kbuild/kconfig-language.txt | ||
| 4 | subsection "Kconfig recursive dependency limitations" | ||
| 5 | |||
| 6 | Kconfig:5:error: recursive dependency detected! | ||
| 7 | Kconfig:5: symbol A depends on A | ||
| 8 | For a resolution refer to Documentation/kbuild/kconfig-language.txt | ||
| 9 | subsection "Kconfig recursive dependency limitations" | ||
| 10 | |||
| 11 | Kconfig:17:error: recursive dependency detected! | ||
| 12 | Kconfig:17: symbol C1 depends on C2 | ||
| 13 | Kconfig:21: symbol C2 depends on C1 | ||
| 14 | For a resolution refer to Documentation/kbuild/kconfig-language.txt | ||
| 15 | subsection "Kconfig recursive dependency limitations" | ||
| 16 | |||
| 17 | Kconfig:32:error: recursive dependency detected! | ||
| 18 | Kconfig:32: symbol D2 is selected by D1 | ||
| 19 | Kconfig:27: symbol D1 depends on D2 | ||
| 20 | For a resolution refer to Documentation/kbuild/kconfig-language.txt | ||
| 21 | subsection "Kconfig recursive dependency limitations" | ||
| 22 | |||
| 23 | Kconfig:37:error: recursive dependency detected! | ||
| 24 | Kconfig:37: symbol E1 depends on E2 | ||
| 25 | Kconfig:42: symbol E2 is implied by E1 | ||
| 26 | For a resolution refer to Documentation/kbuild/kconfig-language.txt | ||
| 27 | subsection "Kconfig recursive dependency limitations" | ||
| 28 | |||
| 29 | Kconfig:60:error: recursive dependency detected! | ||
| 30 | Kconfig:60: symbol G depends on G | ||
| 31 | For a resolution refer to Documentation/kbuild/kconfig-language.txt | ||
| 32 | subsection "Kconfig recursive dependency limitations" | ||
| 33 | |||
| 34 | Kconfig:51:error: recursive dependency detected! | ||
| 35 | Kconfig:51: symbol F2 depends on F1 | ||
| 36 | Kconfig:49: symbol F1 default value contains F2 | ||
| 37 | For a resolution refer to Documentation/kbuild/kconfig-language.txt | ||
| 38 | subsection "Kconfig recursive dependency limitations" | ||
diff --git a/scripts/kconfig/tests/warn_recursive_dep/__init__.py b/scripts/kconfig/tests/warn_recursive_dep/__init__.py deleted file mode 100644 index adb21951ba41..000000000000 --- a/scripts/kconfig/tests/warn_recursive_dep/__init__.py +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | """ | ||
| 2 | Warn recursive inclusion. | ||
| 3 | |||
| 4 | Recursive dependency should be warned. | ||
| 5 | """ | ||
| 6 | |||
| 7 | def test(conf): | ||
| 8 | assert conf.oldaskconfig() == 0 | ||
| 9 | assert conf.stderr_contains('expected_stderr') | ||
diff --git a/scripts/kconfig/tests/warn_recursive_dep/expected_stderr b/scripts/kconfig/tests/warn_recursive_dep/expected_stderr deleted file mode 100644 index 3de807dd9cb2..000000000000 --- a/scripts/kconfig/tests/warn_recursive_dep/expected_stderr +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | Kconfig:9:error: recursive dependency detected! | ||
| 2 | Kconfig:9: symbol B is selected by B | ||
| 3 | For a resolution refer to Documentation/kbuild/kconfig-language.txt | ||
| 4 | subsection "Kconfig recursive dependency limitations" | ||
| 5 | |||
| 6 | Kconfig:3:error: recursive dependency detected! | ||
| 7 | Kconfig:3: symbol A depends on A | ||
| 8 | For a resolution refer to Documentation/kbuild/kconfig-language.txt | ||
| 9 | subsection "Kconfig recursive dependency limitations" | ||
| 10 | |||
| 11 | Kconfig:15:error: recursive dependency detected! | ||
| 12 | Kconfig:15: symbol C1 depends on C2 | ||
| 13 | Kconfig:19: symbol C2 depends on C1 | ||
| 14 | For a resolution refer to Documentation/kbuild/kconfig-language.txt | ||
| 15 | subsection "Kconfig recursive dependency limitations" | ||
| 16 | |||
| 17 | Kconfig:30:error: recursive dependency detected! | ||
| 18 | Kconfig:30: symbol D2 is selected by D1 | ||
| 19 | Kconfig:25: symbol D1 depends on D2 | ||
| 20 | For a resolution refer to Documentation/kbuild/kconfig-language.txt | ||
| 21 | subsection "Kconfig recursive dependency limitations" | ||
| 22 | |||
| 23 | Kconfig:59:error: recursive dependency detected! | ||
| 24 | Kconfig:59: symbol G depends on G | ||
| 25 | For a resolution refer to Documentation/kbuild/kconfig-language.txt | ||
| 26 | subsection "Kconfig recursive dependency limitations" | ||
| 27 | |||
| 28 | Kconfig:50:error: recursive dependency detected! | ||
| 29 | Kconfig:50: symbol F2 depends on F1 | ||
| 30 | Kconfig:48: symbol F1 default value contains F2 | ||
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 4bf811c09f59..c8cf45362bd6 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh | |||
| @@ -75,7 +75,7 @@ modpost_link() | |||
| 75 | ${KBUILD_VMLINUX_LIBS} \ | 75 | ${KBUILD_VMLINUX_LIBS} \ |
| 76 | --end-group" | 76 | --end-group" |
| 77 | 77 | ||
| 78 | ${LD} ${LDFLAGS} -r -o ${1} ${objects} | 78 | ${LD} ${KBUILD_LDFLAGS} -r -o ${1} ${objects} |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | # Link of vmlinux | 81 | # Link of vmlinux |
| @@ -95,7 +95,7 @@ vmlinux_link() | |||
| 95 | --end-group \ | 95 | --end-group \ |
| 96 | ${1}" | 96 | ${1}" |
| 97 | 97 | ||
| 98 | ${LD} ${LDFLAGS} ${LDFLAGS_vmlinux} -o ${2} \ | 98 | ${LD} ${KBUILD_LDFLAGS} ${LDFLAGS_vmlinux} -o ${2} \ |
| 99 | -T ${lds} ${objects} | 99 | -T ${lds} ${objects} |
| 100 | else | 100 | else |
| 101 | objects="-Wl,--whole-archive \ | 101 | objects="-Wl,--whole-archive \ |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index dc6d714e4dcb..0d998c54564d 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
| @@ -672,7 +672,7 @@ static void handle_modversions(struct module *mod, struct elf_info *info, | |||
| 672 | if (ELF_ST_TYPE(sym->st_info) == STT_SPARC_REGISTER) | 672 | if (ELF_ST_TYPE(sym->st_info) == STT_SPARC_REGISTER) |
| 673 | break; | 673 | break; |
| 674 | if (symname[0] == '.') { | 674 | if (symname[0] == '.') { |
| 675 | char *munged = strdup(symname); | 675 | char *munged = NOFAIL(strdup(symname)); |
| 676 | munged[0] = '_'; | 676 | munged[0] = '_'; |
| 677 | munged[1] = toupper(munged[1]); | 677 | munged[1] = toupper(munged[1]); |
| 678 | symname = munged; | 678 | symname = munged; |
| @@ -1318,7 +1318,7 @@ static Elf_Sym *find_elf_symbol2(struct elf_info *elf, Elf_Addr addr, | |||
| 1318 | static char *sec2annotation(const char *s) | 1318 | static char *sec2annotation(const char *s) |
| 1319 | { | 1319 | { |
| 1320 | if (match(s, init_exit_sections)) { | 1320 | if (match(s, init_exit_sections)) { |
| 1321 | char *p = malloc(20); | 1321 | char *p = NOFAIL(malloc(20)); |
| 1322 | char *r = p; | 1322 | char *r = p; |
| 1323 | 1323 | ||
| 1324 | *p++ = '_'; | 1324 | *p++ = '_'; |
| @@ -1338,7 +1338,7 @@ static char *sec2annotation(const char *s) | |||
| 1338 | strcat(p, " "); | 1338 | strcat(p, " "); |
| 1339 | return r; | 1339 | return r; |
| 1340 | } else { | 1340 | } else { |
| 1341 | return strdup(""); | 1341 | return NOFAIL(strdup("")); |
| 1342 | } | 1342 | } |
| 1343 | } | 1343 | } |
| 1344 | 1344 | ||
| @@ -2036,7 +2036,7 @@ void buf_write(struct buffer *buf, const char *s, int len) | |||
| 2036 | { | 2036 | { |
| 2037 | if (buf->size - buf->pos < len) { | 2037 | if (buf->size - buf->pos < len) { |
| 2038 | buf->size += len + SZ; | 2038 | buf->size += len + SZ; |
| 2039 | buf->p = realloc(buf->p, buf->size); | 2039 | buf->p = NOFAIL(realloc(buf->p, buf->size)); |
| 2040 | } | 2040 | } |
| 2041 | strncpy(buf->p + buf->pos, s, len); | 2041 | strncpy(buf->p + buf->pos, s, len); |
| 2042 | buf->pos += len; | 2042 | buf->pos += len; |
diff --git a/usr/Makefile b/usr/Makefile index 237a028693ce..748f6a60bb1e 100644 --- a/usr/Makefile +++ b/usr/Makefile | |||
| @@ -24,7 +24,7 @@ $(obj)/initramfs_data.o: $(obj)/$(datafile_y) FORCE | |||
| 24 | # Generate the initramfs cpio archive | 24 | # Generate the initramfs cpio archive |
| 25 | 25 | ||
| 26 | hostprogs-y := gen_init_cpio | 26 | hostprogs-y := gen_init_cpio |
| 27 | initramfs := $(CONFIG_SHELL) $(srctree)/scripts/gen_initramfs_list.sh | 27 | initramfs := $(CONFIG_SHELL) $(srctree)/$(src)/gen_initramfs_list.sh |
| 28 | ramfs-input := $(if $(filter-out "",$(CONFIG_INITRAMFS_SOURCE)), \ | 28 | ramfs-input := $(if $(filter-out "",$(CONFIG_INITRAMFS_SOURCE)), \ |
| 29 | $(shell echo $(CONFIG_INITRAMFS_SOURCE)),-d) | 29 | $(shell echo $(CONFIG_INITRAMFS_SOURCE)),-d) |
| 30 | ramfs-args := \ | 30 | ramfs-args := \ |
diff --git a/scripts/gen_initramfs_list.sh b/usr/gen_initramfs_list.sh index 10e528b3a08f..0aad760fcd8c 100755 --- a/scripts/gen_initramfs_list.sh +++ b/usr/gen_initramfs_list.sh | |||
| @@ -174,7 +174,7 @@ dir_filelist() { | |||
| 174 | ${dep_list}header "$1" | 174 | ${dep_list}header "$1" |
| 175 | 175 | ||
| 176 | srcdir=$(echo "$1" | sed -e 's://*:/:g') | 176 | srcdir=$(echo "$1" | sed -e 's://*:/:g') |
| 177 | dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" | sort) | 177 | dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" | LANG=C sort) |
| 178 | 178 | ||
| 179 | # If $dirlist is only one line, then the directory is empty | 179 | # If $dirlist is only one line, then the directory is empty |
| 180 | if [ "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then | 180 | if [ "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then |
diff --git a/usr/initramfs_data.S b/usr/initramfs_data.S index b28da799f6a6..d07648f05bbf 100644 --- a/usr/initramfs_data.S +++ b/usr/initramfs_data.S | |||
| @@ -30,8 +30,8 @@ __irf_start: | |||
| 30 | .incbin __stringify(INITRAMFS_IMAGE) | 30 | .incbin __stringify(INITRAMFS_IMAGE) |
| 31 | __irf_end: | 31 | __irf_end: |
| 32 | .section .init.ramfs.info,"a" | 32 | .section .init.ramfs.info,"a" |
| 33 | .globl VMLINUX_SYMBOL(__initramfs_size) | 33 | .globl __initramfs_size |
| 34 | VMLINUX_SYMBOL(__initramfs_size): | 34 | __initramfs_size: |
| 35 | #ifdef CONFIG_64BIT | 35 | #ifdef CONFIG_64BIT |
| 36 | .quad __irf_end - __irf_start | 36 | .quad __irf_end - __irf_start |
| 37 | #else | 37 | #else |
