From patchwork Wed Jan 20 09:05:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 570595 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9520D140AD9 for ; Wed, 20 Jan 2016 20:12:40 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=bhGXnjdS; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 711BD1A1836 for ; Wed, 20 Jan 2016 20:12:40 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=bhGXnjdS; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 6C38D1A0E76 for ; Wed, 20 Jan 2016 20:06:00 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=bhGXnjdS; dkim-atps=neutral Received: by mail-wm0-x230.google.com with SMTP id u188so175653940wmu.1 for ; Wed, 20 Jan 2016 01:06:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/GRWEd/0QAaumZKhNxxC3h+WCLK9BhABpAsyuvl2l54=; b=bhGXnjdSUH5XHSX8VS4ZvBPmXU57sGSn3ShsX09U2KcZnD17QBhy1zMwbKAG39JgRJ 68JlrPmbo4uwmgHzOKE7yaueua6toGkPGiWSbDXU3nf/uSuwD+cx6ZkQvFnOJTsoMJSL /18fbQkCluX2URsWnLeG2YNiAvaA3Vgh2LB2w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/GRWEd/0QAaumZKhNxxC3h+WCLK9BhABpAsyuvl2l54=; b=cPHbodrRAvsd/3jklFoMwS1WTBAJZpau8VohB4gxMG0VOyec8Nd3xxM03T8af+pM7L mMqmIBKUQ+g3j53zIGfRlMZjecNpTGY4prkpHKglqtOaSJrH2PbYa/ggGzp8RvRIe1/8 Dv6gxSHxmygQKBThLR39Lu6mmzQ/y7mMoa5+3/HX1k/5JXdhZKi7e2VUt8cq267Gf4pG eKshMJTdy0i/Q3GfGbhAYYj3VqNJk/dkiWGCAywOyVQijKueLOl8qeH5xiRsdeuYPbsG YOSNT+vZ5mz9W+J4Pc6qEKW4cBaPSLcjKpX+V9dQtnfZW4gfq+xuMkyUOjlIJCuXlqGb Fgtg== X-Gm-Message-State: AG10YOS80rKwWY0W8EbYfYy+FC5mbAMPUX5LMdRk1jbQuokFM95jlZUmWNAlp2o2NVAl83B8 X-Received: by 10.28.60.68 with SMTP id j65mr2634580wma.33.1453280757081; Wed, 20 Jan 2016 01:05:57 -0800 (PST) Received: from localhost.localdomain (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71]) by smtp.gmail.com with ESMTPSA id k130sm24234780wmg.6.2016.01.20.01.05.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Jan 2016 01:05:56 -0800 (PST) From: Ard Biesheuvel To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, keescook@chromium.org, akpm@linux-foundation.org, mingo@kernel.org, hpa@zytor.com, heiko.carstens@de.ibm.com, benh@kernel.crashing.org, mpe@ellerman.id.au, mmarek@suse.cz, rusty@rustcorp.com.au Subject: [PATCH 3/4] s390: enable text relative kallsyms for 64-bit targets Date: Wed, 20 Jan 2016 10:05:37 +0100 Message-Id: <1453280738-18721-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1453280738-18721-1-git-send-email-ard.biesheuvel@linaro.org> References: <1453280738-18721-1-git-send-email-ard.biesheuvel@linaro.org> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" This enables the newly introduced text-relative kallsyms support when building 64-bit targets. This cuts the size of the kallsyms address table in half, reducing the memory footprint of the kernel .rodata section by about 250 KB for a defconfig build. Signed-off-by: Ard Biesheuvel Acked-by: Heiko Carstens --- BEFORE: ======= $ size vmlinux text data bss dec hex filename 12329586 3107008 14727792 30164386 1cc45a2 vmlinux $ readelf -S .tmp_kallsyms2.o There are 9 section headers, starting at offset 0x125b50: Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align ... [ 4] .rodata PROGBITS 0000000000000000 00000040 0000000000125ad0 0000000000000000 A 0 0 8 [ 5] .rela.rodata RELA 0000000000000000 00125f28 000000000015ead8 0000000000000018 7 4 8 [ 6] .shstrtab STRTAB 0000000000000000 00125b10 0000000000000039 0000000000000000 0 0 1 ... $ ls -l arch/s390/boot/bzImage -rwxrwxr-x 1 ard ard 5234224 Jan 20 08:22 arch/s390/boot/bzImage AFTER: ====== $ size vmlinux text data bss dec hex filename 12088114 3102912 14727792 29918818 1c88662 vmlinux $ readelf -S .tmp_kallsyms2.o There are 8 section headers, starting at offset 0xeb428: Section Headers: [Nr] Name Type Address Offset ... [ 4] .rodata PROGBITS 0000000000000000 00000040 00000000000eb3b0 0000000000000000 A 0 0 8 [ 5] .shstrtab STRTAB 0000000000000000 000eb3f0 0000000000000034 0000000000000000 0 0 1 ... $ ls -l arch/s390/boot/bzImage -rwxrwxr-x 1 ard ard 5224256 Jan 20 08:23 arch/s390/boot/bzImage --- arch/s390/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index dbeeb3a049f2..588160fd1db0 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -149,6 +149,7 @@ config S390 select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_SYSCALL_TRACEPOINTS select HAVE_VIRT_CPU_ACCOUNTING + select KALLSYMS_TEXT_RELATIVE if 64BIT select MODULES_USE_ELF_RELA select NO_BOOTMEM select OLD_SIGACTION