From patchwork Mon Sep 23 22:24:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 174223 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3369897ill; Mon, 23 Sep 2019 15:26:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkDKwzZJHIsdbGMCJqKQsH2nn8+5vWxjyZOh0sdaugx9EMyiYkT/kM/UQ5PAygY6MbpEDv X-Received: by 2002:a05:6402:1501:: with SMTP id f1mr2557054edw.76.1569277601783; Mon, 23 Sep 2019 15:26:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569277601; cv=none; d=google.com; s=arc-20160816; b=cQAyD0h//L18ECmMU+B8wYzhm21HypapDoV+R5sALPpRRjfpNFCrYnpBj5/IYu/bXs drjX89jPu5Mj7OssgbZk92JvulPccbh2M9fm3t6mMcMDBBLaxsJi1V0fF9kTJIFt4vf5 jWNLtEvVdCKTHLK0HV3eOp4bZFLStfO9ZyJgMOoDKzpfjURWR7blEfXiTAsF9O9LOQbQ jPIF8QJAQ1WusyrffkHcgG+XUYXSAuP8ffXcD1JvqIt7CqsIeVDtiw72T9w+CK4Hx2i1 6y+i/qKR3835LYz9VtDMdPwtLi8lXBNakAzCvw8SpEr1/+bQ+uMu9Ue7gAGIniy8cdsh m1fQ== 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:mime-version :message-id:date:dkim-signature; bh=wBbyke/1peveMpLtlqWbxcVdjMGJbQeDIQGAiWlcIhI=; b=TXFTm8iqfAYNlYu/LIgIofiGs1jKCMJ7JU47POh39b1rZzT2ZJnOyTzN7BbeTZtzXd m8RNuXhEMAakQJymiLoDZkcp+tAyDqBPebLM/Dav08NtBSx6rLHdfmkxcXAAaOXc6loN XAKHovYnwCVseId1P6jiT9OUT5V6XQxNEKEGUu4k2fzHGm/7HWM/Q2hbO9Zf+WSgwXkJ ZjLMpS5kgpx/ENYgzDsjAZfGF3F/02TbH+4sTuIoezv4p4XC/LHafXbO5FQkJk6sg9XU k8HnWfrMTMu3fZbPQLffKia4YlFak7Q3HzODbiLA0pYoqTE5Nn8k4gFgI94GBwgaIJHj uz3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=QkV2uEzl; 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: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be24si7249529edb.120.2019.09.23.15.26.41; Mon, 23 Sep 2019 15:26:41 -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=QkV2uEzl; 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 S2503250AbfIWWYX (ORCPT + 26 others); Mon, 23 Sep 2019 18:24:23 -0400 Received: from mail-pg1-f202.google.com ([209.85.215.202]:56389 "EHLO mail-pg1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390460AbfIWWYW (ORCPT ); Mon, 23 Sep 2019 18:24:22 -0400 Received: by mail-pg1-f202.google.com with SMTP id 135so4867502pgc.23 for ; Mon, 23 Sep 2019 15:24:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=wBbyke/1peveMpLtlqWbxcVdjMGJbQeDIQGAiWlcIhI=; b=QkV2uEzl0J91ToT9bwa71ngvkxZNYIMmxnl+jVL0xM3sLqOb8PhAPO36SU43Ejv5In x6LOK3aSC0qaPa7IHZ4l8FVTL5oWw3Lr1MyGmUMlqG7upjwfyAwWirWrDZAg5N/LYYSf sJIqOLxSa7qJUEZFOg8tGWaHaKsiViBd2Do9CFKmCJc3zRRNOm1/d8lPBjHEXBjpdDd9 Fwk+WCo0lo7IFC98NB/yvRvIuV1FknfVQ+H860kZ4TR82W+TkSYG18bv+VKm6vi8VGCS uR0svdGUeTcC4EXk1bVjWP7XS9IplSM2Zg/7wWMW8FGp5zbqtQ2lLqcSFIyqw4sc0k/x 3g5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=wBbyke/1peveMpLtlqWbxcVdjMGJbQeDIQGAiWlcIhI=; b=LErHaHfDSL4PjdbfvVy/BEH3CtKcsLx6McS0wLpfIz6vJI6t1rpN38a+CsJDW/1kFj 0VGNst387qVrkXMLW7nYWaWc2YKwwJIWUsLBJs7KpuvRwSqki7+u0RyO0UiHeLpQfUoR foXCdaAT5qSCSR/KHOvUlkEIgS8f0EbeMSFLYPfo6oYz805nH1x/5/UdMvHs2FGXPiIv mhmyc8toFO8PCOtIfgEqXDD70Sg84dtk2IU8OK3Dr9lmMzHgi9UKRK8K4Y/kma7s45D0 iqUaKH7jxcmMmzCsXZyqCNwPMG4AmiOxkrnCbTEJXrRLgTziMUsHTw4rULKcFpgYJjLP /BIQ== X-Gm-Message-State: APjAAAW+AO9kIG/w9/tkrF8OVvkP1JCbVJXRMr4taEf2+c/57uI7awpD B7tqyEL2JW+cOxzLXFkhqFpN6+t2vH/ufINvGHY= X-Received: by 2002:a63:2006:: with SMTP id g6mr2091942pgg.287.1569277461795; Mon, 23 Sep 2019 15:24:21 -0700 (PDT) Date: Mon, 23 Sep 2019 15:24:02 -0700 Message-Id: <20190923222403.22956-1-ndesaulniers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.23.0.351.gc4317032e6-goog Subject: [PATCH] x86, realmode: explicitly set ENTRY in linker script From: Nick Desaulniers To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- arch/x86/realmode/rm/realmode.lds.S | 1 + 1 file changed, 1 insertion(+) -- 2.23.0.351.gc4317032e6-goog Reported-by: Sedat Dilek (seen on my first 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 {