From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by sourceware.org (Postfix) with ESMTPS id 484173858D28 for ; Wed, 20 Jul 2022 15:10:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 484173858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=martin.st Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=martin.st Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 26KFAWWZ024551-26KFAWWa024551; Wed, 20 Jul 2022 18:10:32 +0300 Received: from foo.martin.st (host-97-187.parnet.fi [77.234.97.187]) by mail9.parnet.fi (Postfix) with ESMTPS id E95E9A142C; Wed, 20 Jul 2022 18:10:31 +0300 (EEST) Date: Wed, 20 Jul 2022 18:10:31 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: Jan Beulich cc: binutils@sourceware.org Subject: Re: [PATCH] ld: Add support for a new option, -exclude-symbols, in COFF object file directives In-Reply-To: Message-ID: <2937e25-994c-85b0-df33-c87d8e2a37@martin.st> References: <20220719203330.1189542-1-martin@martin.st> <65b20943-0c1b-28f6-6f57-d3c4b8a9b75f@suse.com> MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2022 15:10:36 -0000 On Wed, 20 Jul 2022, Jan Beulich wrote: > On 20.07.2022 14:39, Martin Storsjö wrote: >> This directive isn't supposed to be used from a def file though (just like >> the aligncomm directive), see the comment in deffile.h. > > Isn't supposed to be, or is prevented from being used that way? I have > to admit that I'd find it quite helpful if this new option was also > usable from a .def file. This might commonly be the more central place > to record exclusions. It's not possible to use it in a .def file with the current patch - it would need to be recognized as a token at the very least. Do you want me to try add support for that? I guess I could see a usecase for that too... My intended usecase is to map __attribute__((visibility("hidden"))) and similar (-fvisibility=hidden and -fvisibility-inlines-hidden) to this embedded directive, in Clang/llvm. (Not sure how hard it would be to do the same in GCC, but I have a Clang patch ready for that.) // Martin