ia64/linux-2.6.18-xen.hg

changeset 17:3cb68e3808a4

Imported patch x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch from xen-unstable.hg 15200:bd3d6b4c52ec
author Ian Campbell <ian.campbell@xensource.com>
date Mon Jun 04 10:05:24 2007 +0100 (2007-06-04)
parents b450c13522c8
children 50af4d15dfea
files arch/x86_64/kernel/vmlinux.lds.S
line diff
     1.1 --- a/arch/x86_64/kernel/vmlinux.lds.S	Mon Jun 04 10:05:24 2007 +0100
     1.2 +++ b/arch/x86_64/kernel/vmlinux.lds.S	Mon Jun 04 10:05:24 2007 +0100
     1.3 @@ -13,6 +13,12 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86
     1.4  OUTPUT_ARCH(i386:x86-64)
     1.5  ENTRY(phys_startup_64)
     1.6  jiffies_64 = jiffies;
     1.7 +PHDRS {
     1.8 +	text PT_LOAD FLAGS(5);	/* R_E */
     1.9 +	data PT_LOAD FLAGS(7);	/* RWE */
    1.10 +	user PT_LOAD FLAGS(7);	/* RWE */
    1.11 +	note PT_NOTE FLAGS(4);	/* R__ */
    1.12 +}
    1.13  SECTIONS
    1.14  {
    1.15    . = __START_KERNEL;
    1.16 @@ -31,7 +37,7 @@ SECTIONS
    1.17  	KPROBES_TEXT
    1.18  	*(.fixup)
    1.19  	*(.gnu.warning)
    1.20 -	} = 0x9090
    1.21 +	} :text = 0x9090
    1.22    				/* out-of-line lock text */
    1.23    .text.lock : AT(ADDR(.text.lock) - LOAD_OFFSET) { *(.text.lock) }
    1.24  
    1.25 @@ -57,17 +63,10 @@ SECTIONS
    1.26    .data : AT(ADDR(.data) - LOAD_OFFSET) {
    1.27  	*(.data)
    1.28  	CONSTRUCTORS
    1.29 -	}
    1.30 +	} :data
    1.31  
    1.32    _edata = .;			/* End of data section */
    1.33  
    1.34 -  __bss_start = .;		/* BSS */
    1.35 -  .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
    1.36 -	*(.bss.page_aligned)	
    1.37 -	*(.bss)
    1.38 -	}
    1.39 -  __bss_stop = .;
    1.40 -
    1.41    . = ALIGN(PAGE_SIZE);
    1.42    . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
    1.43    .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
    1.44 @@ -89,7 +88,7 @@ SECTIONS
    1.45  #define VVIRT(x) (ADDR(x) - VVIRT_OFFSET)
    1.46  
    1.47    . = VSYSCALL_ADDR;
    1.48 -  .vsyscall_0 :	 AT(VSYSCALL_PHYS_ADDR) { *(.vsyscall_0) }
    1.49 +  .vsyscall_0 :	 AT(VSYSCALL_PHYS_ADDR) { *(.vsyscall_0) } :user
    1.50    __vsyscall_0 = VSYSCALL_VIRT_ADDR;
    1.51  
    1.52    . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
    1.53 @@ -132,7 +131,7 @@ SECTIONS
    1.54    . = ALIGN(8192);		/* init_task */
    1.55    .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
    1.56  	*(.data.init_task)
    1.57 -  }
    1.58 +  } :data
    1.59  
    1.60    . = ALIGN(4096);
    1.61    .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
    1.62 @@ -222,6 +221,14 @@ SECTIONS
    1.63    . = ALIGN(4096);
    1.64    __nosave_end = .;
    1.65  
    1.66 +  __bss_start = .;		/* BSS */
    1.67 +  . = ALIGN(4096);
    1.68 +  .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
    1.69 +	*(.bss.page_aligned)
    1.70 +	*(.bss)
    1.71 +	}
    1.72 +  __bss_stop = .;
    1.73 +
    1.74    _end = . ;
    1.75  
    1.76    /* Sections to be discarded */
    1.77 @@ -235,4 +242,6 @@ SECTIONS
    1.78    STABS_DEBUG
    1.79  
    1.80    DWARF_DEBUG
    1.81 +
    1.82 +  NOTES
    1.83  }