]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] x86: put .note.* sections into a PT_NOTE segment in vmlinux
authorJeremy Fitzhardinge <jeremy@xensource.com>
Tue, 26 Sep 2006 06:32:26 +0000 (23:32 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Sep 2006 15:48:55 +0000 (08:48 -0700)
commit99f52d077556f16422252181a75f473695256c82
tree997b14216fa77db77052766b38dd0ef4cd829648
parent5c814fe1d7dcf2a13158873f92a7cb8b073ee32c
[PATCH] x86: put .note.* sections into a PT_NOTE segment in vmlinux

This patch will pack any .note.* section into a PT_NOTE segment in the output
file.

To do this, we tell ld that we need a PT_NOTE segment.  This requires us to
start explicitly mapping sections to segments, so we also need to explicitly
create PT_LOAD segments for text and data, and map the sections to them
appropriately.  Fortunately, each section will default to its previous
section's segment, so it doesn't take many changes to vmlinux.lds.S.

This only changes i386 for now, but I presume the corresponding changes for
other architectures will be as simple.

This change also adds <linux/elfnote.h>, which defines C and Assembler macros
for actually creating ELF notes.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/vmlinux.lds.S
include/asm-generic/vmlinux.lds.h
include/linux/elfnote.h [new file with mode: 0644]