x86/boot/compressed: Force hidden visibility for all symbol references
Eliminate all GOT entries in the decompressor binary, by forcing hidden visibility for all symbol references, which informs the compiler that such references will be resolved at link time without the need for allocating GOT entries. To ensure that no GOT entries will creep back in, add an assertion to the decompressor linker script that will fire if the .got section has a non-zero size. [Arvind: move hidden.h to include/linux instead of making a copy] Signed-off-by: NArd Biesheuvel <ardb@kernel.org> Signed-off-by: NArvind Sankar <nivedita@alum.mit.edu> Signed-off-by: NKees Cook <keescook@chromium.org> Signed-off-by: NIngo Molnar <mingo@kernel.org> Tested-by: NNick Desaulniers <ndesaulniers@google.com> Tested-by: NSedat Dilek <sedat.dilek@gmail.com> Reviewed-by: NKees Cook <keescook@chromium.org> Acked-by: NArvind Sankar <nivedita@alum.mit.edu> Link: https://lore.kernel.org/r/20200731230820.1742553-3-keescook@chromium.org
Showing
include/linux/hidden.h
0 → 100644
想要评论请 注册 或 登录