linux_dsm_epyc7002/arch/x86/realmode/rm
Nick Desaulniers 6a181e3339 x86/realmode: Explicitly set entry point via ENTRY in linker script
Linking with ld.lld via

$ make LD=ld.lld

produces the warning:

  ld.lld: warning: cannot find entry symbol _start; defaulting to 0x1000

Linking with ld.bfd shows the default entry is 0x1000:

$ readelf -h arch/x86/realmode/rm/realmode.elf | grep Entry
  Entry point address:               0x1000

While ld.lld is being pedantic, just set the entry point explicitly,
instead of depending on the implicit default. The symbol pa_text_start
refers to the start of the .text section, which may not be at 0x1000 if
the preceding sections listed in arch/x86/realmode/rm/realmode.lds.S
were large enough. This matches behavior in arch/x86/boot/setup.ld.

Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Suggested-by: Borislav Petkov <bp@alien8.de>
Suggested-by: Peter Smith <Peter.Smith@arm.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: clang-built-linux@googlegroups.com
Cc: grimar@accesssoftek.com
Cc: Ingo Molnar <mingo@redhat.com>
Cc: maskray@google.com
Cc: ruiu@google.com
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20190925180908.54260-1-ndesaulniers@google.com
Link: https://github.com/ClangBuiltLinux/linux/issues/216
2019-10-01 22:13:17 +02:00
..
.gitignore
bioscall.S x86, realmode: flattened rm hierachy 2012-05-08 11:48:45 -07:00
copy.S x86, realmode: flattened rm hierachy 2012-05-08 11:48:45 -07:00
header.S x86/realmode: Remove trampoline_status 2019-07-22 11:30:18 +02:00
Makefile Kbuild updates for v5.1 2019-03-10 17:48:21 -07:00
realmode.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
realmode.lds.S x86/realmode: Explicitly set entry point via ENTRY in linker script 2019-10-01 22:13:17 +02:00
reboot.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
regs.c x86, realmode: flattened rm hierachy 2012-05-08 11:48:45 -07:00
stack.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trampoline_32.S x86/realmode: Remove trampoline_status 2019-07-22 11:30:18 +02:00
trampoline_64.S x86/realmode: Remove trampoline_status 2019-07-22 11:30:18 +02:00
trampoline_common.S x86/realmode: Remove trampoline_status 2019-07-22 11:30:18 +02:00
video-bios.c x86, realmode: flattened rm hierachy 2012-05-08 11:48:45 -07:00
video-mode.c x86, realmode: flattened rm hierachy 2012-05-08 11:48:45 -07:00
video-vesa.c x86, realmode: flattened rm hierachy 2012-05-08 11:48:45 -07:00
video-vga.c x86, realmode: flattened rm hierachy 2012-05-08 11:48:45 -07:00
wakemain.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
wakeup_asm.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
wakeup.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00