Linux Audio

Check our new training course

Loading...
v5.9
  1/* SPDX-License-Identifier: GPL-2.0 */
  2/*
  3 * Linker script for gate DSO.  The gate pages are an ELF shared object
  4 * prelinked to its virtual address, with only one read-only segment and
  5 * one execute-only segment (both fit in one page).  This script controls
  6 * its layout.
  7 */
  8
  9#include <asm/page.h>
 10
 11SECTIONS
 12{
 13	. = GATE_ADDR + SIZEOF_HEADERS;
 14
 15	.hash			: { *(.hash) }		:readable
 16	.gnu.hash		: { *(.gnu.hash) }
 17	.dynsym			: { *(.dynsym) }
 18	.dynstr			: { *(.dynstr) }
 19	.gnu.version		: { *(.gnu.version) }
 20	.gnu.version_d		: { *(.gnu.version_d) }
 21	.gnu.version_r		: { *(.gnu.version_r) }
 22
 23	.note			: { *(.note*) }		:readable	:note
 24
 25	.dynamic		: { *(.dynamic) }	:readable	:dynamic
 26
 27	/*
 28	 * This linker script is used both with -r and with -shared.  For
 29	 * the layouts to match, we need to skip more than enough space for
 30	 * the dynamic symbol table et al.  If this amount is insufficient,
 31	 * ld -shared will barf.  Just increase it here.
 32	 */
 33	. = GATE_ADDR + 0x600;
 34
 35	.data..patch		: {
 36		__start_gate_mckinley_e9_patchlist = .;
 37		*(.data..patch.mckinley_e9)
 38		__end_gate_mckinley_e9_patchlist = .;
 39
 40		__start_gate_vtop_patchlist = .;
 41		*(.data..patch.vtop)
 42		__end_gate_vtop_patchlist = .;
 43
 44		__start_gate_fsyscall_patchlist = .;
 45		*(.data..patch.fsyscall_table)
 46		__end_gate_fsyscall_patchlist = .;
 47
 48		__start_gate_brl_fsys_bubble_down_patchlist = .;
 49		*(.data..patch.brl_fsys_bubble_down)
 50		__end_gate_brl_fsys_bubble_down_patchlist = .;
 51	}						:readable
 52
 53	.IA_64.unwind_info	: { *(.IA_64.unwind_info*) }
 54	.IA_64.unwind		: { *(.IA_64.unwind*) }	:readable	:unwind
 55#ifdef HAVE_BUGGY_SEGREL
 56	.text (GATE_ADDR + PAGE_SIZE) : { *(.text) *(.text.*) }	:readable
 57#else
 58	. = ALIGN(PERCPU_PAGE_SIZE) + (. & (PERCPU_PAGE_SIZE - 1));
 59	.text			: { *(.text) *(.text.*) }	:epc
 60#endif
 61
 62	/DISCARD/		: {
 63		*(.got.plt) *(.got)
 64		*(.data .data.* .gnu.linkonce.d.*)
 65		*(.dynbss)
 66		*(.bss .bss.* .gnu.linkonce.b.*)
 67		*(__ex_table)
 68		*(__mca_table)
 69	}
 70}
 71
 72/*
 73 * ld does not recognize this name token; use the constant.
 74 */
 75#define	PT_IA_64_UNWIND	0x70000001
 76
 77/*
 78 * We must supply the ELF program headers explicitly to get just one
 79 * PT_LOAD segment, and set the flags explicitly to make segments read-only.
 80 */
 81PHDRS
 82{
 83	readable	PT_LOAD	FILEHDR	PHDRS	FLAGS(4);	/* PF_R */
 84#ifndef HAVE_BUGGY_SEGREL
 85	epc		PT_LOAD	FILEHDR PHDRS	FLAGS(1);	/* PF_X */
 86#endif
 87	dynamic		PT_DYNAMIC		FLAGS(4);	/* PF_R */
 88	note		PT_NOTE			FLAGS(4);	/* PF_R */
 89	unwind		PT_IA_64_UNWIND;
 90}
 91
 92/*
 93 * This controls what symbols we export from the DSO.
 94 */
 95VERSION
 96{
 97	LINUX_2.5 {
 98	global:
 99		__kernel_syscall_via_break;
100		__kernel_syscall_via_epc;
101		__kernel_sigtramp;
102
103	local: *;
104	};
105}
106
107/* The ELF entry point can be used to set the AT_SYSINFO value.  */
108ENTRY(__kernel_syscall_via_epc)
v4.6
 
  1/*
  2 * Linker script for gate DSO.  The gate pages are an ELF shared object
  3 * prelinked to its virtual address, with only one read-only segment and
  4 * one execute-only segment (both fit in one page).  This script controls
  5 * its layout.
  6 */
  7
  8#include <asm/page.h>
  9
 10SECTIONS
 11{
 12	. = GATE_ADDR + SIZEOF_HEADERS;
 13
 14	.hash			: { *(.hash) }		:readable
 15	.gnu.hash		: { *(.gnu.hash) }
 16	.dynsym			: { *(.dynsym) }
 17	.dynstr			: { *(.dynstr) }
 18	.gnu.version		: { *(.gnu.version) }
 19	.gnu.version_d		: { *(.gnu.version_d) }
 20	.gnu.version_r		: { *(.gnu.version_r) }
 21
 22	.note			: { *(.note*) }		:readable	:note
 23
 24	.dynamic		: { *(.dynamic) }	:readable	:dynamic
 25
 26	/*
 27	 * This linker script is used both with -r and with -shared.  For
 28	 * the layouts to match, we need to skip more than enough space for
 29	 * the dynamic symbol table et al.  If this amount is insufficient,
 30	 * ld -shared will barf.  Just increase it here.
 31	 */
 32	. = GATE_ADDR + 0x600;
 33
 34	.data..patch		: {
 35		__start_gate_mckinley_e9_patchlist = .;
 36		*(.data..patch.mckinley_e9)
 37		__end_gate_mckinley_e9_patchlist = .;
 38
 39		__start_gate_vtop_patchlist = .;
 40		*(.data..patch.vtop)
 41		__end_gate_vtop_patchlist = .;
 42
 43		__start_gate_fsyscall_patchlist = .;
 44		*(.data..patch.fsyscall_table)
 45		__end_gate_fsyscall_patchlist = .;
 46
 47		__start_gate_brl_fsys_bubble_down_patchlist = .;
 48		*(.data..patch.brl_fsys_bubble_down)
 49		__end_gate_brl_fsys_bubble_down_patchlist = .;
 50	}						:readable
 51
 52	.IA_64.unwind_info	: { *(.IA_64.unwind_info*) }
 53	.IA_64.unwind		: { *(.IA_64.unwind*) }	:readable	:unwind
 54#ifdef HAVE_BUGGY_SEGREL
 55	.text (GATE_ADDR + PAGE_SIZE) : { *(.text) *(.text.*) }	:readable
 56#else
 57	. = ALIGN(PERCPU_PAGE_SIZE) + (. & (PERCPU_PAGE_SIZE - 1));
 58	.text			: { *(.text) *(.text.*) }	:epc
 59#endif
 60
 61	/DISCARD/		: {
 62		*(.got.plt) *(.got)
 63		*(.data .data.* .gnu.linkonce.d.*)
 64		*(.dynbss)
 65		*(.bss .bss.* .gnu.linkonce.b.*)
 66		*(__ex_table)
 67		*(__mca_table)
 68	}
 69}
 70
 71/*
 72 * ld does not recognize this name token; use the constant.
 73 */
 74#define	PT_IA_64_UNWIND	0x70000001
 75
 76/*
 77 * We must supply the ELF program headers explicitly to get just one
 78 * PT_LOAD segment, and set the flags explicitly to make segments read-only.
 79 */
 80PHDRS
 81{
 82	readable	PT_LOAD	FILEHDR	PHDRS	FLAGS(4);	/* PF_R */
 83#ifndef HAVE_BUGGY_SEGREL
 84	epc		PT_LOAD	FILEHDR PHDRS	FLAGS(1);	/* PF_X */
 85#endif
 86	dynamic		PT_DYNAMIC		FLAGS(4);	/* PF_R */
 87	note		PT_NOTE			FLAGS(4);	/* PF_R */
 88	unwind		PT_IA_64_UNWIND;
 89}
 90
 91/*
 92 * This controls what symbols we export from the DSO.
 93 */
 94VERSION
 95{
 96	LINUX_2.5 {
 97	global:
 98		__kernel_syscall_via_break;
 99		__kernel_syscall_via_epc;
100		__kernel_sigtramp;
101
102	local: *;
103	};
104}
105
106/* The ELF entry point can be used to set the AT_SYSINFO value.  */
107ENTRY(__kernel_syscall_via_epc)