direct-io.hg
changeset 11439:6f36370e373a
[LINUX] Move .bss declaration after .data.* in x86_64 linker script.
Older binutils (prior to 2.16) have a problem with the linker script resulting
from the change introducing explicit segment maps. Namely does the
respective linker not properly handle @nobits sections (i.e. .bss) sitting
between @progbits ones (i.e. .data.*). The .bss section must therefore
be moved past all initialized sections (as is already the case on i386).
Replacement patch attached.
From: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Older binutils (prior to 2.16) have a problem with the linker script resulting
from the change introducing explicit segment maps. Namely does the
respective linker not properly handle @nobits sections (i.e. .bss) sitting
between @progbits ones (i.e. .data.*). The .bss section must therefore
be moved past all initialized sections (as is already the case on i386).
Replacement patch attached.
From: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
author | Ian Campbell <ian.campbell@xensource.com> |
---|---|
date | Sat Sep 09 20:48:16 2006 +0100 (2006-09-09) |
parents | 965df40965e5 |
children | bfd00b317815 |
files | patches/linux-2.6.16.13/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch |
line diff
1.1 --- a/patches/linux-2.6.16.13/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch Fri Sep 08 16:45:39 2006 -0700 1.2 +++ b/patches/linux-2.6.16.13/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch Sat Sep 09 20:48:16 2006 +0100 1.3 @@ -1,5 +1,3 @@ 1.4 -diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S 1.5 -index 7c4de31..ef418b3 100644 1.6 --- a/arch/x86_64/kernel/vmlinux.lds.S 1.7 +++ b/arch/x86_64/kernel/vmlinux.lds.S 1.8 @@ -13,6 +13,12 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86 1.9 @@ -24,7 +22,7 @@ index 7c4de31..ef418b3 100644 1.10 /* out-of-line lock text */ 1.11 .text.lock : AT(ADDR(.text.lock) - LOAD_OFFSET) { *(.text.lock) } 1.12 1.13 -@@ -57,7 +63,7 @@ #endif 1.14 +@@ -57,17 +63,10 @@ #endif 1.15 .data : AT(ADDR(.data) - LOAD_OFFSET) { 1.16 *(.data) 1.17 CONSTRUCTORS 1.18 @@ -33,7 +31,17 @@ index 7c4de31..ef418b3 100644 1.19 1.20 _edata = .; /* End of data section */ 1.21 1.22 -@@ -89,7 +95,7 @@ #define VVIRT_OFFSET (VSYSCALL_ADDR - VS 1.23 +- __bss_start = .; /* BSS */ 1.24 +- .bss : AT(ADDR(.bss) - LOAD_OFFSET) { 1.25 +- *(.bss.page_aligned) 1.26 +- *(.bss) 1.27 +- } 1.28 +- __bss_stop = .; 1.29 +- 1.30 + . = ALIGN(PAGE_SIZE); 1.31 + . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); 1.32 + .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) { 1.33 +@@ -89,7 +88,7 @@ #define VVIRT_OFFSET (VSYSCALL_ADDR - VS 1.34 #define VVIRT(x) (ADDR(x) - VVIRT_OFFSET) 1.35 1.36 . = VSYSCALL_ADDR; 1.37 @@ -42,7 +50,7 @@ index 7c4de31..ef418b3 100644 1.38 __vsyscall_0 = VSYSCALL_VIRT_ADDR; 1.39 1.40 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); 1.41 -@@ -132,7 +138,7 @@ #undef VVIRT 1.42 +@@ -132,7 +131,7 @@ #undef VVIRT 1.43 . = ALIGN(8192); /* init_task */ 1.44 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { 1.45 *(.data.init_task) 1.46 @@ -51,7 +59,22 @@ index 7c4de31..ef418b3 100644 1.47 1.48 . = ALIGN(4096); 1.49 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { 1.50 -@@ -235,4 +241,6 @@ #endif 1.51 +@@ -222,6 +221,14 @@ SECTIONS 1.52 + . = ALIGN(4096); 1.53 + __nosave_end = .; 1.54 + 1.55 ++ __bss_start = .; /* BSS */ 1.56 ++ . = ALIGN(4096); 1.57 ++ .bss : AT(ADDR(.bss) - LOAD_OFFSET) { 1.58 ++ *(.bss.page_aligned) 1.59 ++ *(.bss) 1.60 ++ } 1.61 ++ __bss_stop = .; 1.62 ++ 1.63 + _end = . ; 1.64 + 1.65 + /* Sections to be discarded */ 1.66 +@@ -235,4 +242,6 @@ #endif 1.67 STABS_DEBUG 1.68 1.69 DWARF_DEBUG