mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 03:55:20 +07:00
405d967dc7
x86 throws away .discard section but no other archs do. Also, .discard is not thrown away while linking modules. Make every arch and module linking throw it away. This will be used to define dummy variables for percpu declarations and definitions. This patch is based on Ivan Kokshaysky's alpha percpu patch. [ Impact: always throw away everything in .discard ] Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Richard Henderson <rth@twiddle.net> Cc: Russell King <linux@arm.linux.org.uk> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Bryan Wu <cooloney@kernel.org> Cc: Mikael Starvik <starvik@axis.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Cc: David Howells <dhowells@redhat.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Tony Luck <tony.luck@intel.com> Cc: Hirokazu Takata <takata@linux-m32r.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Michal Simek <monstr@monstr.eu> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: David S. Miller <davem@davemloft.net> Cc: Jeff Dike <jdike@addtoit.com> Cc: Chris Zankel <chris@zankel.net> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Ingo Molnar <mingo@elte.hu>
106 lines
2.1 KiB
ArmAsm
106 lines
2.1 KiB
ArmAsm
#include <asm-generic/vmlinux.lds.h>
|
|
#include <asm/page.h>
|
|
|
|
OUTPUT_FORMAT(ELF_FORMAT)
|
|
OUTPUT_ARCH(ELF_ARCH)
|
|
ENTRY(_start)
|
|
jiffies = jiffies_64;
|
|
|
|
SECTIONS
|
|
{
|
|
/* This must contain the right address - not quite the default ELF one.*/
|
|
PROVIDE (__executable_start = START);
|
|
/* Static binaries stick stuff here, like the sigreturn trampoline,
|
|
* invisibly to objdump. So, just make __binary_start equal to the very
|
|
* beginning of the executable, and if there are unmapped pages after this,
|
|
* they are forever unusable.
|
|
*/
|
|
__binary_start = START;
|
|
|
|
. = START + SIZEOF_HEADERS;
|
|
|
|
_text = .;
|
|
_stext = .;
|
|
__init_begin = .;
|
|
.init.text : {
|
|
_sinittext = .;
|
|
INIT_TEXT
|
|
_einittext = .;
|
|
}
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
.text :
|
|
{
|
|
TEXT_TEXT
|
|
SCHED_TEXT
|
|
LOCK_TEXT
|
|
*(.fixup)
|
|
/* .gnu.warning sections are handled specially by elf32.em. */
|
|
*(.gnu.warning)
|
|
*(.gnu.linkonce.t*)
|
|
}
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
.syscall_stub : {
|
|
__syscall_stub_start = .;
|
|
*(.__syscall_stub*)
|
|
__syscall_stub_end = .;
|
|
}
|
|
|
|
#include "asm/common.lds.S"
|
|
|
|
init.data : { INIT_DATA }
|
|
.data :
|
|
{
|
|
. = ALIGN(KERNEL_STACK_SIZE); /* init_task */
|
|
*(.data.init_task)
|
|
. = ALIGN(KERNEL_STACK_SIZE);
|
|
*(.data.init_irqstack)
|
|
DATA_DATA
|
|
*(.gnu.linkonce.d*)
|
|
CONSTRUCTORS
|
|
}
|
|
.data1 : { *(.data1) }
|
|
.ctors :
|
|
{
|
|
*(.ctors)
|
|
}
|
|
.dtors :
|
|
{
|
|
*(.dtors)
|
|
}
|
|
|
|
.got : { *(.got.plt) *(.got) }
|
|
.dynamic : { *(.dynamic) }
|
|
.tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
|
|
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
|
|
/* We want the small data sections together, so single-instruction offsets
|
|
can access them all, and initialized data all before uninitialized, so
|
|
we can shorten the on-disk segment size. */
|
|
.sdata : { *(.sdata) }
|
|
_edata = .;
|
|
PROVIDE (edata = .);
|
|
. = ALIGN(PAGE_SIZE);
|
|
.sbss :
|
|
{
|
|
__bss_start = .;
|
|
PROVIDE(_bss_start = .);
|
|
*(.sbss)
|
|
*(.scommon)
|
|
}
|
|
.bss :
|
|
{
|
|
*(.dynbss)
|
|
*(.bss)
|
|
*(COMMON)
|
|
}
|
|
_end = .;
|
|
PROVIDE (end = .);
|
|
|
|
STABS_DEBUG
|
|
|
|
DWARF_DEBUG
|
|
|
|
/DISCARD/ : { *(.discard) }
|
|
}
|