From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752534AbdDCKFt convert rfc822-to-8bit (ORCPT ); Mon, 3 Apr 2017 06:05:49 -0400 Received: from terminus.zytor.com ([65.50.211.136]:42561 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752163AbdDCKFr (ORCPT ); Mon, 3 Apr 2017 06:05:47 -0400 Date: Mon, 03 Apr 2017 02:57:48 -0700 User-Agent: K-9 Mail for Android In-Reply-To: References: <20170330154927.o6qmgfp4bdhrajbm@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [tip:x86/asm] debug: Fix __bug_table[] in arch linker scripts To: linux-tip-commits@vger.kernel.org, tip-bot for Peter Zijlstra CC: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de, fengguang.wu@intel.com, peterz@infradead.org From: hpa@zytor.com Message-ID: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On April 3, 2017 1:27:49 AM PDT, tip-bot for Peter Zijlstra wrote: >Commit-ID: b5effd3815ccbe3df1a015a6d67d8a24a27813d5 >Gitweb: >http://git.kernel.org/tip/b5effd3815ccbe3df1a015a6d67d8a24a27813d5 >Author: Peter Zijlstra >AuthorDate: Thu, 30 Mar 2017 17:49:27 +0200 >Committer: Ingo Molnar >CommitDate: Mon, 3 Apr 2017 10:22:40 +0200 > >debug: Fix __bug_table[] in arch linker scripts > >The kbuild test robot reported this build failure on a number >of architectures: > > > make.cross ARCH=arm > > lib/lib.a(bug.o): In function `find_bug': > > >> lib/bug.c:135: undefined reference to `__start___bug_table' > > >> lib/bug.c:135: undefined reference to `__stop___bug_table' > >Caused by: > > 19d436268dde ("debug: Add _ONCE() logic to report_bug()") > >Which moved the BUG_TABLE from RO_DATA_SECTION() to RW_DATA_SECTION(), >but a number of architectures don't use RW_DATA_SECTION(), so they >ended up with no __bug_table[] ... > >Ideally all those would use RW_DATA_SECTION() in their linker scripts, >but that's for another day. > >Signed-off-by: Peter Zijlstra >Cc: Linus Torvalds >Cc: Thomas Gleixner >Cc: kbuild test robot >Cc: kbuild-all@01.org >Cc: tipbuild@zytor.com >Link: >http://lkml.kernel.org/r/20170330154927.o6qmgfp4bdhrajbm@hirez.programming.kicks-ass.net >Signed-off-by: Ingo Molnar >--- > arch/arm/kernel/vmlinux-xip.lds.S | 2 ++ > arch/arm/kernel/vmlinux.lds.S | 2 ++ > arch/avr32/kernel/vmlinux.lds.S | 1 + > arch/blackfin/kernel/vmlinux.lds.S | 2 ++ > arch/c6x/kernel/vmlinux.lds.S | 2 ++ > arch/cris/kernel/vmlinux.lds.S | 2 ++ > arch/frv/kernel/vmlinux.lds.S | 2 ++ > arch/ia64/kernel/vmlinux.lds.S | 2 ++ > arch/mips/kernel/vmlinux.lds.S | 1 + > arch/powerpc/kernel/vmlinux.lds.S | 2 ++ > arch/x86/kernel/vmlinux.lds.S | 1 + > 11 files changed, 19 insertions(+) > >diff --git a/arch/arm/kernel/vmlinux-xip.lds.S >b/arch/arm/kernel/vmlinux-xip.lds.S >index 37b2a11..8265b11 100644 >--- a/arch/arm/kernel/vmlinux-xip.lds.S >+++ b/arch/arm/kernel/vmlinux-xip.lds.S >@@ -242,6 +242,8 @@ SECTIONS > } > _edata_loc = __data_loc + SIZEOF(.data); > >+ BUG_TABLE >+ > #ifdef CONFIG_HAVE_TCM > /* > * We align everything to a page boundary so we can >diff --git a/arch/arm/kernel/vmlinux.lds.S >b/arch/arm/kernel/vmlinux.lds.S >index ce18007..c83a7ba 100644 >--- a/arch/arm/kernel/vmlinux.lds.S >+++ b/arch/arm/kernel/vmlinux.lds.S >@@ -262,6 +262,8 @@ SECTIONS > } > _edata_loc = __data_loc + SIZEOF(.data); > >+ BUG_TABLE >+ > #ifdef CONFIG_HAVE_TCM > /* > * We align everything to a page boundary so we can >diff --git a/arch/avr32/kernel/vmlinux.lds.S >b/arch/avr32/kernel/vmlinux.lds.S >index 17f2730..623d18d 100644 >--- a/arch/avr32/kernel/vmlinux.lds.S >+++ b/arch/avr32/kernel/vmlinux.lds.S >@@ -75,6 +75,7 @@ SECTIONS > > _edata = .; > } >+ BUG_TABLE > > BSS_SECTION(0, 8, 8) > _end = .; >diff --git a/arch/blackfin/kernel/vmlinux.lds.S >b/arch/blackfin/kernel/vmlinux.lds.S >index 68069a1..334ef81 100644 >--- a/arch/blackfin/kernel/vmlinux.lds.S >+++ b/arch/blackfin/kernel/vmlinux.lds.S >@@ -115,6 +115,8 @@ SECTIONS > __data_lma = LOADADDR(.data); > __data_len = SIZEOF(.data); > >+ BUG_TABLE >+ > /* The init section should be last, so when we free it, it goes into > * the general memory pool, and (hopefully) will decrease >fragmentation > * a tiny bit. The init section has a _requirement_ that it be >diff --git a/arch/c6x/kernel/vmlinux.lds.S >b/arch/c6x/kernel/vmlinux.lds.S >index a1a5c16..29ebea4 100644 >--- a/arch/c6x/kernel/vmlinux.lds.S >+++ b/arch/c6x/kernel/vmlinux.lds.S >@@ -128,6 +128,8 @@ SECTIONS > . = ALIGN(8); > } > >+ BUG_TABLE >+ > _edata = .; > > __bss_start = .; >diff --git a/arch/cris/kernel/vmlinux.lds.S >b/arch/cris/kernel/vmlinux.lds.S >index 9795862..867f237 100644 >--- a/arch/cris/kernel/vmlinux.lds.S >+++ b/arch/cris/kernel/vmlinux.lds.S >@@ -68,6 +68,8 @@ SECTIONS > __edata = . ; /* End of data section. */ > _edata = . ; > >+ BUG_TABLE >+ > INIT_TASK_DATA_SECTION(PAGE_SIZE) > > . = ALIGN(PAGE_SIZE); /* Init code and data. */ >diff --git a/arch/frv/kernel/vmlinux.lds.S >b/arch/frv/kernel/vmlinux.lds.S >index aa6e573..3f44dcb 100644 >--- a/arch/frv/kernel/vmlinux.lds.S >+++ b/arch/frv/kernel/vmlinux.lds.S >@@ -102,6 +102,8 @@ SECTIONS > > _edata = .; /* End of data section */ > >+ BUG_TABLE >+ > /* GP section */ > . = ALIGN(L1_CACHE_BYTES); > _gp = . + 2048; >diff --git a/arch/ia64/kernel/vmlinux.lds.S >b/arch/ia64/kernel/vmlinux.lds.S >index f89d20c..798026d 100644 >--- a/arch/ia64/kernel/vmlinux.lds.S >+++ b/arch/ia64/kernel/vmlinux.lds.S >@@ -192,6 +192,8 @@ SECTIONS { > CONSTRUCTORS > } > >+ BUG_TABLE >+ > . = ALIGN(16); /* gp must be 16-byte aligned for exc. table */ > .got : AT(ADDR(.got) - LOAD_OFFSET) { > *(.got.plt) >diff --git a/arch/mips/kernel/vmlinux.lds.S >b/arch/mips/kernel/vmlinux.lds.S >index f0a0e6d..8ca2371 100644 >--- a/arch/mips/kernel/vmlinux.lds.S >+++ b/arch/mips/kernel/vmlinux.lds.S >@@ -97,6 +97,7 @@ SECTIONS > DATA_DATA > CONSTRUCTORS > } >+ BUG_TABLE > _gp = . + 0x8000; > .lit8 : { > *(.lit8) >diff --git a/arch/powerpc/kernel/vmlinux.lds.S >b/arch/powerpc/kernel/vmlinux.lds.S >index 7394b77..1c24c89 100644 >--- a/arch/powerpc/kernel/vmlinux.lds.S >+++ b/arch/powerpc/kernel/vmlinux.lds.S >@@ -312,6 +312,8 @@ SECTIONS > NOSAVE_DATA > } > >+ BUG_TABLE >+ > . = ALIGN(PAGE_SIZE); > _edata = .; > PROVIDE32 (edata = .); >diff --git a/arch/x86/kernel/vmlinux.lds.S >b/arch/x86/kernel/vmlinux.lds.S >index c74ae9c..c8a3b61 100644 >--- a/arch/x86/kernel/vmlinux.lds.S >+++ b/arch/x86/kernel/vmlinux.lds.S >@@ -146,6 +146,7 @@ SECTIONS > _edata = .; > } :data > >+ BUG_TABLE > > . = ALIGN(PAGE_SIZE); > __vvar_page = .; Case in point why we want structured linker tables, btw... -- Sent from my Android device with K-9 Mail. Please excuse my brevity.