Messages in this thread | | | Date | Thu, 7 Jan 2021 13:51:03 -0800 | From | Kees Cook <> | Subject | Re: [PATCH v4 mips-next 6/7] vmlinux.lds.h: catch compound literals into data and BSS |
| |
On Thu, Jan 07, 2021 at 01:20:55PM +0000, Alexander Lobakin wrote: > When building kernel with LD_DEAD_CODE_DATA_ELIMINATION, LLVM stack > generates separate sections for compound literals, just like in case > with enabled LTO [0]: > > ld.lld: warning: drivers/built-in.a(mtd/nand/spi/gigadevice.o): > (.data..compoundliteral.14) is being placed in > '.data..compoundliteral.14' > ld.lld: warning: drivers/built-in.a(mtd/nand/spi/gigadevice.o): > (.data..compoundliteral.15) is being placed in > '.data..compoundliteral.15' > ld.lld: warning: drivers/built-in.a(mtd/nand/spi/gigadevice.o): > (.data..compoundliteral.16) is being placed in > '.data..compoundliteral.16' > ld.lld: warning: drivers/built-in.a(mtd/nand/spi/gigadevice.o): > (.data..compoundliteral.17) is being placed in > '.data..compoundliteral.17' > > [...] > > Handle this by adding the related sections to generic definitions > as suggested by Sami [0]. > > [0] https://lore.kernel.org/lkml/20201211184633.3213045-3-samitolvanen@google.com > > Suggested-by: Kees Cook <keescook@chromium.org> > Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Suggested-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Kees Cook <keescook@chromium.org>
-- Kees Cook
| |