All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86, realmode: explicitly set ENTRY in linker script
@ 2019-09-23 22:24 Nick Desaulniers
  2019-09-24 17:30 ` Sedat Dilek
  2019-09-24 18:24 ` Nathan Chancellor
  0 siblings, 2 replies; 13+ messages in thread
From: Nick Desaulniers @ 2019-09-23 22:24 UTC (permalink / raw)
  To: tglx, mingo, bp
  Cc: clang-built-linux, Nick Desaulniers, H. Peter Anvin, x86, linux-kernel

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.

Link: https://github.com/ClangBuiltLinux/linux/issues/216
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
 arch/x86/realmode/rm/realmode.lds.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/realmode/rm/realmode.lds.S b/arch/x86/realmode/rm/realmode.lds.S
index 3bb980800c58..2034f5f79bff 100644
--- a/arch/x86/realmode/rm/realmode.lds.S
+++ b/arch/x86/realmode/rm/realmode.lds.S
@@ -11,6 +11,7 @@
 
 OUTPUT_FORMAT("elf32-i386")
 OUTPUT_ARCH(i386)
+ENTRY(0x1000)
 
 SECTIONS
 {
-- 
2.23.0.351.gc4317032e6-goog


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-10-01 20:19 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-23 22:24 [PATCH] x86, realmode: explicitly set ENTRY in linker script Nick Desaulniers
2019-09-24 17:30 ` Sedat Dilek
2019-09-24 18:24 ` Nathan Chancellor
2019-09-24 18:32   ` Nick Desaulniers
2019-09-24 19:33     ` [PATCH v2] x86, realmode: explicitly set entry via command line Nick Desaulniers
2019-09-24 19:37       ` Nick Desaulniers
2019-09-25 10:20       ` Borislav Petkov
2019-09-25 16:35         ` Nick Desaulniers
2019-09-25 17:02           ` Peter Smith
2019-09-25 17:10           ` Borislav Petkov
2019-09-25 18:09             ` [PATCH v3] x86, realmode: explicitly set entry via ENTRY in linker script Nick Desaulniers
2019-10-01 10:37               ` [tip: x86/boot] x86/realmode: Explicitly set entry point " tip-bot2 for Nick Desaulniers
2019-10-01 20:18               ` tip-bot2 for Nick Desaulniers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.