Merge tag 'x86_core_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
[linux-2.6-block.git] / include / asm-generic / vmlinux.lds.h
index dee0af8e4b0c4ec6f3fc7ef34915a6835484c961..475507093645d552af1cb0567f33c8ad483b9411 100644 (file)
  * keep any .init_array.* sections.
  * https://bugs.llvm.org/show_bug.cgi?id=46478
  */
+#ifdef CONFIG_UNWIND_TABLES
+#define DISCARD_EH_FRAME
+#else
+#define DISCARD_EH_FRAME       *(.eh_frame)
+#endif
 #if defined(CONFIG_GCOV_KERNEL) || defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KCSAN)
 # ifdef CONFIG_CONSTRUCTORS
 #  define SANITIZER_DISCARDS                                           \
-       *(.eh_frame)
+       DISCARD_EH_FRAME
 # else
 #  define SANITIZER_DISCARDS                                           \
        *(.init_array) *(.init_array.*)                                 \
-       *(.eh_frame)
+       DISCARD_EH_FRAME
 # endif
 #else
 # define SANITIZER_DISCARDS