From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id B4F4838560B9 for ; Wed, 25 May 2022 07:53:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B4F4838560B9 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-182-xNWiFCn9P3u1YVm7-yEPaA-1; Wed, 25 May 2022 03:53:40 -0400 X-MC-Unique: xNWiFCn9P3u1YVm7-yEPaA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 61BE9811E80; Wed, 25 May 2022 07:53:40 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.193.94]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3E6982026D64; Wed, 25 May 2022 07:53:38 +0000 (UTC) From: Florian Weimer To: Fangrui Song Cc: Luca Boccassi , binutils@sourceware.org Subject: Re: [PATCH] ld: add --package-metadata References: <20220515191846.114257-1-luca.boccassi@gmail.com> <20220516164003.iivw6lthknhvce42@gmail.com> <87o7zwwv9m.fsf@oldenburg.str.redhat.com> <20220525065658.mxvpugjgnh3dt7de@gmail.com> Date: Wed, 25 May 2022 09:53:26 +0200 In-Reply-To: <20220525065658.mxvpugjgnh3dt7de@gmail.com> (Fangrui Song's message of "Tue, 24 May 2022 23:56:58 -0700") Message-ID: <87zgj682vd.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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, 25 May 2022 07:53:47 -0000 * Fangrui Song: > On 2022-05-17, Luca Boccassi via Binutils wrote: >>On Tue, 17 May 2022 at 07:03, Florian Weimer wrote: >>> >>> * Fangrui Song: >>> >>> > Both the "FDO" and the json dependency make me concerned - >>> > if a linker script approach works quite well, why bother with a new >>> > linker option with a very specific application? >>> >>> The linker script does not work all that well because it requires that >>> the script is materialized to disk somewhere, and that path needs to >>> show up in the build flags. If the build flags are stored beyond the >>> build for future use, this makes them invalid because the path will >>> typically be gone by the time the stored flags are used. >>> >>> Thanks, >>> Florian > > Do you mean that a user may need to re-link the executable/shared > object? The note content must be preserved somewhere, I don't see how > > as ... -o meta.o > ld.bfd ... meta.o > > is more inconvenient than > > ld.bfd --package-meta='content' ... If the object file is put into /build/builddir/BUILD/foo-12.3/meta.o, the full path ends up in LDFLAGS. (The validity of a relative path would depend on the package-specific build system.) But if we do that, and the package build system captures LDFLAGS into some generated artifact that controls link editor invocation, it may try to link with /build/builddir/BUILD/foo-12.3/meta.o. But that file will no longer exist at the time. > The "FDO" owner also makes me concerned. It seems a bit arbitrary. It's the usual abbreviation for freedesktop.org, where the specification lives. > https://src.fedoraproject.org/rpms/package-notes/pull-request/2#comment-98855 (tstellar) > says > "Given, that I'm the maintainer of lld in Fedora, if I volunteer to deal > with issues that stem from this assembler based implementation would you > be more likely to accept this patch?" > > It would be nice to have a list of packages and fix them (perhaps > issues like not honor LDFLAGS). I think this is unrelated to honoring LDFLAGS or not. Thanks, Florian