mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kbuild: protect compiled-in dtb from dead data elimination
@ 2016-10-26  8:47 Marcin Nowakowski
  2016-10-26  8:53 ` Nicholas Piggin
  0 siblings, 1 reply; 2+ messages in thread
From: Marcin Nowakowski @ 2016-10-26  8:47 UTC (permalink / raw)
  To: linux-kernel; +Cc: npiggin, mmarek, Marcin Nowakowski

DTBs are compiled into byte arrays that are placed inside
.dtb.init.rodata section. As they are never referenced directly from the
code, they get removed during dead data elimination and we end up with
__dtb_start == __dtb_end.

Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Fixes: b67067f1176d ("kbuild: allow archs to select link dead code/data elimination"
---
 include/asm-generic/vmlinux.lds.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index abe79e3..ad5d0bb 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -193,7 +193,7 @@
 #define KERNEL_DTB()							\
 	STRUCT_ALIGN();							\
 	VMLINUX_SYMBOL(__dtb_start) = .;				\
-	*(.dtb.init.rodata)						\
+	KEEP(*(.dtb.init.rodata))					\
 	VMLINUX_SYMBOL(__dtb_end) = .;
 
 /*
-- 
2.7.4

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

end of thread, other threads:[~2016-10-26  8:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-26  8:47 [PATCH] kbuild: protect compiled-in dtb from dead data elimination Marcin Nowakowski
2016-10-26  8:53 ` Nicholas Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome