vmlinux.lds.h: Create COMMON_DISCARDS

Collect the common DISCARD sections for architectures that need more
specialized discard control than what the standard DISCARDS section
provides.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: linux-arch@vger.kernel.org
Link: https://lore.kernel.org/r/20200821194310.3089815-2-keescook@chromium.org
This commit is contained in:
Kees Cook 2020-08-21 12:42:42 -07:00 committed by Ingo Molnar
parent 527afc2122
commit 03c2b85cb7

View file

@ -954,13 +954,16 @@
EXIT_DATA
#endif
#define COMMON_DISCARDS \
*(.discard) \
*(.discard.*) \
*(.modinfo)
#define DISCARDS \
/DISCARD/ : { \
EXIT_DISCARDS \
EXIT_CALL \
*(.discard) \
*(.discard.*) \
*(.modinfo) \
COMMON_DISCARDS \
}
/**