Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1731002ybn; Thu, 26 Sep 2019 01:04:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjsIOWwp73PhR1Jm9EbHhWiVgSwPxY7z9GGJYcQzCI4kVuTbEyRY9DS+t4KMxLJEE66aqe X-Received: by 2002:a17:906:8319:: with SMTP id j25mr1988974ejx.122.1569485091731; Thu, 26 Sep 2019 01:04:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569485091; cv=none; d=google.com; s=arc-20160816; b=hfpqnQgBE3dydd/HZdtYyMcslHO8Rbry23kTMUiXPxuaeyOmni7AAQBbEGTZeDucEV NalKb+0qv5A62aDM6DwyRyqCd5eEHHJK6RvDJuK4VCfz2qU563R152ZbyrHPR3jDRU3J WqHaoBLo965IF/9SxDKDhmkygmKCSkDUnI7g708ywSAQ+/fg5FknWw8HO2IUL8+q0bnQ 0RLm0RmRT1YYcjMlEQUnmCVbCxwoU1J6J+VcN3tHt5gfHWsLzv+CKWxX79csiq2NAjPQ WAjw2+jM476Idasd4h1Z32khCts3d/mIaIgvwrWJYNCl8umCDDJMOTKjsNW/t5CMeqBQ VGmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=PfDXe77LWCv3bUFNxj23S7X1wmw2FVGGW0qOw39YiDI=; b=ogvTTkm+V3/aN7i1/pIYjxFRmqGswuq7wEg6dV5k2ynjiawoIoM/spQ/lZMVNJYJ2Z 3ZMKrYrbo0ufdzzaPCBiM2MMPM0jjFO5KlFHkFgHL6MxJ/FHDJgBNTLpIXMoemdZX3at 5CFmWqdA1fY2e+HF0wyGK+IpxN4Gm3/oUL+jk1jZTd9G84pp8qFZgn2GgGKUTnOr3Xmo aZR4Ww4g0m97SCL0bvUh/wedx/+DiwkQM3/t3Zb88wfoCx2tBfJBautIslVRAk2RdZIz jwAw76uRFGroPP6Q7UZZHh6mXPZ/zKbhDeXkS4XKpteKoPoPUvMnHLQ8dJcggQr0QDGS 9rYA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a41si834678eda.366.2019.09.26.01.04.28; Thu, 26 Sep 2019 01:04:51 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730156AbfIXMPU (ORCPT + 99 others); Tue, 24 Sep 2019 08:15:20 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:46696 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728080AbfIXMPT (ORCPT ); Tue, 24 Sep 2019 08:15:19 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iCjir-0005vn-FO; Tue, 24 Sep 2019 14:15:13 +0200 Message-ID: <106a01a6027fc0587ea9f01678fb86732a8dbe1e.camel@sipsolutions.net> Subject: Re: [PATCH] modpost: fix static EXPORT_SYMBOL warnings for UML build From: Johannes Berg To: Masahiro Yamada , linux-kbuild@vger.kernel.org Cc: Denis Efremov , Michal Marek , linux-kernel@vger.kernel.org Date: Tue, 24 Sep 2019 14:15:12 +0200 In-Reply-To: <20190924120740.12425-1-yamada.masahiro@socionext.com> References: <20190924120740.12425-1-yamada.masahiro@socionext.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2019-09-24 at 21:07 +0900, Masahiro Yamada wrote: > Johannes Berg reports lots of modpost warnings on ARCH=um builds: > > WARNING: "rename" [vmlinux] is a static EXPORT_SYMBOL > [snip] > WARNING: "__stack_smash_handler" [vmlinux] is a static EXPORT_SYMBOL > > When you run "make", the modpost is run twice; before linking vmlinux, > and before building modules. All the warnings above are from the second > modpost. > > The offending symbols are defined not in vmlinux, but in the C library. > The first modpost is run against the relocatable vmlinux.o, and those > warnings are nicely suppressed because the SH_UNDEF entries from the > symbol table clear the ->is_static flag. > > The second modpost is run against the executable vmlinux (+ modules), > where those symbols have been resolved, but the definitions do not > exist. > > This commit fixes it in a straight forward way. Suppress the static > EXPORT_SYMBOL warnings from "vmlinux". Yep, that fixes it. Tested-by: Johannes Berg Thanks! johannes