Commit 5ebb73b6 authored by Mao Minkai's avatar Mao Minkai Committed by guzitao
Browse files

sw64: do not discard exit text at link time

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8CCRP



--------------------------------

Discard .exit.text and .exit.data sections at runtime, not link time, to
deal with referenced in section __jump_table.

Signed-off-by: default avatarMao Minkai <maominkai@wxiat.com>
Reviewed-by: default avatarHe Sheng <hesheng@wxiat.com>
Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent 77da0802
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */

#define RUNTIME_DISCARD_EXIT
#define EMITS_PT_NOTE
#define RO_EXCEPTION_TABLE_ALIGN	16

@@ -39,6 +40,15 @@ SECTIONS
	__init_begin = ALIGN(PAGE_SIZE);
	INIT_TEXT_SECTION(PAGE_SIZE)
	INIT_DATA_SECTION(16)
	/* we have to discard exit text and such at runtime, not link time */
	.exit.text :
	{
		EXIT_TEXT
	}
	.exit.data :
	{
		EXIT_DATA
	}
	PERCPU_SECTION(L1_CACHE_BYTES)

	/*