Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 boot and percpu updates from Ingo Molnar: "This tree contains a bootable images documentation update plus three slightly misplaced x86/asm percpu changes/optimizations" * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86-64: Use RIP-relative addressing for most per-CPU accesses x86-64: Handle PC-relative relocations on per-CPU data x86: Convert a few more per-CPU items to read-mostly ones x86, boot: Document intermediates more clearly
This commit is contained in:
@@ -3,6 +3,18 @@
|
||||
#
|
||||
# create a compressed vmlinux image from the original vmlinux
|
||||
#
|
||||
# vmlinuz is:
|
||||
# decompression code (*.o)
|
||||
# asm globals (piggy.S), including:
|
||||
# vmlinux.bin.(gz|bz2|lzma|...)
|
||||
#
|
||||
# vmlinux.bin is:
|
||||
# vmlinux stripped of debugging and comments
|
||||
# vmlinux.bin.all is:
|
||||
# vmlinux.bin + vmlinux.relocs
|
||||
# vmlinux.bin.(gz|bz2|lzma|...) is:
|
||||
# (see scripts/Makefile.lib size_append)
|
||||
# compressed vmlinux.bin.all + u32 size of vmlinux.bin.all
|
||||
|
||||
targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \
|
||||
vmlinux.bin.xz vmlinux.bin.lzo vmlinux.bin.lz4
|
||||
|
@@ -260,7 +260,7 @@ static void handle_relocations(void *output, unsigned long output_len)
|
||||
|
||||
/*
|
||||
* Process relocations: 32 bit relocations first then 64 bit after.
|
||||
* Two sets of binary relocations are added to the end of the kernel
|
||||
* Three sets of binary relocations are added to the end of the kernel
|
||||
* before compression. Each relocation table entry is the kernel
|
||||
* address of the location which needs to be updated stored as a
|
||||
* 32-bit value which is sign extended to 64 bits.
|
||||
@@ -270,6 +270,8 @@ static void handle_relocations(void *output, unsigned long output_len)
|
||||
* kernel bits...
|
||||
* 0 - zero terminator for 64 bit relocations
|
||||
* 64 bit relocation repeated
|
||||
* 0 - zero terminator for inverse 32 bit relocations
|
||||
* 32 bit inverse relocation repeated
|
||||
* 0 - zero terminator for 32 bit relocations
|
||||
* 32 bit relocation repeated
|
||||
*
|
||||
@@ -286,6 +288,16 @@ static void handle_relocations(void *output, unsigned long output_len)
|
||||
*(uint32_t *)ptr += delta;
|
||||
}
|
||||
#ifdef CONFIG_X86_64
|
||||
while (*--reloc) {
|
||||
long extended = *reloc;
|
||||
extended += map;
|
||||
|
||||
ptr = (unsigned long)extended;
|
||||
if (ptr < min_addr || ptr > max_addr)
|
||||
error("inverse 32-bit relocation outside of kernel!\n");
|
||||
|
||||
*(int32_t *)ptr -= delta;
|
||||
}
|
||||
for (reloc--; *reloc; reloc--) {
|
||||
long extended = *reloc;
|
||||
extended += map;
|
||||
|
Reference in New Issue
Block a user