Commit 980d5f9a authored by Alexander Egorenkov's avatar Alexander Egorenkov Committed by Vasily Gorbik
Browse files

s390/boot: enable .bss section for compressed kernel



- Support static uninitialized variables in compressed kernel.
- Remove chkbss script
- Get rid of workarounds for not having .bss section

Signed-off-by: default avatarAlexander Egorenkov <egorenar@linux.ibm.com>
Reviewed-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 1a80b54d
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -73,7 +73,3 @@ $(obj)/startup.a: $(OBJECTS) FORCE
install:
	sh -x  $(srctree)/$(obj)/install.sh $(KERNELRELEASE) $(obj)/bzImage \
	      System.map "$(INSTALL_PATH)"

chkbss := $(obj-y)
chkbss-target := startup.a
include $(srctree)/arch/s390/scripts/Makefile.chkbss
+0 −4
Original line number Diff line number Diff line
@@ -62,7 +62,3 @@ $(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) FORCE
OBJCOPYFLAGS_piggy.o := -I binary -O elf64-s390 -B s390:64-bit --rename-section .data=.vmlinux.bin.compressed
$(obj)/piggy.o: $(obj)/vmlinux.bin$(suffix-y) FORCE
	$(call if_changed,objcopy)

chkbss := $(filter-out piggy.o info.o, $(obj-y))
chkbss-target := vmlinux.bin
include $(srctree)/arch/s390/scripts/Makefile.chkbss
+0 −1
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@
 * gzip declarations
 */
#define STATIC static
#define STATIC_RW_DATA static __section(.data)

#undef memset
#undef memcpy
+13 −9
Original line number Diff line number Diff line
@@ -58,6 +58,19 @@ SECTIONS
	BOOT_DATA
	BOOT_DATA_PRESERVED

	/*
	 * This is the BSS section of the decompressor and not of the decompressed Linux kernel.
	 * It will consume place in the decompressor's image.
	 */
	. = ALIGN(8);
	.bss : {
		_bss = . ;
		*(.bss)
		*(.bss.*)
		*(COMMON)
		_ebss = .;
	}

	/*
	 * uncompressed image info used by the decompressor it should match
	 * struct vmlinux_info. It comes from .vmlinux.info section of
@@ -81,15 +94,6 @@ SECTIONS
		FILL(0xff);
		. = ALIGN(4096);
	}
	. = ALIGN(256);
	.bss : {
		_bss = . ;
		*(.bss)
		*(.bss.*)
		*(COMMON)
		. = ALIGN(8);	/* For convenience during zeroing */
		_ebss = .;
	}
	_end = .;

	/* Sections to be discarded */
+6 −0
Original line number Diff line number Diff line
@@ -313,6 +313,12 @@ ENTRY(startup_kdump)
	spt	6f-.LPG0(%r13)
	mvc	__LC_LAST_UPDATE_TIMER(8),6f-.LPG0(%r13)
	l	%r15,.Lstack-.LPG0(%r13)
	// Clear decompressor's BSS section
	larl	%r2,_bss
	slgr	%r3,%r3
	larl	%r4,_ebss
	slgr	%r4,%r2
	brasl	%r14,memset
	brasl	%r14,verify_facilities
	brasl	%r14,startup_kernel

Loading