linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "tip-bot2 for Nick Desaulniers" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Borislav Petkov <bp@alien8.de>, Peter Smith <Peter.Smith@arm.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Borislav Petkov <bp@suse.de>, "H. Peter Anvin" <hpa@zytor.com>,
	clang-built-linux@googlegroups.com, grimar@accesssoftek.com,
	Ingo Molnar <mingo@redhat.com>,
	maskray@google.com, ruiu@google.com,
	Thomas Gleixner <tglx@linutronix.de>, "x86-ml" <x86@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: [tip: x86/boot] x86/realmode: Explicitly set entry point via ENTRY in linker script
Date: Tue, 01 Oct 2019 10:37:00 -0000	[thread overview]
Message-ID: <156992622015.9978.3158653614859964805.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20190925180908.54260-1-ndesaulniers@google.com>

The following commit has been merged into the x86/boot branch of tip:

Commit-ID:     3f5f909bc331a7ff9120b11c8e0e320d60b01c89
Gitweb:        https://git.kernel.org/tip/3f5f909bc331a7ff9120b11c8e0e320d60b01c89
Author:        Nick Desaulniers <ndesaulniers@google.com>
AuthorDate:    Wed, 25 Sep 2019 11:09:06 -07:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Tue, 01 Oct 2019 12:17:58 +02:00

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.

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
---
 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 3bb9808..64d135d 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(pa_text_start)
 
 SECTIONS
 {

  reply	other threads:[~2019-10-01 10:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-bot2 for Nick Desaulniers [this message]
2019-10-01 20:18               ` [tip: x86/boot] x86/realmode: Explicitly set entry point " tip-bot2 for Nick Desaulniers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=156992622015.9978.3158653614859964805.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=Peter.Smith@arm.com \
    --cc=bp@alien8.de \
    --cc=bp@suse.de \
    --cc=clang-built-linux@googlegroups.com \
    --cc=grimar@accesssoftek.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=maskray@google.com \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=ndesaulniers@google.com \
    --cc=ruiu@google.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).