lkml.org 
[lkml]   [2017]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] objtool, module: discard __unreachable section for modules
From
On March 1, 2017 7:20:03 AM PST, Josh Poimboeuf <jpoimboe@redhat.com> wrote:
>The __unreachable section is only used at compile time. It's discarded
>for vmlinux but it should also be discarded for modules.
>
>Fixes: d1091c7fa3d5 ("objtool: Improve detection of BUG() and other
>dead ends")
>Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
>---
> scripts/module-common.lds | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
>diff --git a/scripts/module-common.lds b/scripts/module-common.lds
>index 73a2c7d..936a3c6 100644
>--- a/scripts/module-common.lds
>+++ b/scripts/module-common.lds
>@@ -4,7 +4,10 @@
> * combine them automatically.
> */
> SECTIONS {
>- /DISCARD/ : { *(.discard) }
>+ /DISCARD/ : {
>+ *(.discard)
>+ *(__unreachable)
>+ }
>
> __ksymtab 0 : { *(SORT(___ksymtab+*)) }
> __ksymtab_gpl 0 : { *(SORT(___ksymtab_gpl+*)) }

I would like to see a name like, say, ".annot.unreachable", since is odds are pretty high we are going to need more annotations in the future.
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

\
 
 \ /
  Last update: 2017-03-01 17:46    [W:0.098 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site