kernel-ark/arch/x86_64/kernel
Ian Campbell f2a9e1dec2 [PATCH] Put .note.* sections into a PT_NOTE segment
This patch updates x86_64 linker script to pack any .note.* sections
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.

The corresponding change is already made for i386 in -mm and I'd like
this patch to join it. The section to segment mappings do change as do
the segment flags so some time in -mm would be good for that reason as
well, just in case.

In particular .data and .bss move from the text segment to the data
segment and .data.cacheline_aligned .data.read_mostly are put in the
data segment instead of a separate one.

I think that it would be possible to exactly match the existing section
to segment mapping and flags but it would be a more intrusive change and
I'm not sure there is a reason for the existing layout other than it is
what you get by default if you don't explicitly specify something else.
If there is a reason for the existing layout then I will of course make
the more intrusive change. If there is no reason we could probably drop
the executable or writable flags from some segments but I don't know how
much attention is paid to them anyway so it might not be worth the
effort.

The vsyscall related sections need to go in a different segment to the
normal data segment and so I invented a "user" segment to contain them.
I believe this should appear to be another data segment as far as the
kernel is concerned so the flags are setup accordingly.

The notes will be used in the Xen paravirt_ops backend to provide
additional information to the domain builder. I am in the process of
converting the xen-unstable kernels and tools over to this scheme at the
moment to support this in the future.

It has been suggested to me that the notes segment should have flags 0
(i.e. not readable) since it is only used by the loader and is not used
at runtime. For now I went with a readable segment since that is what
the i386 patch uses.

AK: dropped NOTES addition right now because the needed infrastructure
for that is not merged yet

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: Andi Kleen <ak@suse.de>
2006-09-26 10:52:38 +02:00
..
acpi
cpufreq
aperture.c
apic.c [PATCH] Don't access the APIC in safe_smp_processor_id when it is not mapped yet 2006-09-26 10:52:34 +02:00
asm-offsets.c
audit.c
crash_dump.c
crash.c
e820.c [PATCH] Remove non e820 fallbacks in high level code 2006-09-26 10:52:37 +02:00
early_printk.c
early-quirks.c
entry.S [PATCH] Add a missing check for irq flags tracing in NMI 2006-09-26 10:52:37 +02:00
functionlist
genapic_cluster.c
genapic_flat.c
genapic.c
head64.c
head.S [PATCH] Reload CS when startup_64 is used. 2006-09-26 10:52:38 +02:00
i387.c
i8259.c
init_task.c
io_apic.c [PATCH] Remove APIC version/cpu capability mpparse checking/printing 2006-09-26 10:52:37 +02:00
ioport.c
irq.c
k8.c
kprobes.c
ldt.c
machine_kexec.c
Makefile
mce_amd.c
mce_intel.c
mce.c [PATCH] Remove safe_smp_processor_id() 2006-09-26 10:52:37 +02:00
module.c
mpparse.c [PATCH] Fix coding style and output of the mptable parser 2006-09-26 10:52:37 +02:00
nmi.c
pci-calgary.c
pci-dma.c
pci-gart.c
pci-nommu.c
pci-swiotlb.c
pmtimer.c
process.c [PATCH] non lazy "sleazy" fpu implementation 2006-09-26 10:52:36 +02:00
ptrace.c
reboot.c
relocate_kernel.S
setup64.c [PATCH] Auto size the per cpu area. 2006-09-26 10:52:35 +02:00
setup.c [PATCH] mark init_amd() as __cpuinit 2006-09-26 10:52:36 +02:00
signal.c
smp.c [PATCH] Remove safe_smp_processor_id() 2006-09-26 10:52:37 +02:00
smpboot.c
stacktrace.c [PATCH] Merge stacktrace and show_trace 2006-09-26 10:52:34 +02:00
suspend_asm.S
suspend.c
sys_x86_64.c
syscall.c
tce.c
time.c [PATCH] Detect clock skew during suspend 2006-09-26 10:52:37 +02:00
trampoline.S
traps.c [PATCH] Remove safe_smp_processor_id() 2006-09-26 10:52:37 +02:00
vmlinux.lds.S [PATCH] Put .note.* sections into a PT_NOTE segment 2006-09-26 10:52:38 +02:00
vsmp.c
vsyscall.c
x8664_ksyms.c