Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01ba2bdc authored by Sam Ravnborg's avatar Sam Ravnborg
Browse files

all archs: consolidate init and exit sections in vmlinux.lds.h



This patch consolidate all definitions of .init.text, .init.data
and .exit.text, .exit.data section definitions in
the generic vmlinux.lds.h.

This is a preparational patch - alone it does not buy
us much good.

Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 6c5bd235
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -46,11 +46,11 @@ SECTIONS
	__init_begin = .;
	__init_begin = .;
	.init.text : {
	.init.text : {
		_sinittext = .;
		_sinittext = .;
		*(.init.text)
		INIT_TEXT
		_einittext = .;
		_einittext = .;
	}
	}
	.init.data : {
	.init.data : {
		*(.init.data)
		INIT_DATA
	}
	}


	. = ALIGN(16);
	. = ALIGN(16);
@@ -136,8 +136,8 @@ SECTIONS


	/* Sections to be discarded */
	/* Sections to be discarded */
	/DISCARD/ : {
	/DISCARD/ : {
		*(.exit.text)
		EXIT_TEXT
		*(.exit.data)
		EXIT_DATA
		*(.exitcall.exit)
		*(.exitcall.exit)
	}
	}


+5 −5
Original line number Original line Diff line number Diff line
@@ -30,7 +30,7 @@ SECTIONS
	}
	}


	.init : {			/* Init code and data		*/
	.init : {			/* Init code and data		*/
			*(.init.text)
			INIT_TEXT
		_einittext = .;
		_einittext = .;
		__proc_info_begin = .;
		__proc_info_begin = .;
			*(.proc.info.init)
			*(.proc.info.init)
@@ -70,15 +70,15 @@ SECTIONS
		__per_cpu_end = .;
		__per_cpu_end = .;
#ifndef CONFIG_XIP_KERNEL
#ifndef CONFIG_XIP_KERNEL
		__init_begin = _stext;
		__init_begin = _stext;
		*(.init.data)
		INIT_DATA
		. = ALIGN(4096);
		. = ALIGN(4096);
		__init_end = .;
		__init_end = .;
#endif
#endif
	}
	}


	/DISCARD/ : {			/* Exit code and data		*/
	/DISCARD/ : {			/* Exit code and data		*/
		*(.exit.text)
		EXIT_TEXT
		*(.exit.data)
		EXIT_DATA
		*(.exitcall.exit)
		*(.exitcall.exit)
#ifndef CONFIG_MMU
#ifndef CONFIG_MMU
		*(.fixup)
		*(.fixup)
@@ -130,7 +130,7 @@ SECTIONS
#ifdef CONFIG_XIP_KERNEL
#ifdef CONFIG_XIP_KERNEL
		. = ALIGN(4096);
		. = ALIGN(4096);
		__init_begin = .;
		__init_begin = .;
		*(.init.data)
		INIT_DATA
		. = ALIGN(4096);
		. = ALIGN(4096);
		__init_end = .;
		__init_end = .;
#endif
#endif
+4 −4
Original line number Original line Diff line number Diff line
@@ -27,19 +27,19 @@ SECTIONS
		__init_begin = .;
		__init_begin = .;
			_sinittext = .;
			_sinittext = .;
			*(.text.reset)
			*(.text.reset)
			*(.init.text)
			INIT_TEXT
			/*
			/*
			 * .exit.text is discarded at runtime, not
			 * .exit.text is discarded at runtime, not
			 * link time, to deal with references from
			 * link time, to deal with references from
			 * __bug_table
			 * __bug_table
			 */
			 */
			*(.exit.text)
			EXIT_TEXT
			_einittext = .;
			_einittext = .;
		. = ALIGN(4);
		. = ALIGN(4);
		__tagtable_begin = .;
		__tagtable_begin = .;
			*(.taglist.init)
			*(.taglist.init)
		__tagtable_end = .;
		__tagtable_end = .;
			*(.init.data)
			INIT_DATA
		. = ALIGN(16);
		. = ALIGN(16);
		__setup_start = .;
		__setup_start = .;
			*(.init.setup)
			*(.init.setup)
@@ -135,7 +135,7 @@ SECTIONS
	 * thrown away, as cleanup code is never called unless it's a module.
	 * thrown away, as cleanup code is never called unless it's a module.
	 */
	 */
	/DISCARD/       	: {
	/DISCARD/       	: {
		*(.exit.data)
		EXIT_DATA
		*(.exitcall.exit)
		*(.exitcall.exit)
	}
	}


+4 −4
Original line number Original line Diff line number Diff line
@@ -91,13 +91,13 @@ SECTIONS
	{
	{
		. = ALIGN(PAGE_SIZE);
		. = ALIGN(PAGE_SIZE);
		__sinittext = .;
		__sinittext = .;
		*(.init.text)
		INIT_TEXT
		__einittext = .;
		__einittext = .;
	}
	}
	.init.data :
	.init.data :
	{
	{
		. = ALIGN(16);
		. = ALIGN(16);
		*(.init.data)
		INIT_DATA
	}
	}
	.init.setup :
	.init.setup :
	{
	{
@@ -198,8 +198,8 @@ SECTIONS


	/DISCARD/ :
	/DISCARD/ :
	{
	{
		*(.exit.text)
		EXIT_TEXT
		*(.exit.data)
		EXIT_DATA
		*(.exitcall.exit)
		*(.exitcall.exit)
	}
	}
}
}
+4 −4
Original line number Original line Diff line number Diff line
@@ -57,10 +57,10 @@ SECTIONS
  	__init_begin = .;
  	__init_begin = .;
	.init.text : { 
	.init.text : { 
		   _sinittext = .;
		   _sinittext = .;
		   *(.init.text)
		   INIT_TEXT
		   _einittext = .;
		   _einittext = .;
	}
	}
  	.init.data : { *(.init.data) }
	.init.data : { INIT_DATA }
  	. = ALIGN(16);
  	. = ALIGN(16);
  	__setup_start = .;
  	__setup_start = .;
  	.init.setup : { *(.init.setup) }
  	.init.setup : { *(.init.setup) }
@@ -109,8 +109,8 @@ SECTIONS


	/* Sections to be discarded */
	/* Sections to be discarded */
  	/DISCARD/ : {
  	/DISCARD/ : {
        	*(.text.exit)
		EXIT_TEXT
        	*(.data.exit)
		EXIT_DATA
		*(.exitcall.exit)
		*(.exitcall.exit)
        }
        }


Loading