From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 721C7C433EF for ; Fri, 15 Apr 2022 20:13:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241683AbiDOUQU (ORCPT ); Fri, 15 Apr 2022 16:16:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237521AbiDOUQU (ORCPT ); Fri, 15 Apr 2022 16:16:20 -0400 Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3960DDD959 for ; Fri, 15 Apr 2022 13:13:51 -0700 (PDT) Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 23FK7Frd030858; Fri, 15 Apr 2022 15:07:15 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 23FK7EbY030857; Fri, 15 Apr 2022 15:07:14 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Fri, 15 Apr 2022 15:07:14 -0500 From: Segher Boessenkool To: Nick Desaulniers Cc: hjl.tools@gmail.com, Peter Zijlstra , x86@kernel.org, Josh Poimboeuf , mbenes@suse.cz, rostedt@goodmis.org, linux-toolchains@vger.kernel.org, Fangrui Song Subject: Re: The trouble with __weak and objtool got worse Message-ID: <20220415200714.GC25951@gate.crashing.org> References: <20220415182229.GB25951@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Precedence: bulk List-ID: X-Mailing-List: linux-toolchains@vger.kernel.org On Fri, Apr 15, 2022 at 11:36:32AM -0700, Nick Desaulniers wrote: > On Fri, Apr 15, 2022 at 11:27 AM Segher Boessenkool > wrote: > > > > > Alternatively: > > > > > > https://sourceware.org/pipermail/binutils/2020-December/114671.html > > > > > > seems to suggest: -Wa,--generate-unused-section-symbols=yes, ought to > > > work, except I'm getting: > > > > That email is for a proposed patch. Did anything further ever happen > > with it? > > $ gcc hello.c -Wa,--generate-unused-section-symbols=yes > as: unrecognized option '--generate-unused-section-symbols=yes' > $ gcc hello.c -Wa,-generate-unused-section-symbols=yes > $ gcc --version > gcc (Debian 11.2.0-16) 11.2.0 > > Uh, the email says -- prefix, but reality shows a single prefix? What > happened there? Maybe that link is to an earlier version than what > landed? Neither has landed. You get the -g option, which can take options of itself, parsed by the target or file format code. "as -gobbledygook" works fine as well :-) Segher