KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration \
- -Wno-format-security
+ -Wno-format-security \
+ -fno-delete-null-pointer-checks
KBUILD_AFLAGS := -D__ASSEMBLY__
+# Warn about unsupported modules in kernels built inside Autobuild
+ifneq ($(wildcard /.buildenv),)
+CFLAGS += -DUNSUPPORTED_MODULES=2
+endif
+
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
INIT_RAM_FS \
}
- #define BSS_SECTION(sbss_align, bss_align) \
- SBSS \
+ #define BSS_SECTION(sbss_align, bss_align, stop_align) \
+ . = ALIGN(sbss_align); \
+ VMLINUX_SYMBOL(__bss_start) = .; \
+ SBSS(sbss_align) \
BSS(bss_align) \
- . = ALIGN(4);
+ . = ALIGN(stop_align); \
+ VMLINUX_SYMBOL(__bss_stop) = .;
+
++#ifdef CONFIG_STACK_UNWIND
++#define EH_FRAME \
++ /* Unwind data binary search table */ \
++ . = ALIGN(8); \
++ .eh_frame_hdr : AT(ADDR(.eh_frame_hdr) - LOAD_OFFSET) { \
++ VMLINUX_SYMBOL(__start_unwind_hdr) = .; \
++ *(.eh_frame_hdr) \
++ VMLINUX_SYMBOL(__end_unwind_hdr) = .; \
++ } \
++ /* Unwind data */ \
++ . = ALIGN(8); \
++ .eh_frame : AT(ADDR(.eh_frame) - LOAD_OFFSET) { \
++ VMLINUX_SYMBOL(__start_unwind) = .; \
++ *(.eh_frame) \
++ VMLINUX_SYMBOL(__end_unwind) = .; \
++ }
++#else
++#define EH_FRAME
++#endif