Re: [PATCH v2 16/28] init: lto: fix PREL32 relocations
From: Kees Cook <hidden>
Date: 2020-09-03 22:42:03
Also in:
linux-arch, linux-kbuild, linux-pci, lkml
From: Kees Cook <hidden>
Date: 2020-09-03 22:42:03
Also in:
linux-arch, linux-kbuild, linux-pci, lkml
On Thu, Sep 03, 2020 at 01:30:41PM -0700, 'Sami Tolvanen' via Clang Built Linux wrote:
With LTO, the compiler can rename static functions to avoid global naming collisions. As initcall functions are typically static, renaming can break references to them in inline assembly. This change adds a global stub with a stable name for each initcall to fix the issue when PREL32 relocations are used. Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
This was a Delight(tm) to get right. Thanks for finding the right magic here. :) Reviewed-by: Kees Cook <redacted> -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel