linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] objtool, module: discard __unreachable section for modules
@ 2017-03-01 15:20 Josh Poimboeuf
  2017-03-01 16:44 ` hpa
  0 siblings, 1 reply; 6+ messages in thread
From: Josh Poimboeuf @ 2017-03-01 15:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Linus Torvalds, Thomas Gleixner, H . Peter Anvin,
	Jessica Yu

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+*)) }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-01 21:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-01 15:20 [PATCH] objtool, module: discard __unreachable section for modules Josh Poimboeuf
2017-03-01 16:44 ` hpa
2017-03-01 17:01   ` Linus Torvalds
2017-03-01 17:22     ` hpa
2017-03-01 18:04     ` [PATCH v2] objtool, module: discard objtool annotation sections " Josh Poimboeuf
2017-03-01 19:37       ` [tip:core/urgent] objtool, modules: Discard " tip-bot for Josh Poimboeuf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).