Commit 26a30fff authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'x86_build_for_v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 build updates from Borislav Petkov:

 - Treat R_386_PLT32 relocations like R_386_PC32 ones when building

 - Add documentation about "make kvm_guest/xen.config" in "make help"
   output

* tag 'x86_build_for_v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/build: Treat R_386_PLT32 relocation as R_386_PC32
  x86/build: Realign archhelp
  x86/build: Add {kvm_guest,xen}.config targets to make help's output
parents b0fb2938 bb73d071
...@@ -296,10 +296,10 @@ archclean: ...@@ -296,10 +296,10 @@ archclean:
define archhelp define archhelp
echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)' echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)'
echo ' install - Install kernel using' echo ' install - Install kernel using (your) ~/bin/$(INSTALLKERNEL) or'
echo ' (your) ~/bin/$(INSTALLKERNEL) or' echo ' (distribution) /sbin/$(INSTALLKERNEL) or install to '
echo ' (distribution) /sbin/$(INSTALLKERNEL) or' echo ' $$(INSTALL_PATH) and run lilo'
echo ' install to $$(INSTALL_PATH) and run lilo' echo ''
echo ' fdimage - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)' echo ' fdimage - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
echo ' fdimage144 - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)' echo ' fdimage144 - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
echo ' fdimage288 - Create 2.8MB boot floppy image (arch/x86/boot/fdimage)' echo ' fdimage288 - Create 2.8MB boot floppy image (arch/x86/boot/fdimage)'
...@@ -307,4 +307,8 @@ define archhelp ...@@ -307,4 +307,8 @@ define archhelp
echo ' bzdisk/fdimage*/isoimage also accept:' echo ' bzdisk/fdimage*/isoimage also accept:'
echo ' FDARGS="..." arguments for the booted kernel' echo ' FDARGS="..." arguments for the booted kernel'
echo ' FDINITRD=file initrd for the booted kernel' echo ' FDINITRD=file initrd for the booted kernel'
echo ''
echo ' kvm_guest.config - Enable Kconfig items for running this kernel as a KVM guest'
echo ' xen.config - Enable Kconfig items for running this kernel as a Xen guest'
endef endef
...@@ -114,6 +114,7 @@ int apply_relocate(Elf32_Shdr *sechdrs, ...@@ -114,6 +114,7 @@ int apply_relocate(Elf32_Shdr *sechdrs,
*location += sym->st_value; *location += sym->st_value;
break; break;
case R_386_PC32: case R_386_PC32:
case R_386_PLT32:
/* Add the value, subtract its position */ /* Add the value, subtract its position */
*location += sym->st_value - (uint32_t)location; *location += sym->st_value - (uint32_t)location;
break; break;
......
...@@ -867,9 +867,11 @@ static int do_reloc32(struct section *sec, Elf_Rel *rel, Elf_Sym *sym, ...@@ -867,9 +867,11 @@ static int do_reloc32(struct section *sec, Elf_Rel *rel, Elf_Sym *sym,
case R_386_PC32: case R_386_PC32:
case R_386_PC16: case R_386_PC16:
case R_386_PC8: case R_386_PC8:
case R_386_PLT32:
/* /*
* NONE can be ignored and PC relative relocations don't * NONE can be ignored and PC relative relocations don't need
* need to be adjusted. * to be adjusted. Because sym must be defined, R_386_PLT32 can
* be treated the same way as R_386_PC32.
*/ */
break; break;
...@@ -910,9 +912,11 @@ static int do_reloc_real(struct section *sec, Elf_Rel *rel, Elf_Sym *sym, ...@@ -910,9 +912,11 @@ static int do_reloc_real(struct section *sec, Elf_Rel *rel, Elf_Sym *sym,
case R_386_PC32: case R_386_PC32:
case R_386_PC16: case R_386_PC16:
case R_386_PC8: case R_386_PC8:
case R_386_PLT32:
/* /*
* NONE can be ignored and PC relative relocations don't * NONE can be ignored and PC relative relocations don't need
* need to be adjusted. * to be adjusted. Because sym must be defined, R_386_PLT32 can
* be treated the same way as R_386_PC32.
*/ */
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment