Message ID | 20190925180908.54260-1-ndesaulniers@google.com |
---|---|
State | Accepted |
Commit | 6a181e333954a26f46596b36f82abd14743570fd |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp975182ill; Wed, 25 Sep 2019 11:09:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGOFa6eL+zrAiaCRDU4lTFfY7+ibVmNjA/uaIH7SugOpHGAgPyUl0ykFMAVkm67QyNscSr X-Received: by 2002:a17:906:8054:: with SMTP id x20mr483872ejw.65.1569434961409; Wed, 25 Sep 2019 11:09:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569434961; cv=none; d=google.com; s=arc-20160816; b=TC9cVHWggKoE3debCUIxrVLv8peG+qcP1Hfu+tJSmt/FOC2fUUXbQ1/R8AV8IQrCfJ 2xxB4ZSFa0l4DFiBZ639di8TOUff6IgB5nl5T/bsl4/CzcMeA9nhO9uX3eSDKhYBEDex Z2MwWnFNDyeG692RvPbnSc3gdtuMn9EIGzQCGzx2yzkVOvQwIvP18S4QXdua2gR3QGlQ eLnyOtTqzj8wCRxwIDXnItwKWNptYhqG/udL2zFU3+2CbEFo4no3/z2oJvuMyGWhewV8 YhpVRIqUnI76yPReS7iqbIwREced9hwOssT8HWtsZ9Sx9QWhjaC6Ofxhw4bqjRbUmObV uCkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=odWFUeVAN7YhnhW55GNbSGYhuzY85XxckGS+YUUU8WI=; b=TZVegEEDa+P5/oTqwS+9gY6upQcxY6UxgB3Du5+twgQKJTKI1emZTvEep78LA4QxTG EgyeCcKZuNSbfDXzS7CWkmj4GTVNKlEsU7p9zlMQFlCPFJYi67KxdKfc45OIl7Bgfeur FtoJonoR6RKKFChxZM9cxxk3uaC1DPSG3VSdpFkM3kcOH1gsGok5gx7N7adzDpvyCNtt 8HSKsgv+EQ7XfDam9CuoeFp6zGnQ7MZSxjEeUo06smE6vxXDAcCfged2t8v8alpzDl7x YDzMMkOgWuji57EtUF98iHpYd28hPpU03iizPwpXY/c2tK2h7AjWORjbfzbKX18xJThp xtHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=djIhdg5B; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m6si149852ejq.392.2019.09.25.11.09.21; Wed, 25 Sep 2019 11:09:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=djIhdg5B; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439912AbfIYSJQ (ORCPT <rfc822;mike.holmes@linaro.org> + 26 others); Wed, 25 Sep 2019 14:09:16 -0400 Received: from mail-pl1-f202.google.com ([209.85.214.202]:48189 "EHLO mail-pl1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437914AbfIYSJP (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 25 Sep 2019 14:09:15 -0400 Received: by mail-pl1-f202.google.com with SMTP id g20so3847643plj.15 for <linux-kernel@vger.kernel.org>; Wed, 25 Sep 2019 11:09:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=odWFUeVAN7YhnhW55GNbSGYhuzY85XxckGS+YUUU8WI=; b=djIhdg5BWH7ef9newhR0tqcOBZ0wsXX2JJpiGQGf85VKLkQzQdcuR6Rz1olvK9VsXE ZI1mIbSZxRutrrB3llL7jge/6ojfzrlkcMGIE3hLz0bi/q9D/PMLm70+XXXr7Sk9tgxe bAxvPRL4hy6gGNHuyPLMFDnGL4EEIYPammuj767IZVltt8hLb52Y+ZmT1kefeZoBoU/F H5M6LtLWAgOG8M/f9iClYJl8RgtV16HaTPr6F11rthhdnRzNUC94vqauJXCCKG89GSS3 4X0NbADi0uEsQPRzKYtJtfg49CM30BXknPw4k2xTFnvMmn3ZPKjZ4nEQGHJ/KgxzD7cj zmdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=odWFUeVAN7YhnhW55GNbSGYhuzY85XxckGS+YUUU8WI=; b=nZ3q/Q+J7vISCQaop3UzYAovkQgCbKG4kqJJwjnfeEKVy0rc80HkV8o2VrCNWHPuJb GjeU6Rosva5nzCQf2dRCi8ZWsVqsAkCBUx88VZ8iHja+SGtKokwoqHi9IlKDdxDi/ESq pAUjESLMCqHcqvXhLVSjY5zNyTZBt4ghlViD5g1fx7Tdo/GPnvnRi7UWAIo3WDvNmZfO 97Digba+d2lnVkKT59HKb59qPe22oqogE9bisp2X+gCU8NJQJylcYKlbWdjGicVDODG2 w3IJkC+VcOdw0OxtaOhfiNRlpe1gzwS7eDjMuEBo1zh9QIrE0+MUK4WBh2EngA97L25u /NKA== X-Gm-Message-State: APjAAAX9J2RTvZ/Rl0TAqwkqKYx/ZYV1qarXTzBhce5RfSl9XrN3U91A V0pgHv/xmz5vCUubdc5GfROdt3QpXWBhSWXGMX0= X-Received: by 2002:a65:6285:: with SMTP id f5mr666067pgv.238.1569434953051; Wed, 25 Sep 2019 11:09:13 -0700 (PDT) Date: Wed, 25 Sep 2019 11:09:06 -0700 In-Reply-To: <20190925171025.GF3891@zn.tnic> Message-Id: <20190925180908.54260-1-ndesaulniers@google.com> Mime-Version: 1.0 References: <20190925171025.GF3891@zn.tnic> X-Mailer: git-send-email 2.23.0.351.gc4317032e6-goog Subject: [PATCH v3] x86, realmode: explicitly set entry via ENTRY in linker script From: Nick Desaulniers <ndesaulniers@google.com> To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de Cc: clang-built-linux@googlegroups.com, maskray@google.com, grimar@accesssoftek.com, ruiu@google.com, Nick Desaulniers <ndesaulniers@google.com>, Peter Smith <Peter.Smith@arm.com>, "H. Peter Anvin" <hpa@zytor.com>, x86@kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
[v3] x86, realmode: explicitly set entry via ENTRY in linker script
|
expand
|
diff --git a/arch/x86/realmode/rm/realmode.lds.S b/arch/x86/realmode/rm/realmode.lds.S index 3bb980800c58..64d135d1ee63 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 {
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. Link: https://github.com/ClangBuiltLinux/linux/issues/216 Suggested-by: Borislav Petkov <bp@alien8.de> Suggested-by: Peter Smith <Peter.Smith@arm.com> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> --- arch/x86/realmode/rm/realmode.lds.S | 1 + 1 file changed, 1 insertion(+) -- 2.23.0.351.gc4317032e6-goog