mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
module: Remove unused DISCARD_EH_FRAME definition from module.lds.S
The linker script scripts/module.lds.S contains an unused DISCARD_EH_FRAME definition introduced by commit68c76ad4a9("arm64: unwind: add asynchronous unwind tables to kernel and modules"). As shown in an earlier version of that patch [1], DISCARD_EH_FRAME was meant to be used by SANITIZER_DISCARDS in the same file, as follows: -# define SANITIZER_DISCARDS *(.eh_frame) +# define SANITIZER_DISCARDS DISCARD_EH_FRAME However, in the meantime, SANITIZER_DISCARDS was removed entirely from module.lds.S by commit8924560094("cfi: Switch to -fsanitize=kcfi"). Eventually, the mentioned commit68c76ad4a9only added the new DISCARD_EH_FRAME definition to this file without actually using it. The file include/asm-generic/vmlinux.lds.h contains a similar DISCARD_EH_FRAME definition for vmlinux to discard .eh_frame sections that may be present when CONFIG_GCOV_KERNEL, CONFIG_KASAN_GENERIC or CONFIG_KCSAN is enabled. Testing these options on arm64 with LLVM 19.1 did not show any unexpected .eh_frame sections in modules. Remove the unused DISCARD_EH_FRAME definition from scripts/module.lds.S. Link: https://lore.kernel.org/linux-arm-kernel/20220701152724.3343599-2-ardb@kernel.org/ [1] Reviewed-by: Sami Tolvanen <samitolvanen@google.com> Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
This commit is contained in:
@@ -3,11 +3,6 @@
|
||||
* Archs are free to supply their own linker scripts. ld will
|
||||
* combine them automatically.
|
||||
*/
|
||||
#ifdef CONFIG_UNWIND_TABLES
|
||||
#define DISCARD_EH_FRAME
|
||||
#else
|
||||
#define DISCARD_EH_FRAME *(.eh_frame)
|
||||
#endif
|
||||
|
||||
#include <asm-generic/codetag.lds.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user