X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=linux-2.6-020-build-id.patch;h=f4a3b46e6eaa62479e87530e71451c48fcb731ac;hb=refs%2Fheads%2F22;hp=77f75fc50b703ab25bd4676267d488acdca251d4;hpb=c68dc90b71773c843118bb84adbc0d37d6747abb;p=linux-2.6.git diff --git a/linux-2.6-020-build-id.patch b/linux-2.6-020-build-id.patch index 77f75fc50..f4a3b46e6 100644 --- a/linux-2.6-020-build-id.patch +++ b/linux-2.6-020-build-id.patch @@ -104,3 +104,112 @@ index 1818c50..d988f5d 100644 $(filter-out FORCE,$^) $(modules): %.ko :%.o %.mod.o FORCE + + + +From: Roland McGrath +Date: Thu, 19 Jul 2007 08:48:37 +0000 (-0700) +Subject: x86_64: Put allocated ELF notes in read-only data segment +X-Git-Tag: v2.6.23-rc1~393 +X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=2e1d5b8f24a887caded5ae3ceb2f341d4fbd1861 + +x86_64: Put allocated ELF notes in read-only data segment + +This changes the x86_64 linker script to use the asm-generic NOTES macro so +that ELF note sections with SHF_ALLOC set are linked into the kernel image +along with other read-only data. The PT_NOTE also points to their location. + +This paves the way for putting useful build-time information into ELF notes +that can be found easily later in a kernel memory dump. + +Signed-off-by: Roland McGrath +Cc: Andi Kleen +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +--- + +diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S +index 2259069..5c57ea4 100644 +--- a/arch/x86_64/kernel/vmlinux.lds.S ++++ b/arch/x86_64/kernel/vmlinux.lds.S +@@ -48,7 +48,9 @@ SECTIONS + __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { *(__ex_table) } + __stop___ex_table = .; + +- BUG_TABLE ++ NOTES :text :note ++ ++ BUG_TABLE :text + + RODATA + + + + +From: Roland McGrath +Date: Thu, 19 Jul 2007 08:48:36 +0000 (-0700) +Subject: i386: Put allocated ELF notes in read-only data segment +X-Git-Tag: v2.6.23-rc1~394 +X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=cbe87121f1545bb3e98ae114519bf0c4db27d6ab + +i386: Put allocated ELF notes in read-only data segment + +This changes the i386 linker script and the asm-generic macro it uses so that +ELF note sections with SHF_ALLOC set are linked into the kernel image along +with other read-only data. The PT_NOTE also points to their location. + +This paves the way for putting useful build-time information into ELF notes +that can be found easily later in a kernel memory dump. + +Signed-off-by: Roland McGrath +Cc: Andi Kleen +Cc: Paul Mackerras +Cc: Benjamin Herrenschmidt +Cc: Richard Henderson +Cc: Ivan Kokshaysky +Cc: Martin Schwidefsky +Cc: Heiko Carstens +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +--- + +diff --git a/arch/i386/kernel/vmlinux.lds.S b/arch/i386/kernel/vmlinux.lds.S +index 4dc44b8..7d72cce 100644 +--- a/arch/i386/kernel/vmlinux.lds.S ++++ b/arch/i386/kernel/vmlinux.lds.S +@@ -60,7 +60,9 @@ SECTIONS + __stop___ex_table = .; + } + +- BUG_TABLE ++ NOTES :text :note ++ ++ BUG_TABLE :text + + . = ALIGN(4); + .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { +@@ -208,6 +210,4 @@ SECTIONS + STABS_DEBUG + + DWARF_DEBUG +- +- NOTES + } +diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h +index a2b09ed..0240e05 100644 +--- a/include/asm-generic/vmlinux.lds.h ++++ b/include/asm-generic/vmlinux.lds.h +@@ -224,7 +224,11 @@ + } + + #define NOTES \ +- .notes : { *(.note.*) } :note ++ .notes : AT(ADDR(.notes) - LOAD_OFFSET) { \ ++ VMLINUX_SYMBOL(__start_notes) = .; \ ++ *(.note.*) \ ++ VMLINUX_SYMBOL(__stop_notes) = .; \ ++ } + + #define INITCALLS \ + *(.initcall0.init) \ +