aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/boot/compressed/vmlinux.lds.S
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2020-11-11 10:59:40 +0100
committerHeiko Carstens <hca@linux.ibm.com>2020-11-20 19:19:11 +0100
commit246218962e2175cd1dfa1e5467e9bffae5cc7b5e (patch)
tree537361b78c16c2f828237416477db73c61c67551 /arch/s390/boot/compressed/vmlinux.lds.S
parents390/decompressor: correct some asm symbols annotations (diff)
downloadlinux-stable-246218962e2175cd1dfa1e5467e9bffae5cc7b5e.tar.xz
linux-stable-246218962e2175cd1dfa1e5467e9bffae5cc7b5e.zip
s390/decompressor: add symbols support
Information printed by print_pgm_check_info() is crucial for debugging decompressor problems. Printing instruction addresses is better than nothing, but turns further debugging into tedious job of figuring out which function those addresses correspond to. This change adds simplistic symbols resolution support. And adds %pS format specifier support to decompressor_printk(). Decompressor symbols list is extracted and sorted with nm -n -S: ... 0000000000010000 0000000000000014 T startup 0000000000010014 00000000000000b0 t startup_normal 0000000000010180 00000000000000b2 t startup_kdump ... Then functions are filtered and contracted to a form: "10000 14 startup\0""10014 b0 startup_normal\0""10180 b2 startup_kdump\0" ... Which makes it trivial to find beginning of an entry and names are 0 terminated, so could be used as is. Symbols are binary-searched. To get symbols list with final addresses and then get it into the decompressor's image the same trick as for kallsyms is used. Decompressor's vmlinux is linked twice. Symbols are stored in .decompressor.syms section, current size is about 2kb. Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/boot/compressed/vmlinux.lds.S')
-rw-r--r--arch/s390/boot/compressed/vmlinux.lds.S8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/s390/boot/compressed/vmlinux.lds.S b/arch/s390/boot/compressed/vmlinux.lds.S
index 9427e2cd0c15..152ac6f875c0 100644
--- a/arch/s390/boot/compressed/vmlinux.lds.S
+++ b/arch/s390/boot/compressed/vmlinux.lds.S
@@ -82,6 +82,14 @@ SECTIONS
*(.vmlinux.info)
}
+ .decompressor.syms : {
+ . += 1; /* make sure we have \0 before the first entry */
+ . = ALIGN(2);
+ _decompressor_syms_start = .;
+ *(.decompressor.syms)
+ _decompressor_syms_end = .;
+ }
+
#ifdef CONFIG_KERNEL_UNCOMPRESSED
. = 0x100000;
#else