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 Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
cpufreq
aperture.c [PATCH] A few trivial spelling and grammar fixes 2006-09-26 10:52:28 +02:00
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 [CRYPTO] all: Pass tfm instead of ctx to algorithms 2006-06-26 17:34:39 +10:00
audit.c [PATCH] audit: AUDIT_PERM support 2006-09-11 13:32:30 -04:00
crash_dump.c
crash.c [PATCH] Remove all ifdefs for local/io apic 2006-09-26 10:52:29 +02:00
e820.c [PATCH] Remove non e820 fallbacks in high level code 2006-09-26 10:52:37 +02:00
early_printk.c [PATCH] Convert x86-64 to early param 2006-09-26 10:52:32 +02:00
early-quirks.c [PATCH] Move early chipset quirks out to new file 2006-09-26 10:52:30 +02:00
entry.S [PATCH] Add a missing check for irq flags tracing in NMI 2006-09-26 10:52:37 +02:00
functionlist [NET]: make skb_release_data() static 2006-06-29 16:58:30 -07:00
genapic_cluster.c [PATCH] remove int_delivery_dest 2006-09-26 10:52:31 +02:00
genapic_flat.c [PATCH] Replace local_save_flags+local_irq_disable with 2006-09-26 10:52:33 +02:00
genapic.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
head64.c [PATCH] Remove need for early lockdep init 2006-09-26 10:52:32 +02:00
head.S [PATCH] Reload CS when startup_64 is used. 2006-09-26 10:52:38 +02:00
i387.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
i8259.c [PATCH] Remove all ifdefs for local/io apic 2006-09-26 10:52:29 +02:00
init_task.c [PATCH] x86_64: Save original IST values for checking stack addresses 2006-08-30 16:05:16 -07:00
io_apic.c [PATCH] Remove APIC version/cpu capability mpparse checking/printing 2006-09-26 10:52:37 +02:00
ioport.c [PATCH] x86-64 TIF flags for debug regs and io bitmap in ctxsw 2006-09-26 10:52:28 +02:00
irq.c [PATCH] Remove apic mismatch counter 2006-09-26 10:52:29 +02:00
k8.c [PATCH] x86_64: Clean and enhance up K8 northbridge access code 2006-06-26 10:48:15 -07:00
kprobes.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
ldt.c
machine_kexec.c [PATCH] Convert x86-64 to early param 2006-09-26 10:52:32 +02:00
Makefile [PATCH] Move early chipset quirks out to new file 2006-09-26 10:52:30 +02:00
mce_amd.c [PATCH] cpu hotplug: use hotplug version of registration in late inits 2006-07-31 13:28:39 -07:00
mce_intel.c
mce.c [PATCH] Remove safe_smp_processor_id() 2006-09-26 10:52:37 +02:00
module.c [PATCH] x86_64: x86_64 version of the smp alternative patch. 2006-06-26 10:48:14 -07:00
mpparse.c [PATCH] Fix coding style and output of the mptable parser 2006-09-26 10:52:37 +02:00
nmi.c [PATCH] x86: i386/x86-64 Add nmi watchdog support for new Intel CPUs 2006-09-26 10:52:27 +02:00
pci-calgary.c [PATCH] Calgary IOMMU: eradicate sole remaining 80 chars per line offender 2006-09-26 10:52:33 +02:00
pci-dma.c [PATCH] Convert x86-64 to early param 2006-09-26 10:52:32 +02:00
pci-gart.c [PATCH] remove superflous BUG_ON's in nommu and gart 2006-09-26 10:52:32 +02:00
pci-nommu.c [PATCH] remove superflous BUG_ON's in nommu and gart 2006-09-26 10:52:32 +02:00
pci-swiotlb.c [PATCH] x86_64: Fix swiotlb=force 2006-07-29 20:59:55 -07:00
pmtimer.c [PATCH] make pmtmr_ioport __read_mostly 2006-06-26 09:58:21 -07:00
process.c [PATCH] non lazy "sleazy" fpu implementation 2006-09-26 10:52:36 +02:00
ptrace.c [PATCH] i386/x86-64: rename is_at_popf(), add iret to tests and fix 2006-09-26 10:52:33 +02:00
reboot.c [PATCH] x86_64: Move export symbols to their C functions 2006-06-26 10:48:22 -07:00
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 [PATCH] Add TIF_RESTORE_SIGMASK 2006-09-26 10:52:26 +02:00
smp.c [PATCH] Remove safe_smp_processor_id() 2006-09-26 10:52:37 +02:00
smpboot.c [PATCH] Convert x86-64 to early param 2006-09-26 10:52:32 +02:00
stacktrace.c [PATCH] Merge stacktrace and show_trace 2006-09-26 10:52:34 +02:00
suspend_asm.S
suspend.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
sys_x86_64.c
syscall.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
tce.c [PATCH] Calgary IOMMU: consolidate per bus data structures 2006-09-26 10:52:31 +02:00
time.c [PATCH] Detect clock skew during suspend 2006-09-26 10:52:37 +02:00
trampoline.S [PATCH] Fix gdt table size in trampoline.S 2006-09-26 10:52:32 +02:00
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 [PATCH] Add sparse annotation to vsyscall.c 2006-09-26 10:52:33 +02:00
x8664_ksyms.c [PATCH] x86_64: Move export symbols to their C functions 2006-06-26 10:48:22 -07:00