[lkml]   [2019]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH v3] x86, realmode: explicitly set entry 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/
were large enough. This matches behavior in arch/x86/boot/setup.ld.

Suggested-by: Borislav Petkov <>
Suggested-by: Peter Smith <>
Signed-off-by: Nick Desaulniers <>
arch/x86/realmode/rm/ | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/x86/realmode/rm/ b/arch/x86/realmode/rm/
index 3bb980800c58..64d135d1ee63 100644
--- a/arch/x86/realmode/rm/
+++ b/arch/x86/realmode/rm/
@@ -11,6 +11,7 @@


 \ /
  Last update: 2019-09-25 20:09    [W:0.062 / U:2.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site