diff -p -U6 linux-2.6.32-431.el6.v18.i586/arch/x86/boot/compressed/head_32.S.distv14 linux-2.6.32-431.el6.v18.i586/arch/x86/boot/compressed/head_32.S --- linux-2.6.32-431.el6.v18.i586/arch/x86/boot/compressed/head_32.S.distv14 2009-12-03 12:51:21.000000000 +0900 +++ linux-2.6.32-431.el6.v18.i586/arch/x86/boot/compressed/head_32.S 2014-06-03 20:30:22.000000000 +0900 @@ -121,12 +121,25 @@ relocated: leal _ebss(%ebx), %ecx subl %edi, %ecx shrl $2, %ecx rep stosl /* + * Adjust our own GOT + */ + leal _got(%ebx), %edx + leal _egot(%ebx), %ecx +1: + cmpl %ecx, %edx + jae 2f + addl %ebx, (%edx) + addl $4, %edx + jmp 1b +2: + +/* * Do the decompression, and jump to the new kernel.. */ leal z_extract_offset_negative(%ebx), %ebp /* push arguments for decompress_kernel: */ pushl %ebp /* output address */ pushl $z_input_len /* input_len */ diff -p -U6 linux-2.6.32-431.el6.v18.i586/arch/x86/boot/compressed/head_64.S.distv14 linux-2.6.32-431.el6.v18.i586/arch/x86/boot/compressed/head_64.S --- linux-2.6.32-431.el6.v18.i586/arch/x86/boot/compressed/head_64.S.distv14 2009-12-03 12:51:21.000000000 +0900 +++ linux-2.6.32-431.el6.v18.i586/arch/x86/boot/compressed/head_64.S 2014-06-03 20:30:22.000000000 +0900 @@ -278,12 +278,25 @@ relocated: leaq _ebss(%rip), %rcx subq %rdi, %rcx shrq $3, %rcx rep stosq /* + * Adjust our own GOT + */ + leaq _got(%rip), %rdx + leaq _egot(%rip), %rcx +1: + cmpq %rcx, %rdx + jae 2f + addq %rbx, (%rdx) + addq $8, %rdx + jmp 1b +2: + +/* * Do the decompression, and jump to the new kernel.. */ pushq %rsi /* Save the real mode argument */ movq %rsi, %rdi /* real mode address */ leaq boot_heap(%rip), %rsi /* malloc area for uncompression */ leaq input_data(%rip), %rdx /* input_data */ diff -p -U6 linux-2.6.32-431.el6.v18.i586/arch/x86/boot/compressed/Makefile.distv14 linux-2.6.32-431.el6.v18.i586/arch/x86/boot/compressed/Makefile --- linux-2.6.32-431.el6.v18.i586/arch/x86/boot/compressed/Makefile.distv14 2009-12-03 12:51:21.000000000 +0900 +++ linux-2.6.32-431.el6.v18.i586/arch/x86/boot/compressed/Makefile 2014-06-03 23:26:38.000000000 +0900 @@ -6,12 +6,13 @@ targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 KBUILD_CFLAGS += -fno-strict-aliasing -fPIC KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING +cflags-$(CONFIG_X86_32) := -march=i386 cflags-$(CONFIG_X86_64) := -mcmodel=small KBUILD_CFLAGS += $(cflags-y) KBUILD_CFLAGS += $(call cc-option,-ffreestanding) KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector) KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ diff -p -U6 linux-2.6.32-431.el6.v18.i586/arch/x86/boot/compressed/vmlinux.lds.S.distv14 linux-2.6.32-431.el6.v18.i586/arch/x86/boot/compressed/vmlinux.lds.S --- linux-2.6.32-431.el6.v18.i586/arch/x86/boot/compressed/vmlinux.lds.S.distv14 2009-12-03 12:51:21.000000000 +0900 +++ linux-2.6.32-431.el6.v18.i586/arch/x86/boot/compressed/vmlinux.lds.S 2014-06-03 20:30:22.000000000 +0900 @@ -37,12 +37,18 @@ SECTIONS .rodata : { _rodata = . ; *(.rodata) /* read-only data */ *(.rodata.*) _erodata = . ; } + .got : { + _got = .; + KEEP(*(.got.plt)) + KEEP(*(.got)) + _egot = .; + } .data : { _data = . ; *(.data) *(.data.*) _edata = . ; }